TheDude69 Posted October 27, 2011 Share Posted October 27, 2011 Hello, I have successfully installed my script as a service using the following: Run(@ScriptDir & "\instsrv.exe " & $szServiceName & " " & $szFileName, @ScriptDir, @SW_HIDE) ;RegWrite("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\" & $szServiceName, "Type", "REG_DWORD", 272) RegWrite("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\" & $szServiceName, "Type", "REG_DWORD", 0x110) RegWrite("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\" & $szServiceName, "Start", "REG_DWORD", 2) RegWrite("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\" & $szServiceName, "DisplayName", "REG_SZ", $szServiceName) RegWrite("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\" & $szServiceName, "ObjectName", "REG_SZ", "LocalSystem") RegWrite("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\" & $szServiceName, "Description", "REG_SZ", $szDesc) RegWrite("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\" & $szServiceName & "\Parameters", "Application", "REG_SZ", $szFileName) When I now start the service it stops after a few seconds with error 1053. I can see that the script is running until it reaches the following loop: $VergangeneZeit = TimerDiff($TimerStart) / 1000 Do Sleep(1000) Until ProcessExists("WKix32.EXE") > 0 or (TimerDiff($TimerStart) / 1000) - $VergangeneZeit > 900 I assume that Windows expects some interaction with the script but I do not really know what to do at this point. Has someone maybe a hint for me? Many thanks in advance, best regards TheDude69 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now