MSFN Forums: how do i tell hfslip to copy my drivers folder to c:\ - MSFN Forums

Jump to content


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

how do i tell hfslip to copy my drivers folder to c:\ Rate Topic: -----

#1 User is offline   Lilla 

  • Newbie
  • Group: Members
  • Posts: 40
  • Joined: 11-May 05

Posted 07 June 2008 - 05:06 PM

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

This post has been edited by Lilla: 07 June 2008 - 05:40 PM


Ad Bot #1 User is online   Sponsor Icon

  • Advert Bot
  • Group: Ad Bots
  • Posts: 0
  • Joined: --

Warn Status

Warning level: 0%

0
  • +
  • -

#2 User is offline   Tomcat76 

  • MSFN Junkie
  • Icon
  • Group: Developers
  • Posts: 3,171
  • Joined: 08-August 05
  • Gender:Male
  • Location:Flanders, Belgium

Posted 07 June 2008 - 09:02 PM

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=%%I
MD %SYSTEMDRIVE%\DRIVERS
XCOPY %SOURCE%DRIVERS %SYSTEMDRIVE%\DRIVERS /S/Y


#3 User is offline   Lilla 

  • Newbie
  • Group: Members
  • Posts: 40
  • Joined: 11-May 05

Posted 08 June 2008 - 04:40 PM

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.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


#4 User is offline   mukke 

  • Newbie
  • Group: Members
  • Posts: 16
  • Joined: 25-January 08

Posted 15 June 2008 - 07:22 PM

View PostLilla, on Jun 9 2008, 12:40 AM, said:

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

#5 User is offline   Lilla 

  • Newbie
  • Group: Members
  • Posts: 40
  • Joined: 11-May 05

Posted 16 June 2008 - 11:25 AM

View Postmukke, on Jun 15 2008, 06:22 PM, said:

View PostLilla, on Jun 9 2008, 12:40 AM, said:

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

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic


1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users