MSFN Forum: [BUG+FIX] LoadDesktopBeforeInstall breaks after a wizard is closed - MSFN Forum

Jump to content


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

[BUG+FIX] LoadDesktopBeforeInstall breaks after a wizard is closed Rate Topic: -----

#1 User is offline   Francesco 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 394
  • Joined: 20-March 04

Posted 12 September 2011 - 02:40 AM

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);

This post has been edited by Francesco: 12 September 2011 - 02:41 AM



#2 User is offline   Kelsenellenelvian 

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

Posted 12 September 2011 - 04:34 AM

done

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

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



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