cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Devinq
Level 3

Service starting

I have tried two different ways to install and start a .NET service and while the install works fine, the start is not working. This is all that is in the msi log.
Action start 14:31:53: StartNativeService.
CustomAction StartNativeService returned actual error code 2 but will be translated to success due to continue marking
Action ended 14:31:53: StartNativeService. Return value 1.
I am able to start the service manually after the install.
Any ideas?
Thanks
Labels (1)
0 Kudos
(3) Replies
phill_mn
Level 7

In my experience Error 2 means that the file was not found at the launch path.

After the install succeeds, before it rolls back if that is what happens, open regedit and go to where the registry entries are made for that service.

HKLM\SYSTEM\CurrentControlSet\service\

Look at the 'ImagePath' string and that should be the path to the executable that the Service Control MAnager will launch. So if Start service is not working you would want to make sure that path and any command line arguments are correct.

The next issue is on of permissions. Use the sc.exe tool (part of the OS) to see what permissions were granted to the service. It may be missing the permission that allows it to be started. I am not sure how to address that issue within the MSI contect yet as I am much more familiar with installing using InstallScript setups.

And finally the Start Service will fail if any of the dependencies (including the proper version of .Net are missing.
0 Kudos
cweinert
Level 2

Just out of curiosity, how are you starting your service? Did you get it to work?

Devinq wrote:
I have tried two different ways to install and start a .NET service and while the install works fine, the start is not working. This is all that is in the msi log.
Action start 14:31:53: StartNativeService.
CustomAction StartNativeService returned actual error code 2 but will be translated to success due to continue marking
Action ended 14:31:53: StartNativeService. Return value 1.
I am able to start the service manually after the install.
Any ideas?
Thanks
0 Kudos
Earthshine
Level 4

how about using the built in windows command, SC

after the data has been moved, launch a command prompt using SC

SC.EXE can create, and remove services, not just look at permissions.
0 Kudos