gn!uz Posted January 24, 2008 Posted January 24, 2008 (edited) Hi, this topic is rather old but I have a related question.. I'm trying to figure out if it is possible to create a C:\i386 sourcefolder out of the C:\$WIN_NT$.~LS folder...We are deploying our images through Radia. Basically I want to create a C:\i386 without the need of a networkshare or a CD... Is this possible at all?Anyone? Thanks a lot! Edited January 24, 2008 by gn!uz
zeezam Posted April 6, 2008 Posted April 6, 2008 (edited) I'm trying with this also...Doesn't this work?@ECHO OFFfor %%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:XCOPY %CDROM%\I386 %windir%\Driver Cache\I386 /H/S/E/C/F/R/KWhat is the switch for overwrite without asking?From the beginning there is like two files in the i386 folder and proberly it will ask to overwrite them.Is it best to run a DEL of those two files first or make a overwrite switch somehow? Edited April 6, 2008 by zeezam
Yzöwl Posted April 6, 2008 Posted April 6, 2008 @ zeezam - To whom are you replying?Your response doesn't appear to follow on from any other here!
zeezam Posted April 7, 2008 Posted April 7, 2008 @ zeezam - To whom are you replying?Your response doesn't appear to follow on from any other here!I'm trying to make a simple script that copies all content in i386 from CD to C:\WINDOWS\Driver Cache\i386 folder.
Martin H Posted April 7, 2008 Posted April 7, 2008 (edited) @ zeezam - For next time, then use '/?' to list available switches for a cmd command. The one you're looking for is '/y'(overwrite without prompting). Also, you need double-quotes when theres spaces in command-lines.Tip: You can set all wanted xcopy switches after eachother(like e.g. '/eh' instead of '/e /h'). Also, non-existing destination folders are always auto-generated by xcopy when using a backslash after the folder name. If run from CD(WinXP version) :@echo offsetlocal enableextensionsset src=%~d0\I386 set dest=%systemdrive%\I386\set key=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Setupxcopy %src% %dest% /ereg add %key% /v "Installation Sources" /t reg_multi_sz /d "%dest%\0" /freg add %key% /v SourcePath /d "%dest%" /freg add %key% /v ServicePackSourcePath /d "%dest%" /fendlocalIf not run from CD(WinXP version) :@echo offfor %%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 src=%%i:\I386set dest=%systemdrive%\I386\set key=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Setupxcopy %src% %dest% /ereg add %key% /v "Installation Sources" /t reg_multi_sz /d "%dest%\0" /freg add %key% /v SourcePath /d "%dest%" /freg add %key% /v ServicePackSourcePath /d "%dest%" /fI don't really understand how there can be files left in '%systemdrive%\I386\' upon a fresh install, but if you somehow have that, then add the '/y' switch to the 'xcopy' command-line.Edit: Sorry, after re-reading your post, then i can now see that you wan't to use the destination path: '%windir%\Driver Cache\i386\', so you'll then need to change the script alittle, then... Edited April 7, 2008 by Martin H
oahiyeel Posted May 20, 2008 Posted May 20, 2008 Here's a small script that I wrote that does just what you're looking for. The only difference is that it copies i386 to the %SystemRoot% directory instead of %SystemDrive%. Also, it makes the appropriate registry entries so that the workstation will look to that directory for the i386 source.Dim ws, fs, windir, colDrives, objDrive, strCDSet ws = WScript.CreateObject("WScript.Shell")Set fs = CreateObject("Scripting.FileSystemObject")windir = ws.ExpandEnvironmentStrings ("%SYSTEMROOT%")Set colDrives = fs.DrivesFor Each objDrive in colDrives If fs.FileExists(objDrive.DriveLetter & ":\WIN51") Then strCD = objDrive.DriveLetter & ":"NextSub CopySource Dim strKeyPath strKeyPath = "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Setup\" fs.CopyFolder (strCD & "\i386"), (windir & "\i386"),True If fs.FolderExists(windir & "\i386\svcpack") Then fs.DeleteFolder(windir & "\i386\svcpack"),True ws.RegWrite strKeyPath & "SourcePath", "%systemroot%\\i386\\", "REG_SZ" ws.RegWrite strKeyPath & "ServicePackSourcePath", "%systemroot%\\i386\\", "REG_SZ"End SubCopySourceSorry, I'm quite new at this. Where should i put this script on the CD?
Martin H Posted May 21, 2008 Posted May 21, 2008 Please read MSFN's 'Unatttended' installation source guide, linked at the top of this forum...
purkleturkle Posted July 3, 2008 Posted July 3, 2008 Here's a small script that I wrote that does just what you're looking for. The only difference is that it copies i386 to the %SystemRoot% directory instead of %SystemDrive%. Also, it makes the appropriate registry entries so that the workstation will look to that directory for the i386 source.Dim ws, fs, windir, colDrives, objDrive, strCDSet ws = WScript.CreateObject("WScript.Shell")Set fs = CreateObject("Scripting.FileSystemObject")windir = ws.ExpandEnvironmentStrings ("%SYSTEMROOT%")Set colDrives = fs.DrivesFor Each objDrive in colDrives If fs.FileExists(objDrive.DriveLetter & ":\WIN51") Then strCD = objDrive.DriveLetter & ":"NextSub CopySource Dim strKeyPath strKeyPath = "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Setup\" fs.CopyFolder (strCD & "\i386"), (windir & "\i386"),True If fs.FolderExists(windir & "\i386\svcpack") Then fs.DeleteFolder(windir & "\i386\svcpack"),True ws.RegWrite strKeyPath & "SourcePath", "%systemroot%\\i386\\", "REG_SZ" ws.RegWrite strKeyPath & "ServicePackSourcePath", "%systemroot%\\i386\\", "REG_SZ"End SubCopySourceI relise this is an old post but maybe Rouge Spear you could tell me something. I am using your CopySource.vbs script and it seems to work well apart from two things. If I run a windiff to compare the i386 folder on the CDROM compared to the %systemroot%\i386 I am getting the following differences.. It is not copying these files across..\svcpack\branches.inf ..........only in D:\I386.\svcpack\hfint.dat ..........only in D:\I386.\svcpack\idnmitigationapis.ca_ ..........only in D:\I386.\svcpack\ie7.ca_ ..........only in D:\I386.\svcpack\kb915865.ca_ ..........only in D:\I386.\svcpack\kb915865.exe ..........only in D:\I386.\svcpack\kb923789.exe ..........only in D:\I386.\svcpack\kb941569.ca_ ..........only in D:\I386.\svcpack\kb941569.exe ..........only in D:\I386.\svcpack\kb942763.ca_ ..........only in D:\I386.\svcpack\kb950759-ie7.ca_ ..........only in D:\I386.\svcpack\kb950759-ie7.exe ..........only in D:\I386.\svcpack\kb950760.ca_ ..........only in D:\I386.\svcpack\kb950760.exe ..........only in D:\I386.\svcpack\kb950762.ca_ ..........only in D:\I386.\svcpack\kb951376.ca_ ..........only in D:\I386.\svcpack\kb951698.ca_ ..........only in D:\I386.\svcpack\mscomppackv1.ca_ ..........only in D:\I386.\svcpack\mscomppackv1.exe ..........only in D:\I386.\svcpack\nlsdownlevelmapping.ca_ ..........only in D:\I386.\svcpack\wmfdist11.ca_ ..........only in D:\I386.\svcpack\wmfdist11.exe ..........only in D:\I386.\svcpack\wmp11.ca_ ..........only in D:\I386.\svcpack\wmp11.exe ..........only in D:\I386.\svcpack\wudf01000.ca_ ..........only in D:\I386.\svcpack\wudf01000.exe ..........only in D:\I386-- 26 files listedThese appear to be the post sp3 hotfixes I have applied and WM11 and IE7. The second problem is that if I run you script manually, to test it I get the following error, I don't know if this has anything to do with the problem. It still continues to do the copy even with this error though.Windows - Drive Not Ready - Exception Processing Message c00000a3 parameters 75b6bf7c 75b6bf7c 75b6bf7cAny help would be apreiciated.
Martin H Posted July 4, 2008 Posted July 4, 2008 The script deletes '%windir%\I386\svcpack\' if it exists, after the copying has finished...Delete these two lines : If fs.FolderExists(windir & "\i386\svcpack") Then fs.DeleteFolder(windir & "\i386\svcpack"),True
purkleturkle Posted July 7, 2008 Posted July 7, 2008 Brilliant thanks very much for the quick reply Martin.
purkleturkle Posted July 8, 2008 Posted July 8, 2008 (edited) The script deletes '%windir%\I386\svcpack\' if it exists, after the copying has finished...Delete these two lines : If fs.FolderExists(windir & "\i386\svcpack") Then fs.DeleteFolder(windir & "\i386\svcpack"),TrueOkay this may be a silly question, but why would you not want to copy the svcpack? Also always when I have changed the Source paths manually I have used 4 registry keys. I see an extra key that is in Yzowl that isn't in RougeSpears, am I missing something. The ones I normally use are.HKLM\Software\Microsoft\Windows\CurrentVersion\Setup\Installation SourcesHKLM\Software\Microsoft\Windows\CurrentVersion\Setup\ServicePackSourcePathHKLM\Software\Microsoft\Windows\CurrentVersion\Setup\SourcePathHKLM\Software\Microsoft\WindowsNT\CurrentVersion\SourcePath Edited July 8, 2008 by purkleturkle
Martin H Posted July 12, 2008 Posted July 12, 2008 Okay this may be a silly question, but why would you not want to copy the svcpack?On a clean untouched Windows CD/ISO, there isn't any svcpack folder, and that folder is either custom made, or added by integrating updates with the '/integrate' switch and so many times you will not need that folder in the paths...I see an extra key that is in Yzowl that isn't in RougeSpears, am I missing something. "Installation Sources" stores all the possible locations for Windows to check for installation files...The two others, are 'SourcePath' which stores the default location where Windows checks for an installation CD and is by default set as the first CD-drive and 'ServicePackSourcePath' which stores the default location where the last service pack where installed from...
Noise Posted July 12, 2008 Posted July 12, 2008 If you are using WINNT32.EXE to install XP you can use the /COPYDIR:I386 switch. It works fine for me, you end up with the Installation files in C:\WINDOWS\I386. It doesn't seem to take any longer to install either. Then you just load a regfile or write a script to change the sourcepath locations.
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now