Jump to content

RUN WPI FROM CD


Recommended Posts


  • 4 weeks later...
Ok...Heres what I did. I put the WPI.cmd file in the $OEM$\$1\Install\wpi\ folder so it copies that to the hard drive.

Under GUI run once thing, just leave that to the default:

[GuiRunOnce]

%systemdrive%\install\wpi\wpi.cmd

When it calls the WPI.cmd, the CMD file searches for the CD drive that has WPI on it. Here is my WPI.cmd file:

****** Where it says BoXP.txt , MAKE A File on your XP CD like something.txt and change the below to match that, the CD has to have a file on it for it to search for *********

@ECHO OFF

REM Example, how to look for CDROM-drive. Must have a file to identify in its root (like WIN51 or WPI.ico).
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:\BoXP.txt set CDROM=%%i:
echo Found CD-Rom as drive %CDROM%

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

REM Hide this command window.
"%wpipath%\common\cmdow.exe" @ /hid

REM Font installation - the smooth and customizable way.
start /wait %wpipath%\common\fonts\fontinstaller.exe

REM Special registry tweak needed.
regedit /s "%wpipath%\common\wpi.reg"

REM Make WPI directory the current directory.
for /f "delims=: tokens=1" %%i in ("%wpipath%") do %%i:
cd "%wpipath%"

REM Start WPI and wait for its end
start /wait WPI.hta

REM Cleaning up the desktop.
del /s/q "%userprofile%\desktop\*.lnk"

REM Confirming a reboot...
echo Dim WshShell, oExec>%tmp%\WPI.vbs
echo Set WshShell = CreateObject("WScript.Shell")>>%tmp%\WPI.vbs
echo answer = Msgbox(" Installation has finished! Should I REBOOT now? ",VBYesNo,"BoXP Post Install")>>%tmp%\WPI.vbs
echo if answer = 6 then>>%tmp%\WPI.vbs
echo oExec = WshShell.Run("SHUTDOWN -r -t 5", 1, true)>>%tmp%\WPI.vbs
echo end if>>%tmp%\WPI.vbs
echo set WshShell = nothing>>%tmp%\WPI.vbs
%tmp%\WPI.vbs
del /q %tmp%\WPI.vbs

exit

:end

What this will do is, it will find the RIGHT CDROM drive, the one with WPI on it, and then it will run WPI from that. If you use my WPI.cmd file above, it will run wpi from %CDROM%\wpi .  Then if you have your programs set to install from %CDROM%\Install just put your programs in a folder named Install on the cd.

If you do the above, it will work :) Good luck

I am really sorry and forgive me if I am thick but Ive wasted to many Dvd's now lol. Ok so the wpi.cmd file we simply copy and paste what you have above and save it? Then we create a text file and call it something.txt and add in the wpi.cmd commands and place it in the wpi folder? And we rename BoXP.txt with our appropriate file name?

Link to comment
Share on other sites

Hey Junior,

About the dvd's... I wasted quite a few of these myself until I finally got it to work. What I did is I followed the steps mentioned in your post quote but I stuck to the original wpi.cmd file. The only changes I made are

@ECHO OFF

REM Example, how to look for CDROM-drive. Must have a file to identify in its root (like WIN51 or WPI.ico).

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:

instead of using WPI.ico file I just used the WIN51 because I was getting problems with the path

Then I changed to CDROM installation

REM Determine the WPI startup path.

REM if wpi should run off the cd the replace %~dp0 with %cdrom%.

set wpipath=%CDROM%\wpi

The rest I pretty much left untouch up until
REM Start WPI and wait for its end

start /wait WPI.hta

here i changed the path to

REM Start WPI and wait for its end

start /wait \wpi\WPI.hta

and VOILA! it worked as a magic. But remember that the folder extracted from the wpi.zip which is usually WPI is in the same root directory as I386 NOT IN I386 BUT NEXT TO IT so to say.

I hope this helps!

Link to comment
Share on other sites

@ECHO OFF

REM Example, how to look for CDROM-drive. Must have a file to identify in its root (like WIN51 or WPI.ico).

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:

instead of using WPI.ico file I just used the WIN51 because I was getting problems with the path

That's the whole issue right there, at least for me. WPI.ico will first be found within the WPI folder, and if that's placed in the $OEM$\$1\install, then it won't even point to the CD. So just change the WPI.ico to WIN51 and it will point to your root of the CD, right? Heh... jus' thinkin' out loud.

Thanks for this thread, guys. I was wracking my brain trying to figure this out.

Link to comment
Share on other sites

  • 2 weeks later...

Hi,

QUOTE(besnia @ May 13 2005, 07:41 PM)

QUOTE

@ECHO OFF

REM Example, how to look for CDROM-drive. Must have a file to identify in its root (like WIN51 or WPI.ico).

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:

instead of using WPI.ico file I just used the WIN51 because I was getting problems with the path

*

in instances like this wpi.ico or WIN51 are just being used as tag to identify the disc as the one wanted. Place a dummy file on you cd root, something like myapp.txt. It doesn't have to have any thing in it really ( although I use it put some notes about the apps on the disk).

Don't copy this file to your harddrive as it will cause the install to fail. Just put it on the cd.

If the apps are on the unattend xp disc then use WIN51 B)

lol

Link to comment
Share on other sites

  • 3 weeks later...

The reason it wasn't working for the original thread starter was becuase WINNT.SIF does not have a variable %cdrom%. the wpi.cmd creates one becuase it can run that search tool. Therefore everything run from WINNT.SIF has to be copied to the hard drive somewhere, and then if it's a script, it can find stuff on the cd, which is how the solution works.

Just posting this hear to un-confuse people as to why it says it cannot find %cdrom%... instead of saying a drive letter.

Link to comment
Share on other sites

  • 4 weeks later...

Quick question how do you make wpi auto reboot the computer...

Indeed my normal script detailed below does not action...

I do believe this is due to the fact that wpi is getting stuff straight from cd and not from hd...

Can anyone help????

rem Restart Windows.

shutdown.exe -r -f -t 60 -c "Rebooting..."

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