besnia Posted April 23, 2005 Posted April 23, 2005 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 OFFREM 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%\wpiREM Force resolution to needed size for wpi interface.start %wpipath%\common\VideoChanger.exe 1280x1024x32@85 -qREM Hide this command window."%wpipath%\common\cmdow.exe" @ /hidREM Font installation - the smooth and customizable way.start /wait %wpipath%\common\fonts\fontinstaller.exeREM 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 endstart /wait WPI.htaREM 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:endThe 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.cmdAny help or ideas?
Ctwizzy Posted April 23, 2005 Posted April 23, 2005 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%\wpifor 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?
besnia Posted April 24, 2005 Author Posted April 24, 2005 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?
oneless Posted April 25, 2005 Posted April 25, 2005 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.5just 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.cmdicon=wpi.icoand in wpi application you point for an app likecmd1[pn]=['%cdrom%\\INSTALL\\ex_app1\\ex_app1.exe /parameter(s)IFneed']
besnia Posted April 27, 2005 Author Posted April 27, 2005 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.cmdWhen 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 OFFREM 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%\wpiREM Hide this command window."%wpipath%\common\cmdow.exe" @ /hidREM Font installation - the smooth and customizable way.start /wait %wpipath%\common\fonts\fontinstaller.exeREM 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 endstart /wait WPI.htaREM Cleaning up the desktop.del /s/q "%userprofile%\desktop\*.lnk"REM Confirming a reboot...echo Dim WshShell, oExec>%tmp%\WPI.vbsecho Set WshShell = CreateObject("WScript.Shell")>>%tmp%\WPI.vbsecho answer = Msgbox(" Installation has finished! Should I REBOOT now? ",VBYesNo,"BoXP Post Install")>>%tmp%\WPI.vbsecho if answer = 6 then>>%tmp%\WPI.vbsecho oExec = WshShell.Run("SHUTDOWN -r -t 5", 1, true)>>%tmp%\WPI.vbsecho end if>>%tmp%\WPI.vbsecho set WshShell = nothing>>%tmp%\WPI.vbs%tmp%\WPI.vbsdel /q %tmp%\WPI.vbsexit:endWhat 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<{POST_SNAPBACK}>The only steps I changed was to set the %%i:\BoXP.txt to %%i:\win51If anyone finds a way to make winnt.sif to recognize the %cdrom% please PM me.
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