Link to home
Start Free TrialLog in
Avatar of bluedragon99
bluedragon99Flag for United States of America

asked on

installshield 2009, need to add a mandatory reboot upon uninstall (installscript)

I am creating a single image exe in installshield 2009, how would I go about adding a mandatory reboot at the end of an uninstallation?
Avatar of jmcmunn
jmcmunn
Flag of United States of America image


Try adding the ScheduleReboot action to your sequence and set the REBOOTPROMPT property to suppress.  If you go to your 'Custom Actions and Sequences' area, then:

Sequences->Installation->Execute

You will see it in the list near the bottom.  The condition is likely ISSCHEDULEREBOOT currently...you could change it to ISSCHEDULEREBOOT OR REMOVE='ALL'

That 'should' work for you.  You might have to add a custom action that gets run during uninstall that will set the REBOOTPROMPT to be supressed.
ASKER CERTIFIED SOLUTION
Avatar of jmcmunn
jmcmunn
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of bluedragon99

ASKER

how do i add/modify the .rul?
got the script imported, can't figure out where to schedule it to run on uninstall...i think installshield was designed by ray charles...

If you got the script into the setup.rul file it should be called whenever a full uninstall is run.  Check this link for some relevant information.  it may be exactly what you are experiencing.  If not, let us know and we'll troubleshoot as best we can.

http://community.acresso.com/archive/index.php?t-115314.html
couldn't find out where in the interface to edit setup.rul, link looks good couldn't find onmaintbeforeui() function to add reboot either...guess i'm just lost here..

Under 'Behavior and Logic' in the tree of the Installation Designer, there is a node for Installscript.  Then you will see the Setup.rul as one of the files in the project.  Click on it, and you will see some drop downs at the top of the right hand pane.  If you drop the left dropdown down to 'Before Move Data' you will then find the OnMaintBeforeUI as one of the choices in the right dropdown.  Choose it, and it adds a default version to the Setup.Rul, then you can modify it.

Same process for the OnUninstall, but you will find that one under 'Advanced' instead.
that's the thing, setup.rul is not visible under B&L under files, if i try to add setup.rul it adds setup2.rul (seems it's not showing it for some reason)..
got it, wasn't using an installscript project type...testing..

If you are not required to use the installscript project type, you could also try it the other way I suggested with the custom action stuff.  But either way should eventually work fine.
Avatar of vDeveloper
vDeveloper

I made an MSI package through Install Shield 2009. I dont want to uninstall the file web.config when an uninstall action performed from Add/Remove Programs, only this file should be reside at the installed location.

Any idea?

Thanks

Mazhar