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: Change service types in BASIc Msi (Urgent)
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 15, 2011
08:14 AM
Change service types in BASIc Msi (Urgent)
Hi,
I am new to installshield, i am using basic msi project. I'm having some problem at the time of uninstallation.
I must follow these steps.
[LIST=1]
I need to set some services to run manually with the uninstaller.
Then reboot
continue uninstallation after the reboot.
Can someone help me with some tips how to achieve this. how can i communicate with the services through the installscript.
i'm using Forcereboot to reboot the uninstaller in the middle. how can i continue the uninstallation after reboot with the forcereboot....
Thanks for the help in advance.
I am new to installshield, i am using basic msi project. I'm having some problem at the time of uninstallation.
I must follow these steps.
[LIST=1]
Can someone help me with some tips how to achieve this. how can i communicate with the services through the installscript.
i'm using Forcereboot to reboot the uninstaller in the middle. how can i continue the uninstallation after reboot with the forcereboot....
Thanks for the help in advance.
(5) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Aug 15, 2011
08:50 AM
a few things...why would you want to actually 'start' services as part of an un-installation? Do you know where the service files are located and are you sure they will be there?
You've figured out how to reboot, most of the time if a setup is going to continue after reboot you will use the runonce registry keys you can find more information here:
http://msdn.microsoft.com/en-us/library/aa376977%28v=vs.85%29.aspx
but then you'd have to call your MSI with some kind of parameter to know that you are continuing the uninstall and not actually just starting the uninstall (I guess checking the state of your service would tell you that...)
Hopefully I've helped some but It's hard to tell what you're trying to do here uninstallation is usually stopping and removing such things.
You've figured out how to reboot, most of the time if a setup is going to continue after reboot you will use the runonce registry keys you can find more information here:
http://msdn.microsoft.com/en-us/library/aa376977%28v=vs.85%29.aspx
but then you'd have to call your MSI with some kind of parameter to know that you are continuing the uninstall and not actually just starting the uninstall (I guess checking the state of your service would tell you that...)
Hopefully I've helped some but It's hard to tell what you're trying to do here uninstallation is usually stopping and removing such things.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Aug 15, 2011
10:13 AM
Hi John,
thank you very much for your reply.
When we install our software, it install two services. both will look after each other(i.e., if one service stops another will start automatically.). so at the time of uninstallation, i need to set the two serivices to start manually first, and then reboot the pc, and after the reboot i can continue uninstalling the software easily.
I know the location of the services and i'm sure that they will be there at the time of uninstallation.
Some one suggested me to use Win32 API functions for accessing and controlling the configuration for services and drivers: OpenSCManager(), OpenService(), QueryServiceConfig(), ChangeServiceConfig().
so can i be able to use these wind32 api's in basic msi project. If yes, please provide me with some examples, if no suggest me an alternative.
Thanks for the help once again..
thank you very much for your reply.
When we install our software, it install two services. both will look after each other(i.e., if one service stops another will start automatically.). so at the time of uninstallation, i need to set the two serivices to start manually first, and then reboot the pc, and after the reboot i can continue uninstalling the software easily.
I know the location of the services and i'm sure that they will be there at the time of uninstallation.
Some one suggested me to use Win32 API functions for accessing and controlling the configuration for services and drivers: OpenSCManager(), OpenService(), QueryServiceConfig(), ChangeServiceConfig().
so can i be able to use these wind32 api's in basic msi project. If yes, please provide me with some examples, if no suggest me an alternative.
Thanks for the help once again..
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Aug 15, 2011
07:25 PM
Is the restart of the mutual services instant?
Perhaps if you make each service a separate component within a feature on the basic MSI, then just expand Advance Settings and choose services you can let windows installer handle the starting and stopping of the service as part of installation and uninstallation.
One of my setups uses this functionality and it happens quite seamlessly for install and uninstall. Be sure to set the install and uninstall properties within Control settings so that the services are handled correctly.
Perhaps if you make each service a separate component within a feature on the basic MSI, then just expand Advance Settings and choose services you can let windows installer handle the starting and stopping of the service as part of installation and uninstallation.
One of my setups uses this functionality and it happens quite seamlessly for install and uninstall. Be sure to set the install and uninstall properties within Control settings so that the services are handled correctly.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Aug 16, 2011
02:49 AM
lordmaxx wrote:
Is the restart of the mutual services instant?
Perhaps if you make each service a separate component within a feature on the basic MSI, then just expand Advance Settings and choose services you can let windows installer handle the starting and stopping of the service as part of installation and uninstallation.
One of my setups uses this functionality and it happens quite seamlessly for install and uninstall. Be sure to set the install and uninstall properties within Control settings so that the services are handled correctly.
HI LordMaxx,
No the restart of manual services are not instanat, they require a reboot. I cannot do it in way you described, because as i mentioned earlier, i have two services, if one service is stopped another will start it automatically so the only soultion is to set both services to start manually and reboot the computer. then after reboot i can uninstall them easily..
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Aug 16, 2011
12:03 PM
can you first set the service to start manually and try to use the InstallScript API "ServiceRemoveService" to remove that service? OR you can try to stop/remove the dependency of the service and then delete the service?
![](/skins/images/D60DF682EA37BF37032955CE10F3F0BB/responsive_peak/images/icon_anonymous_message.png)