Jump to content

XP Pro Unattended reboot issue


Dirk

Recommended Posts

I can't seem to figure this one out. My issue is simply this:

I created a Windows 2000 unattended install using the guidelines from this forum. Worked like a charm. Now I am building an XP Pro SP2 unattended install. I am using install.cmd to copy my I386 folder, and insert my install.reg file into the registry. This all works fine, but at the end of my batch file I have a call to shutdown.exe that I can't seem to get to run. I have other calls to this file in the install.reg that work fine. My install.cmd file is below. Any help is greatly appreciated. I've been searching the forum for a while and can't really seem to find this mentioned anywhere.

@ECHO OFF

IF EXIST C:\hdd.txt set HDD=C:

IF EXIST D:\cd.txt set CDROM=D:

IF EXIST E:\cd.txt set CDROM=E:

IF EXIST F:\cd.txt set CDROM=F:

IF EXIST G:\cd.txt set CDROM=G:

IF EXIST H:\cd.txt set CDROM=H:

IF EXIST I:\cd.txt set CDROM=I:

IF EXIST J:\cd.txt set CDROM=J:

IF EXIST K:\cd.txt set CDROM=K:

IF EXIST L:\cd.txt set CDROM=L:

IF EXIST M:\cd.txt set CDROM=M:

IF EXIST N:\cd.txt set CDROM=N:

IF EXIST O:\cd.txt set CDROM=O:

IF EXIST P:\cd.txt set CDROM=P:

IF EXIST Q:\cd.txt set CDROM=Q:

IF EXIST R:\cd.txt set CDROM=R:

IF EXIST S:\cd.txt set CDROM=S:

IF EXIST T:\cd.txt set CDROM=T:

IF EXIST U:\cd.txt set CDROM=U:

IF EXIST V:\cd.txt set CDROM=V:

IF EXIST W:\cd.txt set CDROM=W:

IF EXIST X:\cd.txt set CDROM=X:

IF EXIST Y:\cd.txt set CDROM=Y:

IF EXIST Z:\cd.txt set CDROM=Z:

REGEDIT /s %HDD%\Install.reg >>%HDD%\install.log

ECHO "Preparing system for program installations . . ."

ECHO "Copying Windows CD to hard drive . . ."

ECHO "Please Wait . . ."

md %HDD%\I386 >>%HDD%\install.log

xcopy %CDROM%\I386\*.* %HDD%\I386\ /e/i/y >>%HDD%\install.log

shutdown.exe -r -f -t 10 "Rebooting in 10 seconds . . ."

EXIT

Link to comment
Share on other sites


add this to the front of the shutdown string.

%windir%\system32\

And this add a -c before the ""

So the new shutdown string should look like this:

%windir%\system32\shutdown.exe -r -f -t 10 -c "Rebooting in 10 seconds..."

This works fine for me.

Hatefulsorrow

P.S. Also for the CD check you can use this string to check all drive letters at once.

FOR %%i IN (D E F G H I J K L M N O P Q R S T U V W X Y Z) DO IF EXIST %%i:\CD.txt SET CDROM=%%i:

Edited by Hatefulsorrow
Link to comment
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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...