Jump to content

HELP! Can't get WPI to run right


Recommended Posts

Hello all,

I'm trying to seup a cd where the programs are installed from the CD. I really do not care if WPI is ran from the cd or not.

My current problem is when XP logs in I get a dos window with the following errors:

Found CD-Rom as drive D:

'WPIPATH' is not recognized as an internal or external command...blah blah

It then goes on to complain that --start is not a command either.

My tree looks like this:

tree8ab.jpg

I have copied WPI.cmd into $OEM$\$1\Install

Here is my WPI.cmd file, both copies of the file are the same.

@ECHO OFF

REM Example, how to look for CDROM-drive. Must have WPI.ico at the root of the CD.

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%\wpi\

REM Hide this command window.

%wpipath%\Tools\cmdow.exe @ /hid

REM Force resolution to needed size for wpi interface.

--start %wpipath%\Tools\VideoChanger.exe 1280x1024x32@85 -q

REM Font installation - the smooth and customizable way.

--start /wait %wpipath%\Tools\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 %windir%\system32\mshta.exe "%CD%\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 30 -c "To finish installations WPI will now reboot in 30 sec..."

exit

:end

In generate.js I changed it to this:
function FindCDRom()

{

position = "generate.js";

var i, li;

if (foundCDdrv) return cddrv;

li = GetCDRomDriveLetters();

  for (i=0; i<li.length; i++)

  {

  if (FileExists(li+'\\win51'))

  {   

    cddrv = li;

    debug("Found CDROM as drive " + cddrv,1,2);

  }

  }

 

  if (cddrv=="")

  {

  a = fso.GetAbsolutePathName(".");

  while (a.length>=3)

  {

    //debug("Trying ... " + a, 1);

    if (FileExists(a+'\\win51'))

    {

    cddrv=a;

    debug("Found CDROM as folder " + cddrv,1,2);

    break;

    }

    if (a.length==3) break;

    a = a + "\\..";

  a = fso.GetAbsolutePathName(a);

In my WINNT.SIF file I have the following at the bottom:

[GuiRunOnce]

%systemdrive%\install\wpi.cmd

I have read and searched the boards. Which has brought me here. My first problem was WPI kept trying to install my programs from C:\install. After searching around I came up with the above. I'm sure I am missing something really stupid so if someone could please point it out, I would be happier then a pig in sh*t

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