Solid as a rock Posted August 28, 2006 Posted August 28, 2006 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?
zorphnog Posted August 28, 2006 Posted August 28, 2006 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?
Solid as a rock Posted August 28, 2006 Author Posted August 28, 2006 (edited) 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 Edited August 28, 2006 by Solid as a rock
zorphnog Posted August 28, 2006 Posted August 28, 2006 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\OperaTry adding that to your Opera9.cmd.
mritter Posted August 28, 2006 Posted August 28, 2006 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.
Solid as a rock Posted August 28, 2006 Author Posted August 28, 2006 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\OperaTry 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"
zorphnog Posted August 28, 2006 Posted August 28, 2006 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.
Solid as a rock Posted August 28, 2006 Author Posted August 28, 2006 (edited) Which changes do i need to make this work? (XPFINAL=%cdrom%) Edited August 28, 2006 by Solid as a rock
zorphnog Posted August 28, 2006 Posted August 28, 2006 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\OperaSTART "Opera 9.1" /wait "Opera_9.01_International_Setup.exe" /sI think that should solve your problem.
Solid as a rock Posted August 29, 2006 Author Posted August 29, 2006 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\OperaSTART "Opera 9.1" /wait "Opera_9.01_International_Setup.exe" /sI 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...
mritter Posted August 30, 2006 Posted August 30, 2006 @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:\InstallJust something to check.................
zorphnog Posted August 30, 2006 Posted August 30, 2006 @solid: The cd command must be executed in the same shell as the .cmd command.Try this:cmd1[pn]=['cd %CDROM%\\Install\\Opera & Opera.cmd'];
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now