This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Re: Windows Service Startup Type?
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Sep 23, 2009
02:00 PM
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
Thanks, Gerry
(2) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Sep 23, 2009
09:31 PM
If nothing else, perhaps you can prototype and call the Windows API function QueryServiceConfig? (See MSDN for more information.)
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Sep 24, 2009
09:38 AM
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
![](/skins/images/D60DF682EA37BF37032955CE10F3F0BB/responsive_peak/images/icon_anonymous_message.png)