MSFN Forum: Using WPI to install apps from a separate CD - MSFN Forum

Jump to content



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

Using WPI to install apps from a separate CD Changes to WPI.cmd to install apps from a CD other than Windows CD. Rate Topic: -----

#1 User is offline   paradox355 

  • Group: Members
  • Posts: 6
  • Joined: 03-February 05

  Posted 16 May 2006 - 09:36 AM

I've searched for a post about this and couldn't find anything, but I think I may have figured it out. What I want to do is keep one CD with just Windows w/current hotfixes and one CD with current drivers/apps that I want to install. And I want the Windows installation to call the installation of the drivers/apps from the other CD. The reason for this is I can keep my Windows CD intact and only have to modify my drivers/apps CD for newer versions or changes for apps that I want to install.

I figure WPI is an excellent choice for installing the drivers/apps this way, I just need to be able to call WPI from the Windows installation while having it run from a different CD. After editing the WPI.cmd this is what I came up with:

I changed the CD-check file from WPI.ico to CD.txt to establish the %CDROM% variable. I did this because I need to check the drives/apps CD for the WPI.ico file to make sure the right CD is in the drive. Of course there will now have to be a CD.txt file at the root of both CDs.


REM Example, how to look for CDROM-drive. Must have WPI.ico at the root of the CD.
for %%i in (C 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:\WPI.ico set CDROM=%%i:
echo Found CD-Rom as drive %CDROM%


changed to:

REM Example, how to look for CDROM-drive. Must have CD.txt at the root of the CD.
for %%i in (C 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:\CD.txt set CDROM=%%i:
echo Found CD-Rom as drive %CDROM%


I then added these lines to check for the correct CD before continuing with WPI:

REM Determine if CD in CDROM-drive is WPI CD.
:WPIcheck
if exist %CDROM%:\WPI.ico goto WPI
echo Please insert WPI CD in drive %CDROM%:
pause
goto WPIcheck

:WPI


Lastly I changed wpipath to run from CD:

:WPI
REM Determine the WPI startup path. 
REM if wpi should run off the cd the replace %~dp0 with %CDROM%.
set wpipath=%CDROM%


That's it. Could some please double check my scripting to see if this will have the correct result?
Thanks in advance.


#2 User is offline   HeliumHigh 

  • Newbie
  • Group: Members
  • Posts: 11
  • Joined: 17-September 05

Posted 16 May 2006 - 09:51 AM

You have to make sure your CDs _both_ have cd.txt or whatever id file you want on them. After that, you have to either take out the cmdow @ hid line, or add your custom check for correct cd line before it. Something like this:
REM Example, how to look for CDROM-drive. Must have CD.txt at the root of the CD.
for %%i in (C 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:\CD.txt set CDROM=%%i:
if exist %cdrom%\cd.txt goto exists
goto notexists
:exists
if exist %cdrom%\cd1.txt goto cd1
goto cd2
:cd1
rem The commands for CD1 go on the next line

goto exit
:cd2
rem The commands to be executed for CD2 go on the next line

goto exit
:exit
rem Put any commands (such as cleanup and the like) on the next line

exit


After that, your good to go!

~~HH

This post has been edited by HeliumHigh: 16 May 2006 - 09:52 AM


#3 User is offline   NsOnLn 

  • Group: Members
  • Posts: 5
  • Joined: 24-May 06

Posted 25 May 2006 - 09:03 AM

Sounds like a great idea. Did you ever get this figured out? If so can you post the code? Thanks

Share this topic:


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



All trademarks mentioned on this page are the property of their respective owners
Copyright © 2001 - 2011 msfn.org
Privacy Policy