I have a piece of software in our organization that I need to be able to remove with a script, have the machine reboot and then install the new version after the restart. I currently have both installs scripted into a batch file, but for some reason I cannot get SCCM to perform the reboot and continue the install. It seems to fail and never kick off again the install after a reboot. Does anyone have any ideas of a way to perform an install, reboot, then install another piece of software after sccm reboots the machine?

Any ideas would help!

2 Comments   [ + ] Show Comments


  • Is there a compelling reason to force a reboot between uninstall and new install? Generally, this need arises when there are "in use" files in the old application which need a reboot to complete the removal of. However, in many cases a script which stops any running services associated with the old application, and/or stops any tasks associated with the old application, will then allow the old app to be uninstalled without needing a reboot, thus allowing the new app to be installed and consequently return a good exit code to SCCM.
  • It is java we are fighting. Its requiring a reboot, but for some reason SCCM will not reboot the computer, even though the NORESTART flags are there.
Please log in to comment

Community Chosen Answer

Have your uninstall batch poke the HKLM runonce key and put the install command in a key so when it reboots and logs in, it runs that command automatically.
Answered 05/13/2015 by: SMal.tmcc
Red Belt

  • That sounds like a plan! I never would have thought to do that! I appreciate your quick response!

Please log in to comment


Remember that Runonce will only work for local Admin accounts starting with Win7: https://support.microsoft.com/en-us/kb/2021405
Answered 05/13/2015 by: vjaneczko
Eighth Degree Black Belt

Please log in to comment
schtask ??
Answered 05/15/2015 by: rock_star
Second Degree Black Belt

Please log in to comment
Answer this question or Comment on this question for clarity