June 7, 200818 yr I have a folder called DRIVERS that I place in SOURCE along side I386.All I want is to have HFSLIP copy the folder to c:\I'm content to install the drivers myself.In nLite 1.4.5 I can accomplish this by entering this GUIRunOnce command:XCOPY %SOURCE%DRIVERS %SYSTEMDRIVE%\DRIVERS\ /S/YNote. %SOURCE% includes the \, but %SYSTEMDRIVE% does not include the \thus, this translates into...XCOPY D:\DRIVERS C:\DRIVERS\ /S/YIn HFSLIP 1.7.7 I tried adding a file a BATCH file under HFGUIRUNONCE, but it didn't work!Here's what I did... HFSLIP\HFGUIRUNONCE\MYDRIVERS.BAT MYDRIVERS.BAT contains this one line: XCOPY D:\DRIVERS C:\DRIVERS\ /S/YIt seems like this should work, but it doesn't. But, I'm thinking there must be a way to do this.Is there a way to accomplish this in HFSLIP, so I don't have to run nLite?And if there is a way, is there a variable I can use for the source drive, in nLite %SOURCE% translates into D:\ or the drive letter that contains the source of the install.I'm new to using HFSLIP, and I'm impressed with how much I've been able to do so far.Thank you,Lilla Edited June 7, 200818 yr by Lilla
June 8, 200818 yr It probably fails because the directory doesn't exist or that the CD drive is not drive D.If this is for Windows XP, you can do it like this:FOR /F "TOKENS=3" %%I IN ('REG QUERY HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Setup /v SourcePath') DO SET SOURCE=%%IMD %SYSTEMDRIVE%\DRIVERSXCOPY %SOURCE%DRIVERS %SYSTEMDRIVE%\DRIVERS /S/Y
June 8, 200818 yr Author Tomcat76, thank you, that piece of code was the magic I needed to get the %SOURCE% variable.I figured out along the way that I needed to rename my batch/command file from .bat to .cmd for HFSLIP. Once I renamed the file to .cmd, the simple batch/command file I posted initially worked.Below is my final batch/command file with documentation for anyone that might have a similar need.REM MYDRIVERS.cmdREM Processor: Intel Pentium 4 2.0GHzREM OS: Windows XP Pro 32bit with SP3 integratedREMREM My DRIVERS folder is located along side the I386 folderREM This batch/command file will copy my DRIVERS folder to drive c:\REM I will install the drivers myself.REMREM This batch/command file is used with HFSLIP (1.7.7)REM Place this batch file in folder HFSLIP\HFGUIRUNONCEREM This file was renamed from .bat to .cmd because HFSLIP expects .cmdREM During the XP install, this file doesn't get executed if .bat is used.REMREM below, %SOURCE% is the drive letter (includes trailing \), example: D:\REM below, %SYSTEMDRIVE% is the drive letter (excludes trailing \), example: C:REM the \ after the 2nd DRIVERS is required; if omitted you will receive REM a prompt asking if you are copying a folder or a file.REM EXIT is requiredFOR /F "TOKENS=3" %%I IN ('REG QUERY HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Setup /v SourcePath') DO SET SOURCE=%%IXCOPY %SOURCE%DRIVERS %SYSTEMDRIVE%\DRIVERS\ /S /YEXIT
June 16, 200818 yr REM the \ after the 2nd DRIVERS is required; if omitted you will receive REM a prompt asking if you are copying a folder or a file.or make use of the /i parameter
June 16, 200818 yr Author REM the \ after the 2nd DRIVERS is required; if omitted you will receive REM a prompt asking if you are copying a folder or a file.or make use of the /i parameterThank you so much. I tested it and it works great and makes the command line easier to understand.I am now using /i.Lilla
Create an account or sign in to comment