/build/static/layout/Breadcrumb_cap_w.png

REBOOT and REBOOTPROMPT Properties

Hello,


I'm trying to build a package which ALWAYS reboots when we remove it.
So I set (with a set Property CA) REBOOT = Force (Condition > REMOVE ="ALL") and, in order not to ask for reboot or no (I want the reboot to be automatic, I warn the user of that before starting the process) I set the REBOOTPROMPT = Supress (Condition > REMOVE="ALL").

But it doesn't works as I want.
The reboot starts well only after an uninstallation, but the user is prompted about that !
I don't want any message box, just the reboot. The user MUST reboot immediatly, or he should do something bad for me... :-)

Any suggestion or solution ?


EDIT : Moreover, when I upgrade this product, the prompt (even if I don't want a prompt but automatic reboot) is shown at the END of the upgrade, but I would like the sytem reboot after the uninstall of the old product, and after the reboot, the install process continues...
How could I do that ? I really don't find anything on the internet...

0 Comments   [ + ] Show comments

Answers (19)

Posted by: WiseUser 19 years ago
Fourth Degree Brown Belt
2
Like I said before... schedule your actions where ever you like. For testing purposes I scheduled mine straight after the "LaunchConditions"... and mine works.[:D]

I can also confirm that I do not see any prompt at the end of my installation.

I'd be surprised if your users uninstall software by double-clicking the MSI file. What kind of environment are you working in?[;)] You should test the MSI in the same way as it will eventually be used.

Also remember that during an upgrade, the "REMOVE" property may never equal "ALL". It would most likely only equal "ALL" if you rescheduled the "RemoveExistingProducts" action (maybe not even then).
Posted by: TomB 19 years ago
Orange Belt
2
Babric,

I was able to create a blank MSI.
Added the ScheduleReboot action right before InstallFinalize in the InstallExecuteSequence Table.
Added the Condition "REMOVE" to the ScheduleReboot Action.
Added REBOOTPROMPT = "S" to the Property table.

Installed fine and when removed usign the UI rebooted with out a prompt.
Posted by: WiseUser 19 years ago
Fourth Degree Brown Belt
0
This is certainly getting confusing!

I guess you need to start by rescheduling your "RemoveExistingProducts" action to a location between the "InstallValidate" action and the "InstallInitialize" action.

http://msdn.microsoft.com/library/en-us/msi/setup/removeexistingproducts_action.asp
Posted by: babric 19 years ago
Senior Purple Belt
0
I don't understand, my "RemoveExistingProducts" action is right before InstallInitialize, did I say something which could mistake you ?
Posted by: WiseUser 19 years ago
Fourth Degree Brown Belt
0
Did you already move it then? Because that's not the "usual" place for it.

Which packaging tool are you using btw?
Posted by: babric 19 years ago
Senior Purple Belt
0
Installshield 10.5.

I included the Major Upgrade, with the "remove old package files before installing" option. That's why the RemoveExistingProducts is right before InstallInitialize. I didn't move it myself, but I think it is the good place for it :-)
Posted by: TomB 19 years ago
Orange Belt
0
Babric

You may just be using a UI. If you are using a UI and setting REBOOT to Force then it will always prompt when it encounter the ForceReboot or ScheduleReboot action.

I would suggest you not user your CA for a reboot, but use the BuiltIn action "ScheduleReboot". Put this right before InstallFinalize and then use the condition (REMOVE ~="ALL").
Then in the Property Table set the REBOOT to "Force".

This will automatically reboot when the msi is uninstalled with no prompt, but onlly when run with a /q, /qb,/qn switch.

A suggestion:
If you want the reboot to happen after an upgrade then you can add the action of "ForceReboot" right before InstallInitulize and add the condition (UPGRADEPROPERTY)

Note:UPGRADEPROPERTY would be the property that you used in the upgrade table.
You will most likely need a CA to run before this to write a command to run the MSI again after login, whcih you can do in the RunOnce key of the registry.

If you need more detail please let me know.
Posted by: plangton 19 years ago
Second Degree Blue Belt
0
It could be that you aren't spelling suppress correctly.

You should have "REBOOTPROMPT = SUPPRESS" not "supress"

Hope that helps

Rgds

Paul
Posted by: babric 19 years ago
Senior Purple Belt
0
I wrote it bad... in my post :-)

fortunately, I wrote "Suppress" (not SUPPRESS) in my project...

I will try SUPPRESS...
Posted by: WiseUser 19 years ago
Fourth Degree Brown Belt
0
Try "S" - it's much easier to spell.[;)]
Posted by: babric 19 years ago
Senior Purple Belt
0
I tried it, but I always have the same problem, I have a prompt for a reboot.

I don't want any prompt !
I would like the uninstall launch a system reboot as its last action. (And I don't want the package which launched the reboot to be launched again at the restart).

It is possible ? (without using silent mode)

Moreover, I would like that during an Major upgrade, the installation process runs as following :

(Package_v1 is installed on the computer)
- launch the package_v2
- UI sequence of the package_v2, old version detected
- uninstall of the package_v1
(until there, it is a normal Major Upgrade sequence)
- AUTOMATIC REBOOT
- just after the reboot, the package_v2 runs again, begining the UI sequence just before the ExecuteSequence.
- Package_v2 is installed.

Is it possible ?
Posted by: babric 19 years ago
Senior Purple Belt
0
I tried several options, and it appears that the REBOOTPROMPT = Suppress (or SUPPRESS, or S) works only with Silent mode...

Not good for me...
Posted by: WiseUser 19 years ago
Fourth Degree Brown Belt
0
To answer the first (original) question:

I think you must be scheduling the action incorrectly. Try scheduling the action that sets your property values near the top of the InstallExecuteSequence (maybe after LaunchConditions).

Condition: REMOVE~="ALL"
Action: REBOOT="Force" (Type 51)
Action: REBOOTPROMPT="S" (Type 51)
Posted by: babric 19 years ago
Senior Purple Belt
0
Does I include the ScheduleReboot or ForceReboot action ?

Moreover, I would like to show you an MSDN Extract :

"To determine whether a product has been set to be completely uninstalled, a package author may use a conditional expression to check whether REMOVE=ALL. Note that if the product is removed by setting its top feature to absent, the REMOVE property may not equal ALL until after the InstallValidate action. This means that any custom action that depends upon REMOVE=ALL must be sequenced after the InstallValidate. For more information see also Conditioning Actions to Run During Removal. Note that the feature names are case-sensitive."

Link HERE

So I will try scheduling the actions after InstallValidate :-)

EDIT : Doesn't Work (no reboot, and no prompt !)






EDIT 2 :

Writting S and Force instead of "S" and "Force", I have a prompt for a reboot. (in NON silent mode, I didn't try it in silent mode)
Posted by: babric 19 years ago
Senior Purple Belt
0
Babric

You may just be using a UI. If you are using a UI and setting REBOOT to Force then it will always prompt when it encounter the ForceReboot or ScheduleReboot action.

I would suggest you not user your CA for a reboot, but use the BuiltIn action "ScheduleReboot". Put this right before InstallFinalize and then use the condition (REMOVE ~="ALL").
Then in the Property Table set the REBOOT to "Force".

This will automatically reboot when the msi is uninstalled with no prompt, but onlly when run with a /q, /qb,/qn switch.

A suggestion:
If you want the reboot to happen after an upgrade then you can add the action of "ForceReboot" right before InstallInitulize and add the condition (UPGRADEPROPERTY)

Note:UPGRADEPROPERTY would be the property that you used in the upgrade table.
You will most likely need a CA to run before this to write a command to run the MSI again after login, whcih you can do in the RunOnce key of the registry.

If you need more detail please let me know.



Thank you TomB, but I have a problem :
Error 2762: Unable to schedule operation. The action must be scheduled between InstallInitialize and InstallFinalize.

So ForceReboot can't be scheduled here... [:(]

Moreover, are you sure that I can't remove the prompt (but not remove the reboot) when I don't use silent mode ?

Thanks all for your efforts !


EDIT : I tried to schedule it right AFTER InstallInitialize, and using some AFTERREBOOT = 1 condition, I succeed in doing something not so bad, but there is always this *$%!# prompt !

So now, I can Reboot during an upgrade.
But I always want to reboot after an uninstall, whether it is a normal uninstall, OR during a upgrade.
I tried to use the UPGRADEPROPERTY as condition, but during an upragde process, the package which has to be deleted doesn't "see" this property... :-/.
So I know how to reboot during an upgrade, or during a normal uninstall, but not in both cases ! (Of course, I don't want there are 2 reboots during an upgrade, so the package uninstalled must see that it doesn't have to reboot because the upgrade package will do it...)

How can a package "see" that it is being removed by a "normal" unsintall process or by an "upgrade" process ?

i don't know if you can understand me :-)
Posted by: WiseUser 19 years ago
Fourth Degree Brown Belt
0
ORIGINAL: babric

Does I include the ScheduleReboot or ForceReboot action ?

Moreover, I would like to show you an MSDN Extract :

"To determine whether a product has been set to be completely uninstalled, a package author may use a conditional expression to check whether REMOVE=ALL. Note that if the product is removed by setting its top feature to absent, the REMOVE property may not equal ALL until after the InstallValidate action. This means that any custom action that depends upon REMOVE=ALL must be sequenced after the InstallValidate. For more information see also Conditioning Actions to Run During Removal. Note that the feature names are case-sensitive."

Link HERE

So I will try scheduling the actions after InstallValidate :-)

EDIT : Doesn't Work (no reboot, and no prompt !)






EDIT 2 :

Writting S and Force instead of "S" and "Force", I have a prompt for a reboot. (in NON silent mode, I didn't try it in silent mode)


in NON silent mode

Schedule it where ever it pleases you within InstallExecuteSequence - what I meant was not to schedule it in the InstallUISequence. You can insert a message box too if you want to be absolutely sure what the value of the "REMOVE" property is.

Are you planning on uninstalling the application by removing the "topmost" feature then? I normally just use "/x", or the "remove" button in the control panel which will normally remove the lot ("ALL").

You are absolutely right that the quotation marks should not be included in the "Condition" column of the "InstallExecuteSequence" table - it is just a habit of mine to include string values in quotes. I shall strive to be more pedantic in future.[:D]

Regarding your problem, I would suggest that you "get back to basics" by creating a new clean MSI with a single file in the INSTALLDIR, then add your actions. It only took me about 90 seconds to create, and it worked perfectly first time round.
Posted by: babric 19 years ago
Senior Purple Belt
0
Are you planning on uninstalling the application by removing the "topmost" feature then? I normally just use "/x", or the "remove" button in the control panel which will normally remove the lot ("ALL").

The user can't uninstall just one feature. He must install or uninstall ALL the features.

Regarding your problem, I would suggest that you "get back to basics" by creating a new clean MSI with a single file in the INSTALLDIR, then add your actions. It only took me about 90 seconds to create, and it worked perfectly first time round.

Do you mean that you don't have any prompt for a reboot at the end of the uninstall ?
Sorry to ask, but does it works double-clicking the package (and not using the add/remove program panel or some command line as /x?).
Posted by: babric 19 years ago
Senior Purple Belt
0
I'd be surprised if your users uninstall software by double-clicking the MSI file. What kind of environment are you working in? You should test the MSI in the same way as it will eventually be used.

That's because I test the MSI in the same way as it will eventually be used that I test ALL (Mmmmh... almost :-) ) the uses that could be done of my package.

As you advised me, I built a basic package (it took me.... hum, 180 sec... hey ! I'm new in packaging !) and I confirm that when I double click on the package (so that I'm not in silent mode) I don't have any prompt...and any reboot (because I don't have any "RebootAction" I suppose) ! But when I uninstall it in silent mode, I have an automatic reboot...
Posted by: babric 19 years ago
Senior Purple Belt
0
Babric,

I was able to create a blank MSI.
Added the ScheduleReboot action right before InstallFinalize in the InstallExecuteSequence Table.
Added the Condition "REMOVE" to the ScheduleReboot Action.
Added REBOOTPROMPT = "S" to the Property table.

Installed fine and when removed usign the UI rebooted with out a prompt.


2 points for him, 2 !
Yes WiseUser, I gave you 2 points two for your efforts :-)

I don't know why it didn't work, but using TomB solution, it does ! I think the problem was the schedule of my setProperties CA, and setting them in the Property table is not a bad solution :-)

I wrote : REBOOTPROMPT = S (no "")
ForceReboot condtion : REMOVE="ALL"

Now, I can Reboot without prompt during an upgrade. I scheduled a ForceReboot Action right after the InstallInitialize, and using some AFTERREBOOT conditions, I can do what I want in an upgrade process.

The new problem, is that I would like to reboot at the end of a standard uninstall of my product (A product can be uninstalled during an upgrade, or simply uninstalling it using Add/Rem Prog for example... I precise this to be sure you understand what I mean by "standard uninstall").

However, if I schedule a reboot at the end of an uninstall -> during an upgrade this reboot will run at the end of the upgrade (whereas I need it between the uninstall of the old product and the install of the new one !)

So I should set a property in order not to run the uninstall reboot of the old package during an upgrade, but use the ForceReboot of the new package (conditionned by an UPGRADEPROPERTY).

How can I do that ? During an upgrade, it seems that the old one (i.e : the one which will be uninstalled) doesn't "see" the UPGRADEPROPERTY of the new one, so, I don't know how to detect that I'm in an upgrade-uninstall process (instead of a standard-uninstall process)

Hope you understand me !


Thanks again for your help !
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ