Jump to content

RUN WPI FROM CD ONLY


Recommended Posts

Hello everyone,

I pretty much read all of the run from cd in wpi and could not find a way to run wpi.cmd from the cdrom without copying it on the hard drive. Is there a way to do that? I burnt multiple dvds in testing now and everything is good up until the first login of XP. It just brings up a blank command prompt stays there for a while and gives me an error "%CDROM%\wpi\wpi.cmd path not found or something like that. Now I do have my WPI in the root along with win51 and I386. Here is my wpi.cmd

@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:CD.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 Force resolution to needed size for wpi interface.
start %wpipath%\common\VideoChanger.exe 1280x1024x32@85 -q

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 Rebooting the sytem to finalize the installation process.
shutdown.exe -r -f -t 10 -c "Reboot in 10 sec..."

exit

:end

The CD.txt is blank in root directory as well.

My winnt.sif is

[GUIRunOnce]
   command8= "%systemDrive%\DP\BTS_DPs_Control_Panels.cmd"
   command9= "CMD /C RD /S /Q %SystemDrive%\DP"
   %CDROM%\wpi\wpi.cmd

Any help or ideas?

Link to comment
Share on other sites


to run from cd assumes that your WPI and UACD are not on the same cd. Its like having one cd for uA and one for WPI.

So to run your apps from a seperate cd just do as the file says:

set wpipath=%cdrom%\wpi

for example D: is your cd drive where D: has a folder called wpi in its root.

Now the WPI path is D:\wpi. Next it will look for the .ico file which does in fact exist and then install your apps. Does this make sense?

Link to comment
Share on other sites

Hi Ctwizzy,

I do not think I understand exactly what you are trying to point out. Do you mean that when wpipath is set to %cdrom%\wpi anytime after that the %cdrom% points to e.g. D:\wpi?

Anyway thank you for the input. Does anything in the code look weird? I am at a dead end. Everything seems to be ok to me but why can't it find a cd-rom letter and the wpi.cmd?

Link to comment
Share on other sites

up to 3.5 version , you do not need make any change.

in 3.5.1 is a problem FOR ME with the pathes , wait for higher version or

use now 3.5

just only make on the CD (other then UA)

cd:\wpi\ (folder)

cd:\INSTALL\ex_app1\...etc , (others folders with your app's)

place in the root of cd

cd:\autorun.inf

cd:\wpi.ico , as separate files

autorun.inf some like that

[AutoRun]

open=WPI\wpi.cmd

icon=wpi.ico

and in wpi application you point for an app like

cmd1[pn]=['%cdrom%\\INSTALL\\ex_app1\\ex_app1.exe /parameter(s)IFneed']

Link to comment
Share on other sites

Well, I finally got it to work thanks to this forum but then not exactly the way I wanted it. Apparently this is the workaround for now. I had to copy the wpi.cmd to the %systemdrive% to be able to call the %cdrom%. Seems like the winnt.sif cannot recognize %cdrom%/wpi/wpi.cmd command. It can only work from %systemdrive%/wpi/wpi.cmd

For detailed explanation how to do that you can check this forum post of derektm

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

The only steps I changed was to set the

%%i:\BoXP.txt
to %%i:\win51

If anyone finds a way to make winnt.sif to recognize the %cdrom% please PM me.

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