Jump to content

Recommended Posts


Posted

Hi Kels.

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.

Posted

Hi.

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.

  • 2 weeks later...
Posted

I think you should pay attention to the correctness of the mapping the themes in the main window, namely, his left side, where there is a menu configuration and setup, I do not know for what but in this new version 8.1.0 when you hover the mouse - they (the labels and pictures) all flash, disappear and appear - it did not bearable, I think you should not be hard fix up couple of scripts. Thanks, really waiting to a stable version. P.S. - such as that

Posted (edited)

@ Document

We are aware about this flashing issue!

Link

If you have a solution we d' like to hear it.

We're searching, Greetz

Edited by DJPro
  • 2 weeks later...
Posted

Hello again,

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.

Posted

I did some more testing\debugging and it seems that wpi will sometimes continue running the next command when it should have waited for the previous reboot request to completely finish.

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.

Posted

There is no JavaScript sleep command. That is why I have to use Sleep.exe.

Your results make sense. Now the real question is: how do I fix it?

Posted

Can jquery 1.4 be used?

http://api.jquery.com/delay/

Or JavaScript's setTimeout?

https://developer.mozilla.org/en/DOM/window.setTimeout

Or a while loop like this (from http://www.geekpedia.com/KB55_How-do-I-make-a-JavaScript-function-wait-before-executing-(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\");

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