Windows Install Autorun

rem @echo off
goto mount

:mount
echo Mounting drive
sleep 5
net use W: “\\\\fileserver\\Images\\Windows XP” password /USER:domainusername

IF %ERRORLEVEL% NEQ 0 goto mount else goto setup

:setup
echo Start Install
sleep 5
start “Windows Setup” /wait W:i386winnt32.exe /syspart:x: /tempdrive:x: /unattend10:W:i386winnt.sif /makelocalsource

IF %ERRORLEVEL% NEQ 0 goto setup else goto unmount

:unmount
echo Disconnect Drive
sleep 10
net use W: /delete

exit

Comments are closed.