@ECHO OFF

:: Install directory w/o quotes (")
SET install_dir=%~1
IF "%install_dir%"=="" GOTO InvalidArg

SET restart_ms=3000
SET svis_name=DsiWMIService

sc.exe create %svis_name% binPath= "%install_dir%\dsiwmis.exe" DisplayName= "Dritek WMI Service" start= auto
sc.exe failure %svis_name% reset= 0 actions= restart/%restart_ms%
sc.exe description %svis_name% "Launch Manager WMI service program"
GOTO Succeeded

:InvalidArg
EXIT /B 1

:Succeeded

