Francesco Posted September 12, 2011 Share Posted September 12, 2011 (edited) CauseWPI doesn't include the required code for detecting when the window is closed.SolutionIn 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();NoteThis 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 September 12, 2011 by Francesco Link to comment Share on other sites More sharing options...
Kelsenellenelvian Posted September 12, 2011 Share Posted September 12, 2011 done Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now