MSFN Forum: WPI 8.6 and beyond bug\bugfix thread - MSFN Forum

Jump to content


  • 4 Pages +
  • 1
  • 2
  • 3
  • 4
  • You cannot start a new topic
  • You cannot reply to this topic

WPI 8.6 and beyond bug\bugfix thread Rate Topic: -----

#41 User is offline   TerryInWales 

  • Group: Members
  • Posts: 6
  • Joined: 07-February 10
  • OS:Windows 7 x64

Posted 03 February 2013 - 11:58 AM

View Postmyselfidem, on 02 February 2013 - 06:44 AM, said:

View PostTerryInWales, on 30 November 2012 - 04:26 PM, said:

If you were here is SW Wales in the UK I would come round and fix mritters main computer for free.
Please continue with the WPI. I really do appreciate it.

Terry

Thanks. Do it! :)


Just send me the contact info in South Wales and I'll arrange it and stick it in the SatNav.


#42 User is offline   myselfidem 

  • Member
  • PipPipPipPipPipPipPipPip
  • Group: Members
  • Posts: 2,395
  • Joined: 06-January 10
  • OS:Windows 7 x86
  • Country: Country Flag

Posted 07 February 2013 - 11:55 PM

About the variable %comma% used with WPI !

This variable replace the comma (,) inside java script to execute all commands separated with a comma, because all commands can be executed. If we keep comma (,) the command execute only the first one...

We can see also inside the command to install Windows Live:

config.js
prog[pn]=['Windows Live 2012'];
uid[pn]=['WINDOWSLIVE2012'];
ordr[pn]=[24];
dflt[pn]=['yes'];
forc[pn]=['no'];
bit64[pn]=['no'];
cat[pn]=['Applications'];
pfro[pn]=['no'];
cmds[pn]=['"%wpipath%\\Install\\WLive\\wlsetup-all.exe" /q /AppSelect:Messenger%comma%Mail%comma%MovieMaker%comma%Writer%comma%Wlsync%comma%idcrl /log:%temp%\\Wlsetup.log /NOToolbarCEIP /NOhomepage /NOlaunch /NOMU /nosearch'];
desc[pn]=['Windows Live 2012'];
pn++;



Inside WPI log file %comma% is converted to comma (,) but it is missing a code to convert it inside braces { }:

{OS=Win8%comma%Win7%comma%Vista%comma%XP}

It is not a bug!

This post has been edited by myselfidem: 08 February 2013 - 01:08 PM


#43 User is offline   Whatsup 

  • Newbie
  • Group: Members
  • Posts: 42
  • Joined: 11-February 10

Posted 10 March 2013 - 08:45 AM

Hi..

The countdown work fine in WPI menu.
But the timer [clock] didn't work in WPI installer with IE10??..

Grt Whatsup.

#44 User is offline   myselfidem 

  • Member
  • PipPipPipPipPipPipPipPip
  • Group: Members
  • Posts: 2,395
  • Joined: 06-January 10
  • OS:Windows 7 x86
  • Country: Country Flag

Posted 10 March 2013 - 08:48 AM

Yes, after many tests I see the timer freeze when IE10 is integrated!

#45 User is offline   Whatsup 

  • Newbie
  • Group: Members
  • Posts: 42
  • Joined: 11-February 10

Posted 10 March 2013 - 09:32 AM

View Postmyselfidem, on 10 March 2013 - 08:48 AM, said:

Yes, after many tests I see the timer freeze when IE10 is integrated!


Aha thx for info,and yes i have IE10 integrated^^.

Grt Whatsup

#46 User is offline   myselfidem 

  • Member
  • PipPipPipPipPipPipPipPip
  • Group: Members
  • Posts: 2,395
  • Joined: 06-January 10
  • OS:Windows 7 x86
  • Country: Country Flag

Posted 10 March 2013 - 01:22 PM

I'm looking for a workaround!

This post has been edited by myselfidem: 10 March 2013 - 02:25 PM


#47 User is offline   Whatsup 

  • Newbie
  • Group: Members
  • Posts: 42
  • Joined: 11-February 10

Posted 17 March 2013 - 12:32 PM

Hi myselfidem.

I do not know if you've noticed it.

But if you stop de timer self, and start WPI Installer by click.
The Clock is working fine.

If you let the timer do his work,and automatic start WPI Installer.
Then Clock is freezes in 2 sec.

Maybe this will help you to find the problem!!..

Grt Whatsup

#48 User is offline   myselfidem 

  • Member
  • PipPipPipPipPipPipPipPip
  • Group: Members
  • Posts: 2,395
  • Joined: 06-January 10
  • OS:Windows 7 x86
  • Country: Country Flag

Posted 17 March 2013 - 01:30 PM

Thanks Watsup!

Yes, I also noticed that.

The trouble is when all programs to install are selected by default, or if we want install all programs already selected and without intervention !

It seems the problem occurs when installing the first program with Installer.hta when IE10 is integrated.

However, inside WPI_Log.txt the time values are correct!

I'm always looking a workaround.





Attached File(s)



#49 User is offline   myselfidem 

  • Member
  • PipPipPipPipPipPipPipPip
  • Group: Members
  • Posts: 2,395
  • Joined: 06-January 10
  • OS:Windows 7 x86
  • Country: Country Flag

Posted 02 April 2013 - 01:15 PM

I use this workaround to display the timer inside Installer.hta:

Inside timers.js

Replace function ins_iTimer() with:

function ins_iTimer()
{
 position="timers.js";
 whatfunc="ins_iTimer()";

 var timerID=null;
 var txt="";
 var now=new Date();
 var nowSecs=(now.getHours()*60*60) + (now.getMinutes()*60) + now.getSeconds();
 var elapsedSecs=nowSecs - ins_startSecs;
 
 var hours=Math.floor(elapsedSecs/3600);
 elapsedSecs=elapsedSecs - (hours*3600);

 var minutes=Math.floor(elapsedSecs/60);
 elapsedSecs=elapsedSecs - (minutes*60);
 
 var seconds=elapsedSecs;
 
 txt=((hours < 10) ? "0" : "") + hours;
 txt += ((minutes < 10) ? ":0" : ":") + minutes;
 txt += ((seconds < 10) ? ":0" : ":") + seconds;

 document.getElementById("TimerDisplay").innerHTML=txt;
 timerID=setTimeout("ins_iTimer()",1000);  // Update display
}



Tested and works fine for me! Thanks to share your result!

*Edit: I spent days and days to find this workaround!

This post has been edited by myselfidem: 04 April 2013 - 09:11 AM


#50 User is offline   bphlpt 

  • MSFN Expert
  • PipPipPipPipPipPip
  • Group: Members
  • Posts: 1,082
  • Joined: 12-May 07

Posted 03 April 2013 - 12:13 AM

For an admittedly extremely small code reduction, you can change:

 var minutes=Math.floor(elapsedSecs/60);
 elapsedSecs=elapsedSecs - (minutes*60);
 
 var seconds=elapsedSecs;


to:

 var minutes=Math.floor(elapsedSecs/60);
 var seconds=elapsedSecs - (minutes*60);


You can also eliminate:

 var txt="";


and change:

 txt=((hours < 10) ? "0" : "") + hours;


to:

 var txt=((hours < 10) ? "0" : "") + hours;


You also should be able to eliminate:

 var timerID=null


and change:

 timerID=setTimeout("ins_iTimer()",1000);  // Update display


to:

 var timerID=setTimeout("ins_iTimer()",1000);  // Update display


And you can save a line and eliminate a variable by changing:

 var nowSecs=(now.getHours()*60*60) + (now.getMinutes()*60) + now.getSeconds();
 var elapsedSecs=nowSecs - ins_startSecs;


to:

 var elapsedSecs=((now.getHours()*60*60) + (now.getMinutes()*60) + now.getSeconds()) - ins_startSecs;


If you don't mind long code lines, you could even eliminate another variable by changing:

 txt=((hours < 10) ? "0" : "") + hours;
 txt += ((minutes < 10) ? ":0" : ":") + minutes;
 txt += ((seconds < 10) ? ":0" : ":") + seconds;

 document.getElementById("TimerDisplay").innerHTML=txt;


to:

 document.getElementById("TimerDisplay").innerHTML=((hours < 10) ? "0" : "") + hours + ((minutes < 10) ? ":0" : ":") + minutes + ((seconds < 10) ? ":0" : ":") + seconds;


So the new code would be:

function ins_iTimer()
{
 position="timers.js";
 whatfunc="ins_iTimer()";

 var now=new Date();
 var elapsedSecs=((now.getHours()*60*60) + (now.getMinutes()*60) + now.getSeconds()) - ins_startSecs;
 
 var hours=Math.floor(elapsedSecs/3600);
 elapsedSecs=elapsedSecs - (hours*3600);

 var minutes=Math.floor(elapsedSecs/60);
 var seconds=elapsedSecs - (minutes*60);

 document.getElementById("TimerDisplay").innerHTML=((hours < 10) ? "0" : "") + hours + ((minutes < 10) ? ":0" : ":") + minutes + ((seconds < 10) ? ":0" : ":") + seconds;
 var timerID=setTimeout("ins_iTimer()",1000);  // Update display
}


Only a total of 2 variables and 7 lines of code eliminated, plus 2 blank lines, and you'll never notice any size or speed change but still...

Note: I have not tested this, I just analyzed the code, but I'm not aware of any potential problems.

Cheers and Regards

This post has been edited by bphlpt: 03 April 2013 - 12:55 AM


#51 User is offline   myselfidem 

  • Member
  • PipPipPipPipPipPipPipPip
  • Group: Members
  • Posts: 2,395
  • Joined: 06-January 10
  • OS:Windows 7 x86
  • Country: Country Flag

Posted 03 April 2013 - 05:30 AM

Inside WPI.hta I see this registry key isn't written inside the registry:

WriteRegKey("HKEY_CURRENT_USER\\Software\\Microsoft\\Internet Explorer\\Download\\RunInvalidSignatures","dword:00000001","REG_DWORD");


1 - The value must be changed inside WPI.hta to (line 116):

WriteRegKey("HKEY_CURRENT_USER\\Software\\Microsoft\\Internet Explorer\\Download\\RunInvalidSignatures",1,"REG_DWORD");


2 - And to restore the default value, add inside core.js (line 563):

WriteRegKey("HKEY_CURRENT_USER\\Software\\Microsoft\\Internet Explorer\\Download\\RunInvalidSignatures",0,"REG_DWORD");


Regards

#52 User is offline   Whatsup 

  • Newbie
  • Group: Members
  • Posts: 42
  • Joined: 11-February 10

Posted 05 April 2013 - 11:57 AM

View Postmyselfidem, on 02 April 2013 - 01:15 PM, said:

I use this workaround to display the timer inside Installer.hta:

Inside timers.js

Replace function ins_iTimer() with:

Tested and works fine for me! Thanks to share your result!

*Edit: I spent days and days to find this workaround!

Wow thx..yes it works..did small test,and timer running nice en smooth.
I search oc to...but ****@#&%$#^^ nothing seems to help.(i'm no scripter).
but you did it!!!!

Very nice found men.thx

Grt Whatsup

#53 User is offline   myselfidem 

  • Member
  • PipPipPipPipPipPipPipPip
  • Group: Members
  • Posts: 2,395
  • Joined: 06-January 10
  • OS:Windows 7 x86
  • Country: Country Flag

Posted 05 April 2013 - 12:05 PM

Thanks Watsup! ;)

Some help found here:

http://inst.eecs.ber...su02/hw/js5.htm

Test: we can save the file as HTA and launch it!

Timer.hta
Spoiler


Enjoy!


This post has been edited by myselfidem: 05 April 2013 - 01:10 PM


#54 User is offline   bphlpt 

  • MSFN Expert
  • PipPipPipPipPipPip
  • Group: Members
  • Posts: 1,082
  • Joined: 12-May 07

Posted 05 April 2013 - 01:31 PM

LOL I guess you didn't like my shortened version for some reason?

Cheers and Regards

#55 User is offline   myselfidem 

  • Member
  • PipPipPipPipPipPipPipPip
  • Group: Members
  • Posts: 2,395
  • Joined: 06-January 10
  • OS:Windows 7 x86
  • Country: Country Flag

Posted 05 April 2013 - 01:41 PM

View Postbphlpt, on 05 April 2013 - 01:31 PM, said:

LOL I guess you didn't like my shortened version for some reason?

Cheers and Regards


Thanks bphlpt for your input! :)

Let Kels make a choice for the next release!

Cheers and regards.

#56 User is offline   Whatsup 

  • Newbie
  • Group: Members
  • Posts: 42
  • Joined: 11-February 10

Posted 05 April 2013 - 02:14 PM

Hoi..

Thx for compleet Timer.hta myselfidem.
Also thanks bphlpt.

Grt Whatsup

#57 User is offline   bphlpt 

  • MSFN Expert
  • PipPipPipPipPipPip
  • Group: Members
  • Posts: 1,082
  • Joined: 12-May 07

Posted 05 April 2013 - 04:13 PM

View Postmyselfidem, on 05 April 2013 - 01:41 PM, said:

Let Kels make a choice for the next release!


That's very appropriate. :)

Cheers and Regards

#58 User is offline   Kelsenellenelvian 

  • WPI Guru
  • Group: Developers
  • Posts: 8,326
  • Joined: 18-September 03
  • OS:Windows 7 x64
  • Country: Country Flag

Posted 05 April 2013 - 11:43 PM

I am fine with either if the code works on both.

Personally I would go with the cleaner version.

@ myselfidem thank you for your fix and mod

@ bphlpt thank you for cleaning myselfidem's code up a bit.

This post has been edited by Kelsenellenelvian: 05 April 2013 - 11:47 PM


#59 User is offline   myselfidem 

  • Member
  • PipPipPipPipPipPipPipPip
  • Group: Members
  • Posts: 2,395
  • Joined: 06-January 10
  • OS:Windows 7 x86
  • Country: Country Flag

Posted 06 April 2013 - 02:03 AM

The two codes works fine, Kels. Tested!

Thanks and Regards

#60 User is offline   gilles_gros 

  • Group: Members
  • Posts: 7
  • Joined: 25-August 06

Posted 06 May 2013 - 04:32 AM

Hi all,

After posting on wincert a fix for my usage, I propose you the following change.
I was willing to use an IF statement as a cmd iun WPI. And it did not work.
cmds[pn]=[' "%wpipath%\\PathToExe\\MainExe.exe" /s /v/qn',
     '{CMD} IF EXIST "%wpipath%\\PathToExe\\ExeFile.exe" start "Title" /WAIT   "%wpipath%\\PathToExe\\ExeFile.exe" /s /v/qn'];
 cond[pn]=['FileExists("%wpipath%\\PathToExe\\MainExe.exe")'];


I track done a change in installer.js (on line 1080 WPI 8.6.3)
case 'CMD': 
     cmd="CMD /C " + cmd; 
     fsoCmd=true; 
     break;


As added by myselfidem, to add the possibility to choose the CMD command in WPI menu, the following changes are needed in configwizard.js

on line 363:
CommandsMenuBar.addNewChild("cmd_dos2", 11, "dos_cmd", "Cmd", false, "", "");

on line 632:
case 'dos_cmd':
	HandleCommandsSelectionMenu("{CMD} ");
	break;


Regards.

Share this topic:


  • 4 Pages +
  • 1
  • 2
  • 3
  • 4
  • You cannot start a new topic
  • You cannot reply to this topic

2 User(s) are reading this topic
0 members, 2 guests, 0 anonymous users



All trademarks mentioned on this page are the property of their respective owners
Copyright © 2001 - 2013 msfn.org
Privacy Policy