cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
harid38
Level 5

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.
  • Labels (1)
    0 Kudos
    (5) Replies
    john_wolfe
    Level 2

    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.
    0 Kudos
    harid38
    Level 5

    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..
    0 Kudos
    lordmaxx
    Level 6

    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.
    0 Kudos
    harid38
    Level 5

    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..
    0 Kudos
    manomatt
    Level 8

    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?
    0 Kudos