cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
GStrait
Level 4

Windows Service Startup Type?

Are there any InstallShiled script functions (or any other method I can use from an InstallShield script) that can be used to determine the Startup Type of an existing Windows Service?

Thanks, Gerry
Labels (1)
0 Kudos
(2) Replies
RobertDickau
Flexera Alumni

If nothing else, perhaps you can prototype and call the Windows API function QueryServiceConfig? (See MSDN for more information.)
0 Kudos
GStrait
Level 4

RobertDickau wrote:
If nothing else, perhaps you can prototype and call the Windows API function QueryServiceConfig? (See MSDN for more information.)


Thank you Robert.

But I realized I could easily use the Registry APIs.

I used the RegDBGetKeyValueEx API in my script to Get the Service Start Type in the OnFirstUIBefore function. Then the RegDBSetKeyValueEx API to set the Service Start Type in the OnFirstUIAfter function. This achieved my goal of preserving the Service Start setting across a product major upgrade.

Gerry
0 Kudos