Jump to content

[BUG+FIX] LoadDesktopBeforeInstall breaks after a wizard is closed


Recommended Posts

Description

If a configuration wizard is closed and LoadDesktopBeforeInstall is enabled when starting the install WPI will just close and start after a reboot.

Cause

There is a bug in how WPI.hta parses the command line that triggers when the WPI window is refreshed after a wizard has been closed.

Solution

In WPI.HTA replace

	var fullpath, regexpSearch, argLine, WPIcmdArgs;

fullpath=new String(unescape(document.location));
fullpath=fullpath.replace("file:///","").replace("file:","").replace(/\//g,"\\\\").replace(/\$/g,"\\$");
regexpSearch=new RegExp('^"'+fullpath+'"',"i");
argLine=new String(oWPI.commandLine.replace(regexpSearch,''));

with

	var startQuotePos, endQuotePos, regexpSearch, argLine, WPIcmdArgs;
argLine = oWPI.commandLine;
if ((startQuotePos = argLine.indexOf('"')) == 0 && (endQuotePos = argLine.indexOf('"',startQuotePos+1)) > -1)
argLine=argLine.substring(endQuotePos+1);

Edited by Francesco
Link to comment
Share on other sites


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