reboot if neccesary
Hi!
I use InstallShield2010 to compily my MSI:s. Is there a way to reboot a machine after a package deployment (from Microsoft CM) if files are locked/in use and not otherwise?
The scenario is this: We are doing an upgrade to a software which is in use on several thousand computers, some of them 24/7. Maybe 80 % have the computers shut down during nights so these clients will have the software installed when they boot their computers in the morning.
The remaining 20% will have the application up and running (even if we tell them to close it). When we install the update the uninstallation will be incomplete I guess and some file will be locked since they are in use, right? And these files will be changed after the next reboot of the computer.
Is there a way within the MSI to initiate a reboot of the computer after the MSI is installed if there has been locked files which needs to be replaced by a reboot? We dont want to reboot everytime since 80 % of the users will have come from a clean boot next morning (we schedule the installation in the night).
I use InstallShield2010 to compily my MSI:s. Is there a way to reboot a machine after a package deployment (from Microsoft CM) if files are locked/in use and not otherwise?
The scenario is this: We are doing an upgrade to a software which is in use on several thousand computers, some of them 24/7. Maybe 80 % have the computers shut down during nights so these clients will have the software installed when they boot their computers in the morning.
The remaining 20% will have the application up and running (even if we tell them to close it). When we install the update the uninstallation will be incomplete I guess and some file will be locked since they are in use, right? And these files will be changed after the next reboot of the computer.
Is there a way within the MSI to initiate a reboot of the computer after the MSI is installed if there has been locked files which needs to be replaced by a reboot? We dont want to reboot everytime since 80 % of the users will have come from a clean boot next morning (we schedule the installation in the night).
0 Comments
[ + ] Show comments
Answers (3)
Please log in to answer
Posted by:
anonymous_9363
14 years ago
Far and away the simplest solution is to force a reboot for every installation. Your well-behaved users need have no concern, since they won't notice anything different: they'll see the log-in dialog box next day whatever happens.
You could get fancy a write a script to test whether the app is running and either prompt to close it, forcibly kill it or reboot at that point, after having written a RunOnce registry value to restart the installation when the machine restarts, if required. This last step might be supplanted by your deployment system's persistence.
Whichever route you take, I think it's only fair to email all the targets and warn them that the reboot will happen if they fail to log off and that if any work is lost due to their non-compliance, you will not accept responsibility.
You could get fancy a write a script to test whether the app is running and either prompt to close it, forcibly kill it or reboot at that point, after having written a RunOnce registry value to restart the installation when the machine restarts, if required. This last step might be supplanted by your deployment system's persistence.
Whichever route you take, I think it's only fair to email all the targets and warn them that the reboot will happen if they fail to log off and that if any work is lost due to their non-compliance, you will not accept responsibility.
Posted by:
Agathorn
14 years ago
The "problem" is that if the computers are rebooted unnecessarily a lot of time is wasted on around 4 000 computers. That´s a lot of man hours I´m afraid.
I don´t know any scripting but I´ll try to google it and put something together in vbscript and put it in a custom action.
1. Check if the executable is running
2. If the executable is running prompt the user to close it. If no input from the user, close the application after 15 min and continue with the upgrade.
But is it possible to give a dialogbox to a user if the program is distributed from Microsoft CM per machine?
I don´t know any scripting but I´ll try to google it and put something together in vbscript and put it in a custom action.
1. Check if the executable is running
2. If the executable is running prompt the user to close it. If no input from the user, close the application after 15 min and continue with the upgrade.
But is it possible to give a dialogbox to a user if the program is distributed from Microsoft CM per machine?
Posted by:
anonymous_9363
14 years ago
Sorry: I mis-read your post, missing the part where you said that the PCs are shut down, rather than waiting for a log-in so yes, a forced reboot would probably rub people up the wrong way.
It's perfectly possible to set an option to allow the installer to interact with the user, yes. It's done at the 'Add program' stage, IIRC. Do I recall it's on the same screen where you set the program to run as Administrator or vanilla user?
As to the scripting approach, though, I would have the SCCM job run the script and have the script execute the MSI.
It's perfectly possible to set an option to allow the installer to interact with the user, yes. It's done at the 'Add program' stage, IIRC. Do I recall it's on the same screen where you set the program to run as Administrator or vanilla user?
As to the scripting approach, though, I would have the SCCM job run the script and have the script execute the MSI.
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
so that the conversation will remain readable.