Jump to content

WPI 8.6 and beyond bug\bugfix thread


Recommended Posts

enable64bit can be removed since the launcher when possible always run MSHTA in 64bit mode.

From configwizard.js remove:

document.getElementById("bit64").checked=configList[pos].bit64=="yes" ? 1 : 0;
and
configList[pos].bit64=document.getElementById("bit64").checked ? "yes" : "no";
and
entry.bit64="no";
and
document.getElementById("bit64").disabled=state;
and
     case "bit64":      configList[pn-2].bit64=val;      break;
and
   WriteConfigValue(tf, "bit64", configList[i].bit64,0);
and
document.getElementById("lblEnable64BitProcessing").innerHTML=getText(lblEnable64BitProcessing);

From globals.js remove

var ExecuteBeforebit64=false;
and
var ExecuteAfterbit64=false;
and
var bit64=[];   // Enable 64bit processing

From installer.js remove

   programs[0].bit64=ExecuteBeforebit64==true ? "yes" : "no";
and
   programs[0].bit64="yes";
and
   programs[0].bit64="no";
and
   programs[programs.length-1].bit64=ExecuteAfterbit64==true ? "yes" : "no";
and
   programs[programs.length-1].bit64="no";
and
   programs[programs.length-1].bit64="no";
and
     if (programs[item].bit64=="yes" && OSBits==64)      cmd='"'+sysPath64+'RegEdt32" /S ' + cmd;     else
and
  if (programs[item].bit64=="yes" && OSBits==64)   cmd='"'+sysPath64+'cmd.exe" /C '+cmd;  else

From installer_log.js remove

WriteLogLinePlain("   ExecuteBeforebit64=" + ExecuteBeforebit64);
and
WriteLogLinePlain("   ExecuteAfterbit64=" + ExecuteAfterbit64);

From installer_reboot.js remove

  if (rbProg.bit64 != null)   rbfHandle.WriteLine("programs[prb].bit64=['"+GetConfigValue(rbProg.bit64.toString(),1)+"'];");

From optionswizard.js remove

  getElementById("lblExecuteBeforebit64").innerHTML=getText(lblEnable64BitProcessing);
and
  getElementById("lblExecuteAfterbit64").innerHTML=getText(lblEnable64BitProcessing);
and
  document.getElementById("ExecuteBeforebit64").disabled=false;
and
  document.getElementById("ExecuteBeforebit64").disabled=true;
and
  document.getElementById("ExecuteAfterbit64").disabled=false;
and
  document.getElementById("ExecuteAfterbit64").disabled=true;
and
ExecuteBeforebit64=false;
and
ExecuteAfterbit64=false;
and
  document.getElementById("ExecuteAfterbit64").checked=ExecuteBeforebit64;
and
  document.getElementById("ExecuteAfterbit64").checked=ExecuteAfterbit64;
and
    if (opt=="ExecuteBeforebit64")     document.getElementById("ExecuteBeforebit64").checked=val=="true" ? true : false;
and
    if (opt=="ExecuteAfterbit64")     document.getElementById("ExecuteAfterbit64").checked=val=="true" ? true : false;
and
  tf.WriteLine("ExecuteBeforebit4="+ExecuteBeforebit64+";");
and
  tf.WriteLine("ExecuteAfterbit64="+ExecuteAfterbit64+";");
and
  tf.WriteLine("ExecuteBeforebit64="+document.getElementById("ExecuteBeforebit64").checked+";");
and
  tf.WriteLine("ExecuteAfterbit64="+document.getElementById("ExecuteAfterbit64").checked+";");

From program.js remove

bit64=[];
and
this.bit64=bit64[idx];
and
  bit64[i+1]=programs[i].bit64;

From updatewizard.js remove

   tf.WriteLine('\t\t\t"Bit64" : '+configList.Programs[i].Bit64+',');
and
     case "bit64":      configList[pn-2].bit64=val;      break;
and
  tf.WriteLine("// bit64[pn]=['no'];");
and
   WriteConfigValue(tf, "bit64", configList[i].bit64,0);

From configwizardtemplate_details.htm remove

     <tr>      <td>       <table border="0" cellpadding="0" cellspacing="0">        <tr>         <td>          <input id="bit64" type="checkbox"           onClick="ConfigUpdated();"          >         </td>         <td nowrap>          <div id="lblEnable64BitProcessing" class="opTxt" align="absmiddle"></div>         </td>        </tr>       </table>      </td>      <td>      <!-- next option here -->      </td>     </tr>

From globals_lang.js remove

var lblEnable64BitProcessing=[];

From the language files remove the lines starting with:

lblEnable64BitProcessing[lang]

From optionswizardtemplate_tools.htm remove

      <td>       <table border="0" cellpadding="0" cellspacing="0">        <tr>         <td>          <input id="ExecuteBeforebit64" type="checkbox"           onClick="ConfigUpdated();"          >         </td>         <td>          <div id="lblExecuteBeforebit64" class="opTxt" align="absmiddle"></div>         </td>        </tr>       </table>      </td>
and
      <td>       <table border="0" cellpadding="0" cellspacing="0">        <tr>         <td>          <input id="ExecuteAfterbit64" type="checkbox"           onClick="ConfigUpdated();"          >         </td>         <td>          <div id="lblExecuteAfterbit64" class="opTxt" align="absmiddle"></div>         </td>        </tr>       </table>      </td>

In configwizard.js replace

  tf.WriteLine("// WPI Config 8.0.0");
with
  tf.WriteLine("// WPI Config 8.7.0");

In WPI.HTA after

  else if (ver<800)  {/*   var UpTxt=new String();   UpTxt=getText(txtUpdateConfig);   UpTxt=String(UpTxt).replace("7.2.0","8.0.0");   if (confirm(configFile+"\n\n"+UpTxt))   {    NeedUpdateWizard=800;    break;   }   else   {    alert("You should remove config.js from the WPIScripts folder\nbefore continuing.  Then run WPI again.");    self.close();   }*/   break;  }
insert
  else if (ver<870)  {   var bit64=[];   break;  }
Link to comment
Share on other sites


I found the issue out I was having.

On ie8 this timer code works fine but hangs on ie10:

function ins_iTimer(){position="timers.js";whatfunc="ins_iTimer()";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;}

On ie10 this code works fine yet hangs in ie8:

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}

The easiest way I can see to fix this would be using an if statement but I am having a time getting it to work any ideas?

As soon as this error is fixed I am ready to make the next release.

Changelog:

**** Compiled DHTMLx to v3.6.
**** Remvoed 64bit options as they are auto-enabled.
**** Added Win 2K to conditions.
**** Added {CMD} to the list of functions.
**** Add Win2k to the conditions.
**** Fixed a executebefore64bit error.
**** User file written version updated slightly.
**** Fixed a autologoncount error.
**** Fixed a alert sound location error.
**** More info added to the installer log.
**** Removed more old leftover code.
**** Added setfilesystem to the conditions.
**** More fontinstaller improvements.
**** Tons of textual errors fixed.
**** Added {MSI} to the commands for standard msi files.
**** Added alerts to themewizard when exiting.
**** Fixed a couple of resolution errors.
**** Restored "Float" for the tooltips.
**** Tons of minor features improved.
**** Fixed AutoAdminLogin feature.
**** Added HiPerformance Power Scheme for Win7.
**** Redundant code removal.
**** Theme fixes.
**** Expanded wmi functions.

Edited by Kelsenellenelvian
Link to comment
Share on other sites

As I see it, those two timer routines are different in four different places, shown here. (I moved one line to group it with related lines but I don't think it will make any difference. I also added extra blank lines so the two pieces of code would have the same number of lines.)

Works in IE8

function ins_iTimer(){position="timers.js";whatfunc="ins_iTimer()";var now=new Date();[-1-]var nowSecs=(now.getHours()*60*60) + (now.getMinutes()*60) + now.getSeconds();var elapsedSecs=nowSecs - ins_startSecs;[/-1-] var hours=Math.floor(elapsedSecs/3600);elapsedSecs=elapsedSecs - (hours*3600);var minutes=Math.floor(elapsedSecs/60);[-2-]elapsedSecs=elapsedSecs - (minutes*60);var seconds=elapsedSecs;[/-2-][-3-]var txt="";txt=((hours < 10) ? "0" : "") + hours;txt += ((minutes < 10) ? ":0" : ":") + minutes;txt += ((seconds < 10) ? ":0" : ":") + seconds;document.getElementById("TimerDisplay").innerHTML=txt;[/-3-][-4-] [/-4-]}

Works in IE10

function ins_iTimer(){position="timers.js";whatfunc="ins_iTimer()";var now=new Date();[-1-]var elapsedSecs=((now.getHours()*60*60) + (now.getMinutes()*60) + now.getSeconds()) - ins_startSecs; [/-1-] var hours=Math.floor(elapsedSecs/3600);elapsedSecs=elapsedSecs - (hours*3600);var minutes=Math.floor(elapsedSecs/60);[-2-]var seconds=elapsedSecs - (minutes*60); [/-2-][-3-]document.getElementById("TimerDisplay").innerHTML=((hours < 10) ? "0" : "") + hours + ((minutes < 10) ? ":0" : ":") + minutes + ((seconds < 10) ? ":0" : ":") + seconds;    [/-3-][-4-]var timerID=setTimeout("ins_iTimer()",1000);  // Update display[/-4-]}

I can't imagine that the basic JaveScript math and variable assignments should act differently between IE8 and IE10, which means that the difference should be caused by either [-3-] or [-4-]. Assuming I am right, then:

Should work in IE8

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); var txt=((hours < 10) ? "0" : "") + hours + ((minutes < 10) ? ":0" : ":") + minutes + ((seconds < 10) ? ":0" : ":") + seconds;document.getElementById("TimerDisplay").innerHTML=txt;}

Should work in IE10

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}

If I am not right for some reason, then you can swap out [-1-], then [-2-], etc until you narrow it down further as to which lines are really causing the problem.

Did you mean to leave [-4-] out of the IE8 version?

Anyway, assuming you can narrow it down to as few a number of lines as possible that need to be handled differently in the different versions of IE, and assuming you can tell on which version of IE that WPI is currently running, I would think that you should be able to run the appropriate set of lines using logic similar to:

If IE10 then {IE10 lines} else {IE8 lines}

What does the If logic lines you have tried look like?

Handling the different browser requirements has always been the bane of HTML coding. Good luck!

Cheers and Regards

Edited by bphlpt
Link to comment
Share on other sites

Yes [4] Doesn't play well with ie8 either.

Here's what I have:

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

So my whole code looks like:

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);  if (IE10)  document.getElementById("TimerDisplay").innerHTML=((hours < 10) ? "0" : "") + hours + ((minutes < 10) ? ":0" : ":") + minutes + ((seconds < 10) ? ":0" : ":") + seconds;  var timerID=setTimeout("ins_iTimer()",1000);  // Update display   else  document.getElementById("TimerDisplay").innerHTML=txt;  var txt=((hours < 10) ? "0" : "") + hours + ((minutes < 10) ? ":0" : ":") + minutes + ((seconds < 10) ? ":0" : ":") + seconds;}

Now my only issue is writing a function to tell wpi IE10

Link to comment
Share on other sites

Here's what I have:

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

I assume you meant to say:

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

since you have to define txt before you can display it, don't you? :)

Just out of curiosity, are you sure that this:

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

doesn't work in IE10? If it did, then [-4-] would be the only thing unique about IE10.

Cheers and Regards

Edited by bphlpt
Link to comment
Share on other sites

This does indeed work fine in ie10.

Running a vm install now to test in ie8 again just to make sure.

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);var txt=((hours < 10) ? "0" : "") + hours + ((minutes < 10) ? ":0" : ":") + minutes + ((seconds < 10) ? ":0" : ":") + seconds;document.getElementById("TimerDisplay").innerHTML=txt;}

After test the next release will be ready your first on the list for the release!

Edited by Kelsenellenelvian
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...