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: how to set service to start?
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
‎Aug 20, 2010
01:14 PM
how to set service to start?
I have a Basic MSI setup design>advanced settings>service that installs correctly and is set as automatic for startup. But after instalaltion I need to 'start' it to get it running? Why is that? Can I start it automatically with a parameter or something? Thanx.
start parameters???
start parameters???
(6) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Aug 20, 2010
02:07 PM
Did you add a service control event under the Control Settings section and set the Install Start setting under the Operation Time to Yes?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Aug 20, 2010
02:26 PM
Not sure if this is what you mean, but this is what I do.
I've added the following script in the Custom Actions settings-> After Setup Complete Success dialog.
Change where you see SERVICENAME (2 instances) to whatever your service is called.
The first part sets the retry on failure options.
Filename: startup.vbs
VB Script:
Set wsShellObj = CreateObject("WScript.Shell")
wsShellObj.Run "SC failure SERVICENAME reset= 0 actions= restart/1800000" , 1, false
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colServiceList = objWMIService.ExecQuery _
("Select * from Win32_Service where Name='SERVICENAME'")
For Each objService in colServiceList
objService.StartService()
Next
I've added the following script in the Custom Actions settings-> After Setup Complete Success dialog.
Change where you see SERVICENAME (2 instances) to whatever your service is called.
The first part sets the retry on failure options.
Filename: startup.vbs
VB Script:
Set wsShellObj = CreateObject("WScript.Shell")
wsShellObj.Run "SC failure SERVICENAME reset= 0 actions= restart/1800000" , 1, false
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colServiceList = objWMIService.ExecQuery _
("Select * from Win32_Service where Name='SERVICENAME'")
For Each objService in colServiceList
objService.StartService()
Next
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Aug 20, 2010
02:48 PM
What I suggested was to select your service added in the Setup Design > Advanced Settings > Services view, and click the + button in the Events grid under the Control Settings section to add a new service control event. Once the new entry is added, expand the Events > Key Name > Operation Time grid, and then set the Install Start setting to Yes.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Aug 23, 2010
09:03 AM
Thanx, I see the options and will give it a try!
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Aug 24, 2010
10:41 AM
Starting service works great but...
Does anybody know how to set the service User Name (I can set) and Passward (I can't set) dynamically, i.e. I'm using a custom dialog for user entry????
The password is a masked field in the Service Install options area.
I guess I'd like to use Property's to set those. Thanx
Does anybody know how to set the service User Name (I can set) and Passward (I can't set) dynamically, i.e. I'm using a custom dialog for user entry????
The password is a masked field in the Service Install options area.
I guess I'd like to use Property's to set those. Thanx
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Aug 24, 2010
11:51 AM
It looks like even though the service password field is hidden *********, that you can still put in a property string, i.e. [TESTME] and it works.....
![](/skins/images/D60DF682EA37BF37032955CE10F3F0BB/responsive_peak/images/icon_anonymous_message.png)