aspenjim Posted May 31, 2005 Share Posted May 31, 2005 I've been doing unattended installs for quite some time now, but have never learned how to do basic things like copying the i386 directory to HD and resetting sourcepath to c:\i386. Would someone give me several examples of the portion of the winnt.sif that would accomplish this for me.TIAaj Link to comment Share on other sites More sharing options...
jbm Posted May 31, 2005 Share Posted May 31, 2005 I use this cmd file that someone posted awhile ago.you may want to edit it to suit your needs.I run it in my runonceex.cmd file.cmdow @ /HID@ECHO OFF@ECHO OFFIF EXIST C:\WIN51IP set CDROM=C:IF EXIST D:\WIN51IP set CDROM=D:IF EXIST E:\WIN51IP set CDROM=E:IF EXIST F:\WIN51IP set CDROM=F:IF EXIST G:\WIN51IP set CDROM=G:IF EXIST H:\WIN51IP set CDROM=H:IF EXIST I:\WIN51IP set CDROM=I:IF EXIST J:\WIN51IP set CDROM=J:IF EXIST K:\WIN51IP set CDROM=K:IF EXIST L:\WIN51IP set CDROM=L:IF EXIST M:\WIN51IP set CDROM=M:IF EXIST N:\WIN51IP set CDROM=N:IF EXIST O:\WIN51IP set CDROM=O:IF EXIST P:\WIN51IP set CDROM=P:IF EXIST Q:\WIN51IP set CDROM=Q:IF EXIST R:\WIN51IP set CDROM=R:IF EXIST S:\WIN51IP set CDROM=S:IF EXIST T:\WIN51IP set CDROM=T:IF EXIST U:\WIN51IP set CDROM=U:IF EXIST V:\WIN51IP set CDROM=V:IF EXIST W:\WIN51IP set CDROM=W:IF EXIST X:\WIN51IP set CDROM=X:IF EXIST Y:\WIN51IP set CDROM=Y:IF EXIST Z:\WIN51IP set CDROM=Z:ECHO Please wait, Recovery Console is being installed locally.%CDROM%\i386\winnt32.exe /dudisable /cmdcons /unattendmd %systemroot%\Source\i386ECHO Please wait, source files are being copied. This may take several minutes.xcopy /Y /E /H %CDROM%\i386\*.* %systemroot%\Source\i386\ECHO Adding registry entries.regedit.exe /s %CDROM%\Install\Source.regECHO Done.EXITAnd here's the reg fileWindows Registry Editor Version 5.00[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Setup]"SourcePath"="%systemroot%\\Source\\""ServicePackSourcePath"="%systemroot%\\Source\\" Link to comment Share on other sites More sharing options...
Dumpy Dooby Posted May 31, 2005 Share Posted May 31, 2005 You could shrink that first one down by using the following:cmdow @ /HID@ECHO OFF@ECHO OFFfor %%i in (C 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:\WIN51IP set CDROM=%%i:ECHO Please wait, Recovery Console is being installed locally.%CDROM%\i386\winnt32.exe /dudisable /cmdcons /unattendmd %systemroot%\Source\i386ECHO Please wait, source files are being copied. This may take several minutes.xcopy /Y /E /H %CDROM%\i386\*.* %systemroot%\Source\i386\ECHO Adding registry entries.regedit.exe /s %CDROM%\Install\Source.regECHO Done.EXITYou'll get the exact same results, it's just not a cluttered file. Link to comment Share on other sites More sharing options...
aspenjim Posted June 13, 2005 Author Share Posted June 13, 2005 Okay,It copied the i386 directory inside the windows directory. What can I change to have it copy to root of the c drive? Link to comment Share on other sites More sharing options...
jbm Posted June 13, 2005 Share Posted June 13, 2005 Okay,It copied the i386 directory inside the windows directory. What can I change to have it copy to root of the c drive?<{POST_SNAPBACK}>change xcopy /Y /E /H %CDROM%\i386\*.* %systemroot%\Source\i386\to xcopy /Y /E /H %CDROM%\i386\*.* %systemdrive%\Source\i386\assuming C: is your systemdrive, otherwise just change %systemdrive%to C:\ you'll also need to make the neccessary changes to the reg file. Link to comment Share on other sites More sharing options...
jbm Posted June 13, 2005 Share Posted June 13, 2005 You'll get the exact same results, it's just not a cluttered file.<{POST_SNAPBACK}>It's also easier to copy and paste when yo want to create a newfile. Link to comment Share on other sites More sharing options...
aspenjim Posted June 13, 2005 Author Share Posted June 13, 2005 I already tried that (i thought). When I type in %systemroot% in the run box, it brings up the windows directory (same as %windir%).Thanksaj Link to comment Share on other sites More sharing options...
Yzöwl Posted June 13, 2005 Share Posted June 13, 2005 (edited) I think you're looking for%SYSTEMDRIVE%Here's my version of the above, the differences being the path you've stated, I have removed the cmdow which will defeat the object of all your echoes, I have used robocopy, which should be in the same directory as this batch, I have added the registry entries directly from the batch instead of using the reg file and finally if you need it, installed the recovery console from the hard drive instead of the CD@echo off&setlocal enableextensionsset hdsrc=%systemdrive%\set drive=d e f g h i j k l m n o p q r s t u v w x y zset xptag=\WIN51for %%a in (%drive%) do if exist "%%a:%xptag%" set CDROM=%%a:if not exist %hdsrc%I386 md %hdsrc%I386echo Please wait, source files are being copied. This may take several minutes.%~dp0robocopy.exe %CDROM%\I386 %hdsrc%I386 /e /copy:da /r:30 /w:10 /a-:recho Adding registry entries.reg add HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Setup /v SourcePath /d "%hdsrc%" /freg add HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Setup /v ServicePackSourcePath /d "%hdsrc%" /fecho Please wait, Recovery Console is being installed locally.start "" /wait %hdsrc%\winnt32.exe /dudisable /cmdcons /unattendendlocal&goto :eof Edited June 13, 2005 by Yzöwl Link to comment Share on other sites More sharing options...
aspenjim Posted June 14, 2005 Author Share Posted June 14, 2005 Very nice...Well done...can't wait to try it outaj Link to comment Share on other sites More sharing options...
MAVERICKS CHOICE Posted June 14, 2005 Share Posted June 14, 2005 Excellent piece of script Yzowl, I'll certainly be bookmarkin that one. Link to comment Share on other sites More sharing options...
gunsmokingman Posted June 14, 2005 Share Posted June 14, 2005 Here is a script that I use.1\ Check to see if the XPCD is on %systemdrive%2\ If it not there then it build the work directory3\ If It is then it checks to see if XP is in the CD drive4\ If it not there then it gives the option to quit or it ask to place the XP Cd In the CD Drive5\ If the work directory is there and it the correct CDthen it start the copy.The ping cmd is a way to pause the script with out using Sleep.exeEcho OffCLS && Color 1F && Mode 65,5 && Title Ua Build Directory And Copyfor %%i in (C: 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\SETUP.exe set CDROM=%%iif exist %systemdrive%\XPCD\ goto 000if not exist %systemdrive%\XPCD\ goto 001:000CLS && Color F1 && Mode 55,5 Echo. && echo The Work directory Was Thereping -n 2 127.0.0.1>nulgoto CopyCd2HD:001CLSCOLOR A0ECHO Make Work DirectoryPING -N 3 127.0.0.1>NULmkdir %systemdrive%\XPCD\$OEM$\mkdir %systemdrive%\XPCD\$OEM$\$1\mkdir %systemdrive%\XPCD\$OEM$\$1\Driversmkdir %systemdrive%\XPCD\$OEM$\$1\Drivers\002_graphicsmkdir %systemdrive%\XPCD\$OEM$\$1\Drivers\004_soundmkdir %systemdrive%\XPCD\$OEM$\$1\Installmkdir %systemdrive%\XPCD\$OEM$\$$\Fontsmkdir %systemdrive%\XPCD\$OEM$\$$\Mediamkdir %systemdrive%\XPCD\$OEM$\$$\Resources\Themesmkdir %systemdrive%\XPCD\$OEM$\$$\System32mkdir %systemdrive%\XPCD\$OEM$\$$\Web\Wallpapermkdir %systemdrive%\XPCD\Appsmkdir %systemdrive%\XPCD\i386ECHO Completed Building The Work Directory!ping -n 3 127.0.0.1>NULgoto CopyCd2HD:CopyCd2HDIf exist %cdrom%\setup.exe goto CopyCdIf Not exist %cdrom%\setup.exe goto User:UserCLS && Color 4f && Mode 65,8 && Title User make A Selection?Echo Please Insert The XP Cd To Continue Echo.Echo Type Yes To Continue && Echo Type Quit To Exitecho.SET Choice=SET /P Choice=Type Yes Or Quit and press Enter: IF NOT '%choice%'=='' SET select=%choice:~0,9%IF /I '%choice%'=='Yes' GOTO CopyCdIF /I '%choice%'=='Quit' GOTO end2IF /I '%Choice%'=='%Choice%' GOTO OPS:OPSCLS && MODE 55,3 && COLOR 9FECHO. && ECHO NOT A VALID SELECTIONping -n 3 127.0.0.1>nulGOTO User:MissingCLS && MODE 55,3 && Color 9eEcho.Echo Please Insert The Cdping -n 3 127.0.0.1>nulgoto User:CopyCdIf Not exist %cdrom%\setup.exe goto Missingclsmode 97,5color 0eECHO Begin The Copy?ping -n 2 127.0.0.1>nulxcopy %cdrom%\...\...\ %systemdrive%\XPCD\ /S /E /W /F /I /vcls && mode 55,3 && color f9 && Title Copy Completed!ECHO. && ECHO Copy To Hard Drive Completed!echo.PING -N 4 127.0.0.1>NULgoto End1:End1CLS && Color f3 && Mode 55,3 && Title Completed Copyecho. && Echo Goodbye The Script Is Completed!ping -n 4 127.0.0.1>nulgoto EOFExit:end2CLS && Color f3 && Mode 55,3 && Title User Selected To Exitecho. && Echo User Has Selected To Quit This Script && Ping -n 3 127.0.0.1>nulgoto EOFExit Link to comment Share on other sites More sharing options...
aspenjim Posted June 19, 2005 Author Share Posted June 19, 2005 Yowzl...many thanks.one question... it always asks for confirmation of overwriting the reg entries regarding the sourcepath. Is there anyway to have it automatically make the entry?Oops.... one more question.... what does the /f switch do?i made great progress this weekend.... got my runonceex.cmd to work properly the first time (using the guide) and was able to have reader 7.01, jre 1.5 and netfxsp1 to install (unattended).thanks againaj Link to comment Share on other sites More sharing options...
aspenjim Posted June 19, 2005 Author Share Posted June 19, 2005 Yowzl...many thanks.one question... it always asks for confirmation of overwriting the reg entries regarding the sourcepath. Is there anyway to have it automatically make the entry?Oops.... one more question.... what does the /f switch do?i made great progress this weekend.... got my runonceex.cmd to work properly the first time (using the guide) and was able to have reader 7.01, jre 1.5 and netfxsp1 to install (unattended).thanks againaj Link to comment Share on other sites More sharing options...
dlevens Posted June 19, 2005 Share Posted June 19, 2005 (edited) wow, talk about using a sledge hammer to kill a fly. Keep it simple. This is how I do it.Call install.cmd from winnt.sif[GuiRunOnce] command9= "%SystemDrive%\install.cmd"install.cmd located in $OEM$\$1@ECHO OFFrem find the CDROM letter ...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:\WIN51 SET cdrom=%%i:rem copies i386 to hard drive ...ECHO Please wait, source files are being copied. This may take several minutes.xcopy %CDROM%\i386\*.* %SystemDrive%\Support\i386\ /e /i /h /yrem adds source location for i386 to registryECHO Adding registry entries.reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Setup" /v "Installation Sources" /t REG_MULTI_SZ /d "%SystemDrive%\Support\i386" /freg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Setup" /v SourcePath /d %SystemDrive%\Support /freg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Setup" /v ServicePackSourcePath /d %SystemDrive%\Support /freg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v SourcePath /d %SystemDrive%\Support\I386 /frem runs cleanup scriptstart %cdrom%\install\cleanup.cmdexitinstall.cmd Edited June 19, 2005 by dlevens Link to comment Share on other sites More sharing options...
Corn~Julio Posted June 19, 2005 Share Posted June 19, 2005 Howdy I'm An Unattended Newbie Still Tweaking And Reloading Over And Over, And I Just Didn't Want The Added Time Of Copying The Files To The Hard Drive Over And Over, But Still Wanted Access To Them After Install & While Comparing The Answer Files From The UA, Sysprep And RIS Answer Files, I Found This In The RIS[setupMgr] DistFolder=C:\windist DistShare=windistI Know This Is Not A Remote Install And Not What Ur Asking For, For Myself I Figured It Was Worth The Try, Really I'm Not Sure If This Option Is Good, Bad Or If Windows Knows Its There, But I Get No Errors When Winnt.Sif LoadsAny Way I Copied The Files To A Small Partition For Keeping And Adjusted The Path AccordinglyMaybe This Can Help Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now