• Announcements

    • xper

      MSFN Sponsorship and AdBlockers!   07/10/2016

      Dear members, MSFN is made available via subscriptions, donations and advertising revenue. The use of ad-blocking software hurts the site. Please disable ad-blocking software or set an exception for MSFN. Alternatively, become a site sponsor and ads will be disabled automatically and by subscribing you get other sponsor benefits.
Sign in to follow this  
Followers 0
chrisbraines

Reboot Not Working in setupcomplete.cmd

2 posts in this topic

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.
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


EXIT

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.
ECHO.
ECHO Rebooting Computer
ECHO Please wait...
start /wait %systemdrive%\Install\Tools\shutdown.exe -r -t 60 -c "Windows Vista will reboot in 60 secondes"
ECHO.Done

EXIT

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.

0

Share this post


Link to post
Share on other sites

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.

0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0

  • Recently Browsing   0 members

    No registered users viewing this page.