Jump to content

WPI from CD?


Recommended Posts

Hey everyone i seem to be having the same issues as descibed in this forum.... post # 19 to be exact

Forum link

My directory structure is as follows:

%cdrom%\WPI

\SOFTWARE

\APP1\

\APP2\

etc

I get the same problems as NJDOUGLAS ... it seems that the wpi.cmd settign the current directory screws everythign up...... so that instead of the app's location being %cdrom%\software\app1 it becomes %cdrom%\wpi\software\app1 and then windows can not find it obviously....

anyone know how to fix this?

Dave

for reference heres 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:\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%.
set wpipath=%CDROM%

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

cdswitch EN_WINXPMCE2 /r:/wpi/wpi.cmd

exit

:end

Edited by buzzman2005
Link to comment
Share on other sites


You must edit the "marker" file location in generate.js

By default WPI search for WPI.ico , so change it to a file which is present in root of your cd (%cdrom%\file.ext)

You must change "marker" file twice at line 62 and 75.

Example:

function FindCDRom()
{
position = "generate.js";
var i, li;
if (foundCDdrv) return cddrv;
li = GetCDRomDriveLetters();
 for (i=0; i<li.length; i++)
 {
 if (FileExists(li[i]+'\\YourNewMarkerFile.Ext'))
 {    
   cddrv = li[i];
   debug("Found CDROM as drive " + cddrv,1,2);
 }
 }
 
 if (cddrv=="")
 {
 a = fso.GetAbsolutePathName(".");
 while (a.length>=3)
 {
   //debug("Trying ... " + a, 1);
   if (FileExists(a+'\\YourNewMarkerFile.Ext'))
   {
   cddrv=a;
   debug("Found CDROM as folder " + cddrv,1,2);
   break;
   }
   if (a.length==3) break;
   a = a + "\\..";
 a = fso.GetAbsolutePathName(a);
 }
 }

Edited by sonic
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...