WPI v8.1.0 Bug Report Thread
#2
Posted 25 August 2010 - 09:24 AM
I tried to download the new version but my internet security (kis) warn me there is Trojans in the file,
can you check it out.
thanks.
#3
Posted 25 August 2010 - 05:57 PM
http://www.virustota...ed99-1282783791
See the virus total report.
This post has been edited by Kelsenellenelvian: 25 August 2010 - 06:51 PM
#4
Posted 27 August 2010 - 12:24 PM
I am noticing that ExecuteCommandIfFailure does not always run.
From useroptions.js (and also indicated in the log file):
AbortInstallIfFailure=true;
ExecuteCommandIfFailure=['"%wpipath%\\Install\\MyApplication.exe" param1 "%wpipath%\\Install\\MyLibrary.dll" param2 param3 "param4" "" "" "param5" "admin@domain.com" "param 6 param-param-param" "param 7 param-param-param" "param8"'];
ContinueWhereFailed=true;
From wpi log:
-----
Friday, August 27, 2010 1:24:11 AM
Program: My Program Name
Unique ID: MyProgramName
Order: 900042
Category: Applications
Friday, August 27, 2010 1:24:13 AM - cmd1 *** Fail *** (returned code 1): cmd /c d:\WPI\install\MyApplication.exe param1 "d:\WPI\install\MyLibrary.dll" param2.param.param param3 "param4" "param5"
*** Install aborted because of failure ***
-----
Number of failed installations: 1
Install process finished at: Friday, August 27, 2010 1:24:13 AM
I am thinking we should include the ExecuteCommandIfFailure command in the log file when it is run so that we can diagnose any issues that may arise.
Thank you.
#5
Posted 29 August 2010 - 06:37 PM
#6
Posted 08 September 2010 - 03:15 PM
#8
Posted 18 September 2010 - 12:19 AM
I am noticing that wpi v8.1.0 will sometimes skip the first command from the cmds array.
section from config.js:
pn++;
prog[pn]=['Program Name'];
shortdesc[pn]=[''];
uid[pn]=['ProgramName'];
dflt[pn]=['yes'];
forc[pn]=['no'];
bit64[pn]=['no'];
cat[pn]=['Applications'];
rebootcode[pn]=[3010];
repeatcommand[pn]=['yes'];
cmds[pn]=['cmd /c %wpipath%\\install\\MyApplication.exe param1 "%wpipath%\\install\\MyLibrary.dll" param2 param3 "param4" "param5"','{reboot}'];
desc[pn]=['Program Name'];
picf[pn]=['%wpipath%\\Graphics\\InstallPackage.png'];
picw[pn]=['128'];
pich[pn]=['128'];
textl[pn]=['Right'];
section from wpi_log:
-----
Friday, September 17, 2010 9:28:38 PM
Program: Program Name
Unique ID: ProgramName
Order: 900007
Category: Applications
Friday, September 17, 2010 9:31:37 PM - cmd2 Success (returned code 0): "C:\Windows\System32\shutdown.exe" /r /f /t 0
Friday, September 17, 2010 9:33:16 PM - Finished installation.
-----
Notice that cmd1 was not run.
Any ideas?
This is on Windows 7 x64 with UAC turned off.
Thank you.
#9
Posted 18 September 2010 - 11:12 AM
#10
Posted 20 September 2010 - 07:53 PM
section from config.js:
pn++;
prog[pn]=['Program Name 1'];
shortdesc[pn]=[''];
uid[pn]=['ProgramName1'];
dflt[pn]=['yes'];
forc[pn]=['no'];
bit64[pn]=['no'];
cat[pn]=['Applications'];
rebootcode[pn]=[3010];
repeatcommand[pn]=['yes'];
cmds[pn]=['%wpipath%\\install\\ProgramName1.exe params','{reboot}'];
desc[pn]=['Program Name 1'];
picf[pn]=['%wpipath%\\Graphics\\InstallPackage.png'];
picw[pn]=['128'];
pich[pn]=['128'];
textl[pn]=['Right'];
pn++;
prog[pn]=['Program Name 2'];
shortdesc[pn]=[''];
uid[pn]=['ProgramName2'];
dflt[pn]=['yes'];
forc[pn]=['no'];
bit64[pn]=['no'];
cat[pn]=['Applications'];
rebootcode[pn]=[3010];
repeatcommand[pn]=['yes'];
cmds[pn]=['%wpipath%\\install\\ProgramName2.exe params','{reboot}'];
desc[pn]=['Program Name 2'];
picf[pn]=['%wpipath%\\Graphics\\InstallPackage.png'];
picw[pn]=['128'];
pich[pn]=['128'];
textl[pn]=['Right'];
section from wpi_log (after modifying installer.js to output some debug information):
-----
Monday, September 20, 2010 3:25:06 PM
Program: Program Name 1
Unique ID: ProgramName1
Order: 900006
Category: Applications
Monday, September 20, 2010 3:25:06 PM - j starts as 1
Monday, September 20, 2010 3:25:06 PM - commands length 3
Monday, September 20, 2010 3:25:06 PM - command 1
Monday, September 20, 2010 4:05:59 PM - cmd1 Success (returned code 0): d:\WPI\install\ProgramName1.exe params
Monday, September 20, 2010 4:06:00 PM - command 2
Monday, September 20, 2010 4:06:04 PM - cmd2 Success (returned code 0): "C:\Windows\System32\shutdown.exe" /r /f /t 0
Monday, September 20, 2010 4:06:10 PM - Finished installation.
-----
Monday, September 20, 2010 4:06:10 PM
Program: Program Name 2
Unique ID: ProgramName2
Order: 900007
Category: Applications
Monday, September 20, 2010 4:06:11 PM - j starts as 1
Monday, September 20, 2010 4:06:11 PM - commands length 3
Monday, September 20, 2010 4:06:11 PM - command 1
Monday, September 20, 2010 4:06:11 PM - cmd1 *** Fail *** (returned code -1073741502): d:\WPI\install\ProgramName2.exe params
Monday, September 20, 2010 4:09:16 PM - j starts as 2
Monday, September 20, 2010 4:09:16 PM - commands length 3
Monday, September 20, 2010 4:09:16 PM - command 2
Monday, September 20, 2010 4:09:17 PM - cmd2 Success (returned code 0): "C:\Windows\System32\shutdown.exe" /r /f /t 0
Monday, September 20, 2010 4:10:43 PM - j starts as 3
Monday, September 20, 2010 4:10:43 PM - commands length 3
Monday, September 20, 2010 4:10:43 PM - Finished installation.
-----
Notice the date and time stamps between ProgramName1.cmd2 and ProgramName2.cmd1 - wpi did not properly wait for the previous reboot request to finish before moving to the next command.
Notice the returned code -1073741502, 0xC0000142, STATUS_DLL_INIT_FAILED, "{DLL Initialization Failed} Initialization of the dynamic link library %hs failed. The process is terminating abnormally.".
I am thinking that windows blocked the running of .\wpi\Tools\Sleep.exe because there is a shutdown request, and this caused wpi to continue processing the next command without properly waiting.
This would also explain the return code -1073741502 and could also explain the previous wpi log file contents where it skipped cmd1 because windows probably killed mshta.exe before wpi could write to the log file, but after wpi tried to run the command.
I am thinking that this issue can be resolved by using a native javascript method to sleep rather than launching an executable for example.
Windows 7 x64.
What do you think?
Thank you.
#11
Posted 21 September 2010 - 10:18 AM
Your results make sense. Now the real question is: how do I fix it?
#12
Posted 21 September 2010 - 11:06 PM
http://api.jquery.com/delay/
Or JavaScript's setTimeout?
https://developer.mo...ndow.setTimeout
Or a while loop like this (from http://www.geekpedia...(sleep-or-delay).html):
function wait(msecs)
{
var start = new Date().getTime();
var cur = start
while(cur - start < msecs)
{
cur = new Date().getTime();
}
}
to use:
alert(\"Will wait for one second\");
wait(1000);
alert(\"Finished waiting\");
#13
Posted 22 September 2010 - 03:20 PM
WScript.Sleep
http://msdn.microsof...28VS.85%29.aspx
Edit: Sorry, actually the WScript object is not available because hta's are run from mshta.exe and not from wscript.exe (See http://www.eggheadca...criptsleep.aspx)
This post has been edited by icnocop: 22 September 2010 - 03:26 PM
#14
Posted 22 September 2010 - 03:28 PM
"Two Javascript synchronous sleep functions which won't freeze browser"
http://sejq.blogspot...nous-sleep.html
The first work-around is for ie and so that may work.
#15
Posted 22 September 2010 - 04:24 PM
http://www.devcheater.com/
#16
Posted 26 September 2010 - 04:16 PM
http://www.ureader.c...sg/1675551.aspx
It mentions using Sleep methods in the following free ActiveX components:
ScriptX from Meadroid
AutoItX from AutoIt
But most importantly, it also links to a hack detailed here:
http://forum.script-...id=29243#p29243
I have actually test the hack and it works great and is my best recommendation so wpi doesn't have to register any com dlls and use another third party utility.
This post has been edited by icnocop: 26 September 2010 - 04:16 PM
#17
Posted 27 September 2010 - 11:36 AM
#18
Posted 27 September 2010 - 12:27 PM
Attached File(s)
-
hta sleep test.zip (1.82K)
Number of downloads: 7
#19
Posted 28 September 2010 - 08:45 PM
Thanks



Help

Back to top









