![]() |
|
|||||||
![]() |
|
|
Thread Tools | Search this Thread | Display Modes |
|
#11
|
||||
|
||||
|
Bryan-
My typical use case for this type of API call is an AppSearch extension pattern to facilitate allowing a LaunchCondition to abort the install if a certain service ( say w3svc ) isn't installed and/or running. I give different error messages to instruct the user whether he needs to install IIS or simply make sure that it is running. I really need to be able to run these API calls from Immeadiate execution and without context elevation. Thanks for opening the WO and no thanks to Microsoft for still having a half baked AppSearch pattern after 10 years of feedback from customers.
__________________
Christopher Painter, Industry Leading Windows Installer Expert Visit DeploymentEngineering.com for contact information Note: I am (mostly) retired from the InstallShield Community Forum. |
|
#12
|
||||
|
||||
|
Blog article here if anyone is interested.....
http://blog.deploymentengineering.co...ations-of.html
__________________
Christopher Painter, Industry Leading Windows Installer Expert Visit DeploymentEngineering.com for contact information Note: I am (mostly) retired from the InstallShield Community Forum. |
|
#13
|
|||
|
|||
|
Thanks a Bunch
Thanks to all that have replied. While you guys were testing I tried a modified version of the code found under 'Set Start Mode of an NT Service' in
http://www.installsite.org/pages/en/isp_svc.htm as was suggested in an earlier post. So I am now getting the info out of the registry instead of using ServiceExistsService and ServiceGetServiceState. It looks like this is going to work just fine. You have my sincere thanks and respect. |
|
#14
|
||||
|
||||
|
You can technically ( and usually but not always reliably ) query configuration ( but not state ) data regarding a service by looking at the registry, but there is a problem with that.
The SCM ( Service Control Manager ) is the official API for getting this information. The data that you see in the registry is really private data for that API. It shouldn't be directly relied upon. For example someone could create the registry key for a service and not reboot. The service does not technically exist yet because the SCM doesn't know about it. The same goes for removing a service. Someone could delete that registry key but the service still exists until after a reboot. You should really always go through the SCM ( and allow IT to update it's private data storage ) and not directly modify it's private data.... despite the example you are seeing from InstallSite! Calling the SCM API will always give you the authorative answer on what IT thinks is the status of a service.
__________________
Christopher Painter, Industry Leading Windows Installer Expert Visit DeploymentEngineering.com for contact information Note: I am (mostly) retired from the InstallShield Community Forum. |
|
#15
|
|||
|
|||
|
Running from a bootstrapper (Setup.exe) with "Highest Level available" the ServiceExistsService functions within the UISequence and ExecuteSequence, but upon ARP-Repair or auto-repair ServiceExistsService doesn't function properly. Unfortunately I need this to be an immediate action.
Per Macrovision support: Quote:
Last edited by sks2004 : 05-08-2007 at 11:50 AM. |
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|