Announcement
Collapse
No announcement yet.
Cannot successfully start service
Collapse
X
-
I found the answer. I was trying to start the service from a "before install" "On Next" screen. When I moved the call to start the service to an "after install" "pre-load" screen it worked. I don't really understand why it's like this, but I did notice that my EXE file (that of the service) is only copied to the AppFolder at that point...
-
Cannot successfully start service
My call to create the service works as I see the service was properly created. When I try to start it in the next line, though, it does not start, but rather gets a 3406 ("The start command failed.") error.
Code:function InstallAndStartService() PathOfExe = SessionVar.Expand("%AppFolder%").."\\".."EcFtpClient.exe"; NetworkService = "NT AUTHORITY\\NETWORK SERVICE"; File.SetPermissions(SessionVar.Expand("%AppFolder%"), System.GetUserSID(NetworkService), GRANT_ACCESS, ALL_PERMISSIONS, SUB_CONTAINERS_AND_OBJECTS_INHERIT); [B]Service.Create[/B](PathOfExe, ServiceDisplayName, ServiceKeyName, SERVICE_WIN32_OWN_PROCESS, false, SERVICE_AUTO_START, SERVICE_ERROR_NORMAL, "", "", nil, NetworkService, ""); [b]Service.Start[/B](ServiceDisplayName, ServiceKeyName); Dialog.Message("Error starting service",Application.GetLastError()); --shows 3406 end
Please advise.
Thanks,
EliezerTags: None
Leave a comment: