JiggaByte Posted March 14, 2005 Share Posted March 14, 2005 I was wondering what I needed to change in the wpi.cmd script that came with WPI in order to get it to run from C:\Install\WPI instead of off a CD? The cd and font part have me really confused.What do I need to change in here: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:\WIN51 set CDROM=%%i:echo Found CD-Rom as drive %CDROM%REM Determine the WPI startup path. set WPIPATH=%SystemDrive%\Install\WPIecho WPI will run from %WPIPATH%REM Font installation - the easy wayfor /R %%i in ( *.ttf ) do ( echo Installing font %%~ni.ttf copy /Y "%%~fi" "%windir%\Fonts" > nul "%WPIPATH%\common\installfont.exe" "%windir%\Fonts\%%~ni.ttf" > nul)Any help would be very much appreciated! Thanks Link to comment Share on other sites More sharing options...
MCT Posted March 14, 2005 Share Posted March 14, 2005 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:\WIN51 set CDROM=%%i:echo Found CD-Rom as drive %CDROM%thats only searching for a file on a drive, just tell it a different file, or give it a different path to search instead of each drive letter, u could have it search folders or anythingtype FOR /? in command prompt Link to comment Share on other sites More sharing options...
JiggaByte Posted March 14, 2005 Author Share Posted March 14, 2005 so should I just point it to C or a certain file on C: ? Will the Font part of the WPI.cmd work ok the way it is now if its going to run off of the C: drive? Does anyone who has run it from their hard drive have an example of their wpi.cmd file that they could post. If I can see an example, then I will be able to figure it out. Link to comment Share on other sites More sharing options...
hasi001 Posted March 16, 2005 Share Posted March 16, 2005 The example wpi.cmd:REM Determine the WPI startup path. REM If WPI should run off the CD the replace %dp0 with %CDROM%\PathToWPIset WPIPATH=%~dp0echo WPI will run from %WPIPATH%This cryptic %~dp0 says "directory from where this skript (wpi.cmd) is run". The commentDO NOT WANT to run it from CD.I (WPI author) do not run it from CD, and the original wpi.cmd does it for my purposes. The whole CDROM-thing is just for demonstration. You can also COMPLETELY IGNORE the fnt and registry thing.If we cut it down, the skript will say:set WPIPATH=%~dp0 --> = current wpi.cmd's drive:\directory !for /F "delims=: tokens=1" %%i in ("%WPIPATH%") DO %%i: --> change to that drivecd "%WPIPATH%" --> change directorystart /wait WPI.htaI know it's cryptic, but that's the way with shell skripts. As long as WPIPATH gets set correctly, you wouldn't have to care for anything else. 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