Help - Search - Members - Calendar
Full Version: how do i tell hfslip to copy my drivers folder to c:\
MSFN Forums > Member Contributed Projects > HFSLIP

   
Google Internet Forums Unattended CD/DVD Guide
Lilla
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/Y
Note. %SOURCE% includes the \, but %SYSTEMDRIVE% does not include the \
thus, this translates into...
XCOPY D:\DRIVERS C:\DRIVERS\ /S/Y

In 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/Y

It 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
Tomcat76
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:

CODE
FOR /F "TOKENS=3" %%I IN ('REG QUERY HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Setup /v SourcePath') DO SET SOURCE=%%I
MD %SYSTEMDRIVE%\DRIVERS
XCOPY %SOURCE%DRIVERS %SYSTEMDRIVE%\DRIVERS /S/Y
Lilla
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.

CODE
REM MYDRIVERS.cmd
REM Processor: Intel Pentium 4 2.0GHz
REM OS: Windows XP Pro 32bit with SP3 integrated
REM
REM My DRIVERS folder is located along side the I386 folder
REM This batch/command file will copy my DRIVERS folder to drive c:\
REM I will install the drivers myself.
REM
REM This batch/command file is used with HFSLIP (1.7.7)
REM Place this batch file in folder HFSLIP\HFGUIRUNONCE
REM This file was renamed from .bat to .cmd because HFSLIP expects .cmd
REM During the XP install, this file doesn't get executed if .bat is used.
REM
REM 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 required

FOR /F "TOKENS=3" %%I IN ('REG QUERY HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Setup /v SourcePath') DO SET SOURCE=%%I
XCOPY %SOURCE%DRIVERS %SYSTEMDRIVE%\DRIVERS\ /S /Y
EXIT
mukke
QUOTE (Lilla @ Jun 9 2008, 12:40 AM) *
CODE
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
Lilla
QUOTE (mukke @ Jun 15 2008, 06:22 PM) *
QUOTE (Lilla @ Jun 9 2008, 12:40 AM) *
CODE
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


Thank you so much. I tested it and it works great and makes the command line easier to understand.
I am now using /i.

Lilla
Google Internet Forums Unattended CD/DVD Guide
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.