Jump to content

[BUG+FIX] Closing WPI with Alt+F4 doesn't restore IE debug setting


Recommended Posts

Posted (edited)

Cause

WPI doesn't include the required code for detecting when the window is closed.

Solution

In WPI.HTA below

window.onError=handleErrors; // or null to suppress error message

add

window.onbeforeunload=WPIUnloading;

In Api.js replace

document.location.reload();

with

RefreshWPI();

and below

whatfunc="CheckKey()";

add

	if (window.event.keyCode==116)
SetNotExitingFlag();

In updatewizard.js replace TWICE

document.location.reload();

with

RefreshWPI();

In tips.js replace

location.reload();

with

RefreshWPI();

In themewizard.js replace

document.location.reload();

with

RefreshWPI();

In optionswizard.js replace

document.location.reload();

with

RefreshWPI();

In networkwizard.js replace

document.location.reload();

with

RefreshWPI();

In main.js replace

document.location.reload();

with

RefreshWPI();

In configwizard.js replace TWICE

document.location.reload();

with

RefreshWPI();

In installer.js replace

	if (!ResumeInstall)
document.location="file:///"+strFile.replace(/\\/g, '/');

with

	if (!ResumeInstall)
{
SetNotExitingFlag();
document.location="file:///"+strFile.replace(/\\/g, '/');
}

In core.js below

	DeleteRegKey("HKEY_CURRENT_USER\\Software\\WPI\\SndWPIExit");
}

add

var NotExiting = false;

function SetNotExitingFlag()
{
NotExiting = true;
}

function RefreshWPI()
{
SetNotExitingFlag();
document.location.reload();
}

function WPIUnloading()
{
if (!NotExiting)
ExitWPI();
}

and below

function ExitWPI()
{

add

	SetNotExitingFlag();

Note

This fix also forces WPI to clear the keys also when closed with the jumpstart close button on Win7 or the window Close button that is enabled using the updated launcher attached on this forum post.

Edited by Francesco

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
  • Recently Browsing   0 members

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