Showing results for 
Show  only  | Search instead for 
Did you mean: 
Level 6

service dependancies

I have a service which I have recently discovered is dependant on the WinHTTPAutoProxy service.

The problem is my installer has to work on XP and Vista and the WinHTTPAutoProxy service is only on Vista.

Is there a way to add the dependancy to the service only if running on Vista?

Or am I able to create a registry key for the dependancy with a condition to do so only for Vista?

Any ideas would be great?

Thanks in advance
Labels (1)
0 Kudos
(4) Replies
Level 7

one solution would be to create two mutually exclusive components, one for Vista and one for the rest of the operating systems you want; components would have same executable and service install functions, but the one for Vista would add "WinHTTPAutoProxy" as dependancy.
the other way is to install the service through InstallScript custom action and use a switch or if statement.

0 Kudos
Level 6

This doesn't seem to work. I just get error 1920 verify you have sufficient priveledges.

I have tried adding the registry using a custom action (custom action > new exe > path referencing directory), and try and run the reg.exe file, everything runs fine no errors but the registry key is not added. I can't figure out what I am doing wrong. It works fine when I run manually.

The custom action looks like below:
Working dir: windows system32 folder
Filename and commandline: REG ADD HKLM\system\currentdataset\services\gravitaswellmanager /v DependsOnService [SystemFolder]reg.exe
return processing: Synchronous(ignore exit code)
in script execution: Deferred execution in system context
Install exec sequence: After install services
condition: Not installed

Anyone any ideas what I am doing wrong?

Thanks in advance
0 Kudos
Level 6

Looking through a more detailed log I keep getting a return value 1613. See log below:

MSI (s) (A0:90) [11:54:07:885]: Doing action: AddDependancy
Action 11:54:07: AddDependancy.
Action start 11:54:08: AddDependancy.
MSI (s) (A0:90) [11:54:08:120]: Doing action: RunEventRegistrationTool
Action ended 11:54:08: AddDependancy. Return value 1631.

Anybody any ideas?
0 Kudos
Level 6

I have managed to fix the 1631 error I forgot to put the reg in the command line so my command line is now:

reg add HKLM\system\currentcontrolset\services\gravitaswellmanager /v DependsOnService /t REG_MULTI_SZ /d WinHTTPAutoProxySvc "[SystemFolder]reg.exe"

I still have the problem of the registry not being created please help
0 Kudos