Tomcat76 Posted November 6, 2005 Share Posted November 6, 2005 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 More sharing options...
Yzöwl Posted November 6, 2005 Share Posted November 6, 2005 In the HFSLIP_51030 or whichever you are using, change the :UPDATE_INIT to this:UPDATE_INITECHO @ECHO OFF>>SOURCESS\I386\SVCPACK\HFSLIP.CMDREM CLS >>SOURCESS\I386\SVCPACK\HFSLIP.CMDECHO IF EXIST %%SYSTEMROOT%%\SYSTEM32\CMDOW.EXE cmdow @ /HID >>SOURCESS\I386\SVCPACK\HFSLIP.CMDECHO Title HFSLIP >>SOURCESS\I386\SVCPACK\HFSLIP.CMDECHO 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.CMDGOTO EOF Link to comment Share on other sites More sharing options...
Tomcat76 Posted November 6, 2005 Author Share Posted November 6, 2005 Perfection. Thanks! Link to comment Share on other sites More sharing options...
Yzöwl Posted November 6, 2005 Share Posted November 6, 2005 (edited) You could even try the following version:UPDATE_INITECHO/@ECHO OFF^&SETLOCAL ENABLEEXTENSIONS>SOURCESS\I386\SVCPACK\HFSLIP.CMDECHO/FOR %%%%? IN (CMDOW.EXE) DO IF "%%%%~$PATH:?" NEQ "" CMDOW @ /HID>>SOURCESS\I386\SVCPACK\HFSLIP.CMDECHO/TITLE HFSLIP>>SOURCESS\I386\SVCPACK\HFSLIP.CMDECHO/IF EXIST %%~d0\%SVCPATH%I386\SVCPACK SET HFSLIP=%%~d0\I386 >>SOURCESS\I386\SVCPACK\HFSLIP.CMDGOTO EOFThe 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 November 6, 2005 by Yzöwl Link to comment Share on other sites More sharing options...
Tomcat76 Posted November 6, 2005 Author Share Posted November 6, 2005 (edited) 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 November 6, 2005 by Tomcat76 Link to comment Share on other sites More sharing options...
tommyp Posted November 6, 2005 Share Posted November 6, 2005 Yzöwl - I was using the %SVCPATH% to help out the multiboot guys. Would the script still work with that "other" path? Link to comment Share on other sites More sharing options...
Yzöwl Posted November 7, 2005 Share Posted November 7, 2005 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%I386If it was then mine should also sayIF EXIST %%~d0\%SVCPATH%I386\SVCPACK SET HFSLIP=%%~d0\%SVCPATH%I386I 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 More sharing options...
Tomcat76 Posted November 11, 2005 Author Share Posted November 11, 2005 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. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now