Help - Search - Members - Calendar
Full Version: Request for SVCPACK\HFSLIP.CMD
MSFN Forums > Member Contributed Projects > HFSLIP

   
Google Internet Forums Unattended CD/DVD Guide
Tomcat76
This is a minor thing but it would be nice if this were implemented when you have some time to spare.

The issue at hand is the path to CMDOW.EXE inside SVCPACK\HFSLIP.CMD (second line). This path is created while running HFSLIP, and the drive letter depends on where the Windows system is located from which the HFSLIP program is run.

Eg., when running HFSLIP from a system that's installed on the C: drive, HFSLIP will use this as the second line in SVCPACK\HFSLIP.CMD:

IF EXIST C:\WINNT\SYSTEM32\CMDOW.EXE cmdow @ /HID

This works if the new system will be installed on the C: drive, but not if it's going to be installed on a different drive. In that case, CMDOW.EXE will not be found, which in turn makes its integration useless.

I'm now editing SVCPACK\HFSLIP.CMD manually after the program has run so the second line reads like this:

IF EXIST %SYSTEMROOT%\SYSTEM32\CMDOW.EXE cmdow @ /HID

It works great.

Do you think it's worth altering the HFSLIP program to do this automatically?
Yzöwl
In the HFSLIP_51030 or whichever you are using, change the :UPDATE_INIT to this
CODE
:UPDATE_INIT
ECHO @ECHO OFF>>SOURCESS\I386\SVCPACK\HFSLIP.CMD
REM CLS >>SOURCESS\I386\SVCPACK\HFSLIP.CMD
ECHO IF EXIST %%SYSTEMROOT%%\SYSTEM32\CMDOW.EXE cmdow @ /HID >>SOURCESS\I386\SVCPACK\HFSLIP.CMD
ECHO Title HFSLIP >>SOURCESS\I386\SVCPACK\HFSLIP.CMD
ECHO 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:\%SVCPATH%I386\SVCPACK SET HFSLIP=%%%%i:\I386>>SOURCESS\I386\SVCPACK\HFSLIP.CMD
GOTO EOF
Tomcat76
Perfection. Thanks! thumbup.gif
Yzöwl
You could even try the following version
CODE
:UPDATE_INIT
ECHO/@ECHO OFF^&SETLOCAL ENABLEEXTENSIONS>SOURCESS\I386\SVCPACK\HFSLIP.CMD
ECHO/FOR %%%%? IN (CMDOW.EXE) DO IF "%%%%~$PATH:?" NEQ "" CMDOW @ /HID>>SOURCESS\I386\SVCPACK\HFSLIP.CMD
ECHO/TITLE HFSLIP>>SOURCESS\I386\SVCPACK\HFSLIP.CMD
ECHO/IF EXIST %%~d0\%SVCPATH%I386\SVCPACK SET HFSLIP=%%~d0\I386 >>SOURCESS\I386\SVCPACK\HFSLIP.CMD
GOTO EOF
The idea being that it uses cmdow.exe if located anywhere within %PATH%, not just %WINDIR%\system32. The other change I have implemented, is to remove the drive search. The HFSLIP.CMD runs from CD-ROM:\....\SVCPACK, therefore %~d0 should be the CD-ROM drive letter, without the need for a search.
Tomcat76
Having both run off the CD would probably be the cleanest solution. If not, copy to a temporary folder, run from there and then delete the folder.

Edit...
There's another advantage to having it run off the CD:
I have my main drive in four partitions: C, D, E and F, and the opticals are G and H. I'm installing Windows off of H. I still have the HFSLIP folders on drive E. Who's telling me that post-setup commands are run off the CD?
tommyp
Yzöwl - I was using the %SVCPATH% to help out the multiboot guys. Would the script still work with that "other" path?
Yzöwl
tommyp, I haven't changed what your previous code did, just the way it did it. However, I am unaware if your original was supposed to say.
DO IF EXIST %%%%i:\%SVCPATH%I386\SVCPACK SET HFSLIP=%%%%i:\%SVCPATH%I386
If it was then mine should also say
IF EXIST %%~d0\%SVCPATH%I386\SVCPACK SET HFSLIP=%%~d0\%SVCPATH%I386
I was just pointing out that the contents of svcpack are run from the cd, not copied to the hard-drive first.
Tomcat76
Yzöwl:
I tested the code in your previous post the other day and it works too.
So this one's running off the CD, right? I think I'll keep using this, then.
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.