Jump to content

Request for SVCPACK\HFSLIP.CMD


Tomcat76

Recommended Posts

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?

Link to comment
Share on other sites


In the HFSLIP_51030 or whichever you are using, change the :UPDATE_INIT to this

: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

Link to comment
Share on other sites

You could even try the following version

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

Edited by Yzöwl
Link to comment
Share on other sites

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?

Edited by Tomcat76
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...