hanzol Posted January 24, 2005 Share Posted January 24, 2005 I can't get the cdrom path to work.I'm using this code in my wpi.cmdREM Example, how to look for CDROM-drive. Must have a file called WIN51 in its root.for %%i in (C 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:\WIN51 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%\PathToWPIset WPIPATH=%CDROM%\echo WPI will run from %WPIPATH%When I run the installer, it looks in D:\ (hdd partition), instead of the cdromWhat is wrong? I tried different files instead of WIN51, but nothing seems to work... Link to comment Share on other sites More sharing options...
hanzol Posted January 24, 2005 Author Share Posted January 24, 2005 solved it... Link to comment Share on other sites More sharing options...
EliasXP Posted January 25, 2005 Share Posted January 25, 2005 lol Link to comment Share on other sites More sharing options...
FuNKeR Posted February 4, 2005 Share Posted February 4, 2005 How did you solve the problem?Got the same here cuFuNKeR Link to comment Share on other sites More sharing options...
djbe Posted February 4, 2005 Share Posted February 4, 2005 I'm using this code:@ECHO onfor %%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:\WIN51 set CDROM=%%i:set WPIPATH=%CDROM%\SETUP\WPIset bla=%WPIPATH:~0,1%if %bla%==\ set WPIPATH=%WPIPATH:~1%%WPIPATH%\common\cmdow.exe @ /HIDstart %WPIPATH%\common\Music.exeping -n 5 localhost > NULregedit /S %WPIPATH%\common\wpi.regfor /F "delims=: tokens=1" %%i in (%WPIPATH%) DO %%i:cd %WPIPATH%start /wait WPI.htaexitI removed the fonts part (don't use it anyway) and added a line so that if I'm running it from hdd (for testing purposes) it will also work. I also added a line to start UAP2 (aka music.exe) and a pause of +- 5 seconds (or else, the player will appear on top of wpi). Link to comment Share on other sites More sharing options...
FuNKeR Posted February 4, 2005 Share Posted February 4, 2005 This is not really the problem. The cmd file works great and WPI is being started. BUT: When I choose any application and click install, it always says "Can't find D:\install\someprogram\setup.exe". Well, WPI is being started from drive E: though :confused:So it seems that the variable %WPIPATH% or %CDROM% are not given over to WPI. Got, what my problem is about? cuFuNKeR Link to comment Share on other sites More sharing options...
Astalavista Posted February 4, 2005 Share Posted February 4, 2005 check this thread for the solutionhttp://www.msfn.org/board/index.php?showtopic=36303 Link to comment Share on other sites More sharing options...
EliasXP Posted February 4, 2005 Share Posted February 4, 2005 this is my cmd: @ECHO OFF 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:\WIN51 set CDROM=%%i:REM Determine the WPI startup path. REM If WPI should run off the CD the replace %dp0 with %CDROM%\PathToWPIset WPIPATH=%CDROM%\WPIecho WPI will run from %WPIPATH%for /R %%i in ( *.ttf ) do (echo Installing font %%~ni.ttfcopy /Y "%%~fi" "%windir%\Fonts" > nul"%WPIPATH%\common\installfont.exe" "%windir%\Fonts\%%~ni.ttf" > nul)REM Hide this command windowREM "%WPIPATH%\common\cmdow.exe" @ /HIDREM Special registry tweak neededregedit /S "%WPIPATH%\common\wpi.reg"REM Make WPI driectory the current directoryfor /F "delims=: tokens=1" %%i in ("%WPIPATH%") DO %%i:cd "%WPIPATH%"REM Start WPI and wait for its endstart /wait WPI.htaREM call any cleanup code here, or after this script.exit Link to comment Share on other sites More sharing options...
FuNKeR Posted February 4, 2005 Share Posted February 4, 2005 I'm sorry, but the solution must be something different! I searched many threads, but all I got is a bunch of informations about the wpi.CMD Why isn't the variable given over to the WPI program? I think, it does not have anything to do with the cmd file. Simply the fact, that WPI does not "accept" the contents of the DOS variables.cuFuNKeR Link to comment Share on other sites More sharing options...
Kelsenellenelvian Posted February 5, 2005 Share Posted February 5, 2005 This is my .cmd file:@ECHO OFFREMREM WPI startup something.REM REM Example, how to look for CDROM-drive. Must have a file called WIN51 in its root.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%REM Determine the WPI startup path. REM If WPI should run off the CD the replace %~dp0 with %CDROM%set WPIPATH=%~dp0echo WPI will run from %WPIPATH%REM Hide this command window"%WPIPATH%\common\cmdow.exe" @ /HIDREM Special registry tweaks neededstart %WPIPATH%\common\fontinst.exeregedit /s "%WPIPATH%\common\killinstallerwarning.reg"regedit /S "%WPIPATH%\common\wpi.reg"REM Make WPI driectory the current directoryfor /F "delims=: tokens=1" %%i in ("%WPIPATH%") DO %%i:cd "%WPIPATH%"REM Start WPI and wait for its endstart /wait WPI.htaREM call any cleanup code here, or after this script.del /F %SYSTEMDRIVE%\WPI.CMD exit:endI use this code for starting from a HD or a PocketDrive and with a minor adjustment a cd.REM If WPI should run off the CD the replace %~dp0 with %CDROM%try mine just remove these 2 lines=start %WPIPATH%\common\fontinst.exeregedit /s "%WPIPATH%\common\killinstallerwarning.reg" Link to comment Share on other sites More sharing options...
danard Posted March 13, 2005 Share Posted March 13, 2005 FuNKeR,I had the same problem. If you using another file to identify you cdrom drive (not WIN51), here is a solution:1. Open your generate.js in wpiscripts directory2. Find function FindCDRom() replace WIN51 (it's using twice in this function) with your file name.That's all. 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