Jump to content

Welcome to MSFN Forum
Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more. This message will be removed once you have signed in.
Login to Account Create an Account


Reboot Not Working in setupcomplete.cmd

- - - - -

  • Please log in to reply
1 reply to this topic




  • Member
  • 16 posts
  • Joined 08-June 08
I am relatively new to these Forums an so I do apologize if this question has been asked before.
I am using setupcomplete.cmd to install a number of Programs at the end of my Vista Home Basic
Silent Install.
The Installation proceeds fine and all the Programs install themselves without an issues.Yet inspite
of this I cannot get the Computer to reboot after the Programs have been installed.
I have been using a small command file to perform the reboot but unfortunately I cannot get it
to work.Here is my setupcomplete.cmd file

@echo off
TITLE Windows Vista Home Basic SP2   32K Edition - RunOnceEx Method of Silent Installation

ECHO Over the next few minutes you will see automated installations .
ECHO Of various software applications for windows Vista Home Basic 32K Edition together.
ECHO With Hotfixes no Drivers have been added.Some registry tweaks have been added.
ECHO The computer will restart automatically once the process has finished!

REG ADD HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx
SET KEY=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx

REG ADD %KEY% /V TITLE /D "Installing Applications" /f

REG ADD %KEY%\005 /VE /D "Installing Acronis Disk Director 10" /f
REG ADD %KEY%\005 /V 1 /D "%systemdrive%\Install\AcronisDiskDirector10\AcronisDiskDirector.msi PIDKEY=xxxxx-xxxxx-xxxxx-xxxxx-xxxxx /Qn /norestart" /f

REG ADD %KEY%\010 /VE /D "Installing Acronis TrueImage 11" /f
REG ADD %KEY%\010 /V 1 /D "%systemdrive%\Install\AcronisTrueImage11\AcronisTrueImage.msi PIDKEY=xxxxx-xxxxx-xxxxx-xxxxx-xxxxx /Qn /norestart" /f 

REG ADD %KEY%\015 /VE /D "Installing Adobe Flash Player 10 ActiveX" /f
REG ADD %KEY%\015 /V 1 /D "%systemdrive%\Install\AdobeFlashPlayer10_ActiveX\nstall_flash_player_10_active_x.exe /s" /f

REG ADD %KEY%\020 /VE /D "Installing Adobe Flash Player 10" /f
REG ADD %KEY%\020 /V 1 /D "%systemdrive%\Install\AdobeFlashPlayer10\install_flash_player_ax.exe /s" /f

REG ADD %KEY%\025 /VE /D "Installing Adobe Reader 9.1" /f
REG ADD %KEY%\025 /V 1 /D "%systemdrive%\Install\AdobeReader9.0\AdbeRdr910_en_US_Std.exe /sAll /rs" /f

REG ADD %KEY%\030 /VE /D "Installing Adobe Shockwave Player 11.5" /f
REG ADD %KEY%\030 /V 1 /D "%systemdrive%\Install\AdobeShockwavePlayer11.5\sw_lic_full_installer.msi /qn /norestart" /f

REG ADD %KEY%\035 /VE /D "Installing Klcodec 4.9" /f
REG ADD %KEY%\035 /V 1 /D "%systemdrive%\Install\klcodec4.9\klcodec495f.exe /verysilent" /f

REG ADD %KEY%\040 /VE /D "Installing Nero 7.5.9 Premium" /f
REG ADD %KEY%\040 /V 1 /D "%systemdrive%\Install\Nero7.5\Nero7.5.9.exe /quiet /norestart" /f

REG ADD %KEY%\045 /VE /D "Installing OO Defrag Professional 10.0" /f
REG ADD %KEY%\045 /V 1 /D "%systemdrive%\Install\OODefragPro10\O&O Defrag Professional Edition.msi /quiet" /f

REG ADD %KEY%\050 /VE /D "Installing Picasa 3.1" /f
REG ADD %KEY%\050 /V 1 /D "%systemdrive%\Install\Picasa3\picasa3-setup.exe /S /L" /f

REG ADD %KEY%\055 /VE /D "Installing PowerDVD 7.0" /f
REG ADD %KEY%\055 /V 1 /D "%systemdrive%\Install\Powerdvd\PowerDVD7.0.exe" /f

REG ADD %KEY%\060 /VE /D "Installing Registry Tweaks" /f
REG ADD %KEY%\060 /V 1 /D "REGEDIT /S %systemroot%\Setup\Scripts\tweaks.reg" /f

REG ADD %KEY%\065 /VE /D "Installing TuneUp Utilities 2008" /f
REG ADD %KEY%\065 /V 1 /D "%systemdrive%\Install\TuneUpUtilities2008\TU2008TrialEN.exe /qn /norestart" /f

REG ADD %KEY%\070 /VE /D "Installing WhiteCap 5.2" /f
REG ADD %KEY%\070 /V 1 /D "%systemdrive%\Install\WhiteCap5.2\WhiteCap_520.exe /S" /f 

REG ADD %KEY%\075 /VE /D "Installing WinRar Crystal" /f
REG ADD %KEY%\075 /V 1 /D "%systemdrive%\Install\WinRarCrystal\WinRAR_Crystal.exe /s" /f 

REG ADD %KEY%\085 /VE /D "Rebooting The Computer" /f
REG ADD %KEY%\085 /V 1 /D "%systemdrive%\Install\Tools\Reboot.cmd"/f  


I am calling the Reboot in the last line of this file.In my tools folder which I have in
$OEM$\Install\Tools I am using Reboot.cmd to perform the reboot.

@echo off
ECHO Rebooting Computer 
ECHO Please wait...
start /wait %systemdrive%\Install\Tools\shutdown.exe -r -t 60 -c "Windows Vista will reboot in 60 secondes"


If anyone could advise me where I am going wrong I would be most greatfull.

I have also tried this line at the end of setupcomplete.cmd
shutdown.exe -r -t 60 -c "Windows Vista will reboot in 60 secondes"
but this only ends up bt corrupting the Task and Side Bars in Vista as well as not perfroming
the Reboot.In addition to this I have also experimented with psshutdown.exe by placing it in my
Tools Folder but psshutdown dose net appearer to work in Vista.

How to remove advertisement from MSFN



    Gustatus similis pullus

  • Supervisor
  • 11,021 posts
  • Joined 09-September 01
  • OS:Windows 8.1 x64
  • Country: Country Flag


Note that shutdown.exe is already a part of the OS, and you may be using an incompatible version (since it's not the one in system32, I'm assuming it's a tool you've gotten elsewhere, like a reskit). Consider calling the one in %windir%\system32 instead.
MCTS Windows Internals, MCITP Server 2008 EA, MCTS MDT/BDD, MCSE/MCSA Server 2003, Server 2012, Windows 8
Please read the rules before posting!
Please consider donating to MSFN to keep it up and running!

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users