Jump to content

Slight Problem


Recommended Posts

First of all I would like to congratulate you on this fine piece of software, I originally used to use a batch file to install all my apps but I stumbled upon WPI and found out (to my sheer delight :D) that it allows you to create fairly advanced looking post-installation setup screens without much additional knowledge. :thumbup

Right, I spent about 45 minutes configuring it when I first installed it. I have about 12 apps which are located in a directory named "Install" in the main directory of the CD (e.g. D:\Install\). I will use 7-Zip as an example - my command is as follows:

%CDROM%\Install\7-Zip\7z424.exe /S

However, when I came to test this in VirtualPC (by mounting the ISO within the program) I recieved errors along the lines of "Cannot locate Zs424.exe at C:\Install\7-Zip", this was the case for all my apps. My question is, have I configured the command wrong, or is it a problem because of the mounted ISO in VirtualPC and infact that WPI would install the apps correctly if installed from a CDROM.

Thanks, Oliver.

Link to comment
Share on other sites


Okay 2 things and your prob should be fixed.

REM Determine the WPI startup path.

REM if wpi should run off the cd the replace %~dp0 with %cdrom%.

set wpipath=%~dp0

Make sure where it says set wpipath= That you have %cdrom% there.

and for the secomd thing what do you have for the cd identifier??

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:\wpi.ico set CDROM=%%i:

echo Found CD-Rom as drive %CDROM%

if you change the part where it says %%i:\wpi.ico you need to edit generate.js

to reflect those changes. (2 spots)

function FindCDRom()

{

position = "generate.js";

var i, li;

if (foundCDdrv) return cddrv;

li = GetCDRomDriveLetters();

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

{

if (FileExists(li+'\\WPI.ico'))<----- HERE

{

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+'\\WPI.ico'))<----- AND HERE

Link to comment
Share on other sites

Sorry to sound dumb, but I didn't really get your post :blushing:

I assume your changes are in accordance with the WPI Command Script file located in the root of the WPI directory?

This is what the code is as follows:

@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:\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=%~dp0

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

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 10 -c "Reboot in 10 sec..."

exit

:end

I haven't changed it from when I extracted WPI into my XP directory, could you possibly change what is needed and re-post it? (sorry to sound a burden).

Thanks, Oliver.

Link to comment
Share on other sites

@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:\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=%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

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 10 -c "Reboot in 10 sec..."

exit

Aaaaaannnnnd there ya go....

Link to comment
Share on other sites

Thanks, you've been a great help. :)

:thumbup

EDIT-

After testing the new code in Virtual PC, WPI doesn't even launch now. I get similar error messages as to before although this time it is about WPI rather than the installation of my programs (e.g. Cannot find WPI, have you renamed the file etc).

Any ideas?

Thanks, Oliver.

Edited by OliverMaltby
Link to comment
Share on other sites

Root Directory:

$OEM$\$1\Install\WPI\

I386

Install

how are you calling it?

Do you mean from the Winnit file in I386 folder?

[GuiRunOnce]
%systemdrive%\install\wpi\wpi.cmd

It worked before, but since I changed the code to what you suggested it can no longer access WPI, I assume it cannot read it from the CD-ROM.

Link to comment
Share on other sites

Ahh, well I put the WPI folder here - $OEM$\$1\Install\WPI\ because I followed the WPI tutorial on the website (I just copied the folder layout). I assume if I just put WPI in the root directory (e.g. D:\WPI) then it should all work correctly?

Thanks, Oliver.

Link to comment
Share on other sites

Just tried it, no such luck :(

WPI still fails to load, it refers to the C:\ drive (C:\Install\) to be exact. Something is obviously telling it to look on the hard drive as apposed to the CD-ROM.

EDIT -

DOH, just realised my Winnit file didn't contain the correct code:

[GuiRunOnce]
%systemdrive%\install\wpi\wpi.cmd

Should it be:

%CDROM%\WPI\WPI.cmd

Edited by OliverMaltby
Link to comment
Share on other sites

here is how I have it

"%SystemDrive%\install\WPI.cmd"

I have just the WPI.cmd copy over to the hard drive. "C:\install\"

Put the "WPI.cmd" file into your sub folder from the root "\$OEM$\$1\install"

Try that. It works for me.

If not let me know.

Link to comment
Share on other sites

Almulder, I did have WPI in that folder originally, however, although WPI could run, my apps would not install from the CDROM. Now, I have the opposite problem, the program doesn't run :lol:

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