Jump to content

WPI say after error the program is succesfull installed


Recommended Posts

i get a error when i place the folder install outside the WPI folder (cant find :\Install\WPI\adobereader.exe).

After this i read in WPI.log that the program is installed succesfull. Thats not true. If WPI.log dont tell true things we have nothing at all the info....

So... a bug?

Link to comment
Share on other sites


Can you give us a little more info. Where is your install folder located (cdrom or HDD)? What does the error message say? What command are you using to call the install?

Install-folder exist in the root of cdrom and the install goes from cdrom. WPI also exist in the root and also tryed in the Install-folder ( so i tryed two ways).

WPI only have 1 line by every applicatition:

prog[pn]=['Opera 9'];
uid[pn]=['OPERA9'];
dflt[pn]=['no'];
cat[pn]=['Office'];
forc[pn]=['no'];
gcond[pn]=['FileExists(\'%programfiles%\')'];
cmd1[pn]=['%CDROM%\\Install\\Opera\\Opera.cmd'];
pn++;

Opera9.cmd:

START "Opera 9.1" /wait "Opera_9.01_International_Setup.exe" /s

post-21053-1156774307_thumb.jpg

Edited by Solid as a rock
Link to comment
Share on other sites

Ok. The problem here is that you are calling the .cmd inside WPI, therefore when it opens your ms-dos window it defaults to the root of where the call originated (D:\Install\WPI).

Is that the only command in your Opera9.cmd? If so, you could just call it directly as your command1 config entry.

Otherwise you would need to add something like:

cd %CDROM%\Install\Opera

to your Opera9.cmd before you call the .exe.

However, the problem with this is that %CDROM% is a WPI variable and not a ms-dos environment variable. I'm not sure, but I cannot think of a way to create a global environment variable in ms-dos and there isn't a cdrom variable. So the only thing that I can think of is to cd to an absolute path (which is not good, but will work):

cd ..\..\Install\Opera

Try adding that to your Opera9.cmd.

Link to comment
Share on other sites

The return codes for the installer log are misleading sometimes. What happened is that the script was executed, so as far as WPI knows it was installed. But then the script itself has the path problem you mentioned, WPI doesn't know this, so it says it installed successfully.

Link to comment
Share on other sites

Ok. The problem here is that you are calling the .cmd inside WPI, therefore when it opens your ms-dos window it defaults to the root of where the call originated (D:\Install\WPI).

Is that the only command in your Opera9.cmd? If so, you could just call it directly as your command1 config entry.

No, the Opera9.cmd exist in cdrom:\Install\Opera9\ WPI itself is pointed to the cmd. So i can change in the future very easy the cmd when get new versions. I dont like to change config.js, to much work for me...

Otherwise you would need to add something like:
cd %CDROM%\Install\Opera

to your Opera9.cmd before you call the .exe.

However, the problem with this is that %CDROM% is a WPI variable and not a ms-dos environment variable. I'm not sure, but I cannot think of a way to create a global environment variable in ms-dos and there isn't a cdrom variable. So the only thing that I can think of is to cd to an absolute path (which is not good, but will work):

cd ..\..\Install\Opera

Try adding that to your Opera9.cmd.

Hmmm, i will take a look at it....
The return codes for the installer log are misleading sometimes. What happened is that the script was executed, so as far as WPI knows it was installed. But then the script itself has the path problem you mentioned, WPI doesn't know this, so it says it installed successfully.

Is there no waterproof way to check if a install is succesfull?

Maybe a check "If there %Programfiles%\Opera is true = then show "Congrulations, you have installed Opera succesfully"?

Or to look if there is happened any error, than write this to the WPI.log "an error happened after excuting "Opera9.cmd"

Link to comment
Share on other sites

It would be possible to have a post-execute condition. You might want to bring that up as an enhancement request for 5.4. As far as checking for errors, WPI can only go off of what the command returns and your commands are returning that they executed properly.

Link to comment
Share on other sites

In this case you need to add the cd statement to your .cmd files before the start command. Since your WPI folder is in the root of your cd, you only need to escape one folder (WPI) so just use one '..' in your cd command. So the first command of each of your .cmd files should be the cd command.

For example, your Opera9.cmd should look something like this:

cd ..\Install\Opera
START "Opera 9.1" /wait "Opera_9.01_International_Setup.exe" /s

I think that should solve your problem.

Link to comment
Share on other sites

In this case you need to add the cd statement to your .cmd files before the start command. Since your WPI folder is in the root of your cd, you only need to escape one folder (WPI) so just use one '..' in your cd command. So the first command of each of your .cmd files should be the cd command.

For example, your Opera9.cmd should look something like this:

cd ..\Install\Opera
START "Opera 9.1" /wait "Opera_9.01_International_Setup.exe" /s

I think that should solve your problem.

Could this be done in the WPI itself?

Something like this:

cmd1[pn]=['cd ..\Install\Opera'];

cmd2[pn]=['%CDROM%\\Install\\Opera\\Opera.cmd'];

I means, all my cmd are pathfree so if i give a folder to someone it will work immediality when running the cmd, When i specify the path \install\ in the 1st line it will no longer work. So if i choose your way i better give full paths in every line of my cmd...

Link to comment
Share on other sites

@Solid: Just checking, this goes back a ways, but do you have WIN51 in your CD root? That is where WPI checks first. If not there, then it goes in to WPI's starting path. That may be why your path is set to X:\WPI\Install instead of X:\Install

Just something to check.................

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