Jump to content

Languages, Themes, Manuals & Mods


Recommended Posts


in WPI.hta, wasn't this:

	    else if (ver<870)	    {		    if (confirm(configFile+"\n\n"+getText(txtUpdateConfig3)))		    {			UpdateWizard1();			RefreshWPI();		    }

supposed to be this:

	    else if (ver<870)	    {		    if (confirm(configFile+"\n\n"+getText(txtUpdateConfig3)))		    {			UpdateWizard3();			RefreshWPI();		    }

And I thought you were going to get rid of the "while" and "break" statements, or was that what you meant by "the first codes suggested can gives themes errors"? If you could explain the theme errors I would like to fix the code to avoid the errors, but still use cleaner code if possible.

Cheers and Regards

Link to comment
Share on other sites

Yes, I changed all files and codes, because the displayed layout is distorted. It occurs when we try to jump config files 7.0.0 to 7.2.0+ and 8.7.0+.

With the new files given the layout is retained properly.

*Edit: New files working and shared as test:

http://www.mediafire.com/download/yty411iapdb243p/New_FilesTest.rar

Edited by myselfidem
Link to comment
Share on other sites

Inside registry_dos.js:

Change (line 586):

if (FileExists(ReplacePath("%windir%\\Fonts\\" + fontName)))

To:

if (FileExists(ReplacePath(windir+"\\Fonts\\" + fontName)))

Inside installer_reboot.js:

Remove (lines 47 and 48):

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

Inside WPI.hta

We can change, lines 432 and 446:

strFile=ReplacePath('"%sysdir%\\mshta.exe" "'+wpipath+'\\Common\\Installer.hta"');

To:

strFile=ReplacePath('"'+sysdir+'\\mshta.exe" "'+wpipath+'\\Common\\Installer.hta"');

All tested and works fine!

Regards

Edited by myselfidem
Link to comment
Share on other sites

  • 1 month later...

Yes, it's really OK Kels!

Summary:

Change inside Installer.hta:

function PauseInstaller(){	if (!UserPaused)	{		UserPaused=true;		WriteRegKey("HKEY_CURRENT_USER\\Software\\WPI\\UserPaused",1,"REG_DWORD");		document.getElementById("Pause").innerHTML=getText(btnResume);		document.getElementById("AbortButton").disabled=true;				return;	}	else	{		UserPaused=false;		WriteRegKey("HKEY_CURRENT_USER\\Software\\WPI\\UserPaused",0,"REG_DWORD");		document.getElementById("Pause").innerHTML=getText(btnPause);		document.getElementById("AbortButton").disabled=false;	}}</script>

Change inside WPI.hta:

script type="text/javascript">	var ver;	ver=GetConfigVersion();	while (ver>-1)	{		if (ver<720)		{			if (confirm(configFile+"\n\n"+getText(txtUpdateConfig)))			{				UpdateWizard1();				RefreshWPI();			}			else			{				alert("You should remove config.js from the WPIScripts folder\nbefore continuing.  Then run WPI again.");				self.close();			}			break;		}		else if (ver<770)		{		    if (confirm(configFile+"\n\n"+getText(txtUpdateConfig2)))	            {	                NeedUpdateWizard=2;	            }	            break;	        }  	        else if (ver<800)		{		    break;		}	        else if (ver<870)	        {		    if (confirm(configFile+"\n\n"+getText(txtUpdateConfig3)))		    {			UpdateWizard1();			RefreshWPI();		    }		    break;		}	        else	            break;    }	document.write('<script type="text/javascript" src="'+configFile+'" application="yes"></' + 'script>');

Inside configwizard.js, add from on line 2804:

        }	else if (val>800 && val<870)	{	if (Alert("",getText(txtUpdateConfig3),getText(lblOK)+"|"+getText(lblCancel),"",5,0,0,0))	{	UpdateWizard1();	RefreshWPI();	}

Add from line 2918:

case "bit64":	configList[pn-2].bit64=val;	break;

Change the line 3105 to:

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

Inside lang_en.js, add line 1031:

txtUpdateConfig3[lang]		    = ['This is an old config file (before v8.7.0).\n\nWould like it to be updated?\n\nMake a backup copy first.'];

Inside globals_lang.js, add:

var txtUpdateConfig3 = [],

Many changes inside (Thanks to check if it's OK):

function UpdateCommand(cmd)

Inside jscript.js, revert back and add (from line 44):

function TimedWaitForProgram(ImageName,HowLong){ 	position="jscript.js";	whatfunc="TimedWaitForProgram()";	var Elapsed=3;	Pause(3,0);	while (Elapsed<=HowLong*60)	{		var oExec = WshShell.Exec('tasklist.exe');		while (oExec.Status == 0)			Pause(0,100);		var Output = oExec.StdOut.ReadAll() + oExec.StdErr.ReadAll();		if (Output.search(ImageName)==-1)			return;		Pause(3,0);		Elapsed += 3;	}}

Inside installer.js, change from line 1074 to:

document.getElementById("InstallItem").innerHTML = getText(lblViewing)+" " + cmd;            cmd = '"'+ReplacePath("%programfiles%\\Internet Explorer\\iexplore.exe")+'"' + cmd;

From line 1395 (downloading files improvement)::

if (FileExists(windir+"\\System32\\WindowsPowerShell\\v1.0\\powershell.exe"))   {     cmdLine = 'Powershell -NoProfile Import-Module BitsTransfer -cmdlet Start-BitsTransfer; Start-BitsTransfer -Source ' + URL + ' -Destination "$env:temp\\'+Filename+'" -TransferType Download';     fsoCmd = true;     }     else     {     cmdLine = '"'+wpipath+'\\Tools\\BitsAdmin.exe" /transfer WPI /download /priority high ' + URL + ' "%TEMP%\\'+Filename+'"';     fsoCmd = true;     }      if (AlwaysShowOutputWindow || ShowDownloadOutput)   fsoCmd = false;   ReturnCode = WshShell.Run(ReplacePath(cmdLine), fsoCmd ? 0 : 1, true);   if (ReturnCode == 0)   WriteLogLine(cmdName + ' ' + getText(InstallDownloadSuccess) + ' (' + getText(ReturnedCode) + ' ' + ReturnCode + '): ' + URL);   else   WriteLogLine(cmdName + ' ' + getText(InstallDownloadFail) + ' (' + getText(ReturnedCode) + ' ' + ReturnCode + '): ' + URL);   UpdateInstallList(("div" + i + "_" + j + "_" + FailNum), "");   cmd = ReplacePath('"%TEMP%\\'+Filename+'"' + Args) || ReplacePath('"$env:temp\\'+Filename+'"' + Args);   return cmd;}

timers.js working:

function ins_iTimer()  // this doesn't work correctly at midnight...{   position="timers.js";   whatfunc="ins_iTimer()";   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);   var seconds=elapsedSecs - (minutes*60);   var txt=((hours < 10) ? "0" : "") + hours + ((minutes < 10) ? ":0" : ":") + minutes + ((seconds < 10) ? ":0" : ":") + seconds;   document.getElementById("TimerDisplay").innerHTML=txt;      var timerID=setTimeout("ins_iTimer()",1000);  // Update display}

All tested and works fine!

Thanks bphlpt for your help.

New lang_fr.js (attached).

Regards

*Edit: I think we can revert back inside networkwizard.js an change the line 2121 to:

tf.WriteLine("// WPI Network Options 8.0.0");

*EDIT 2: After all the day making tests I see we must revert like my updated post, because the first codes suggested can gives themes errors.

When we use an old file number config.js 7.0.0

Now, after many tests I think it's OK. No need to jump to 7.0.0 to 7.2.0+ and 8.7.0+

Regards

*Edit: post updated

Marking for looking over and retesting...

Link to comment
Share on other sites

Ok guys I can now fully say that this:

script type="text/javascript">    var ver;    ver=GetConfigVersion();    while (ver>-1)    {        if (ver<720)        {            if (confirm(configFile+"\n\n"+getText(txtUpdateConfig)))            {                UpdateWizard1();                RefreshWPI();            }            else            {                alert("You should remove config.js from the WPIScripts folder\nbefore continuing. Then run WPI again.");                self.close();            }            break;        }        else if (ver<770)        {         if (confirm(configFile+"\n\n"+getText(txtUpdateConfig2)))     {     NeedUpdateWizard=2;     }     break;     }     else if (ver<800)        {         break;        }     else if (ver<870)     {         if (confirm(configFile+"\n\n"+getText(txtUpdateConfig3)))         {            UpdateWizard1();            RefreshWPI();         }         break;        }     else     break;}    document.write('<script type="text/javascript" src="'+configFile+'" application="yes"></' + 'script>');

Is causing some very horrendous errors, primarily with WPI setups that are reconfigured on a x64 system.

Reverting to the previous code stops the errors.

Link to comment
Share on other sites

<script type="text/javascript">	var ver;	ver=GetConfigVersion();	while (ver>-1)	{		if (ver<720)		{			if (confirm(configFile+"\n\n"+getText(txtUpdateConfig)))			{				UpdateWizard1();				RefreshWPI();			}			else			{				alert("You should remove config.js from the WPIScripts folder\nbefore continuing.  Then run WPI again.");				self.close();			}			break;		}		else if (ver<770)		{		    if (confirm(configFile+"\n\n"+getText(txtUpdateConfig2)))	        {	        NeedUpdateWizard=2;	        }	        break;	    }  	    else if (ver<800)		{		    break;		}	    else if (ver>=800 && ver<870)	    {		    if (confirm(configFile+"\n\n"+getText(txtUpdateConfig3)))		    {			NeedUpdateWizard=2;		    }		    break;		}	    else	      break;    }	document.write('<script type="text/javascript" src="'+configFile+'" application="yes"></' + 'script>');

Have you tried the new code given as example to test ?

Link to comment
Share on other sites

Hey Kel,

Did you happen to check if my suggested code replacement caused the same errors? myselfidem said it worked, but apparently he decided not to use it for some reason.

[NOTE: I think this is the same segment. I haven't looked too closely, but I'm sure you can see what I intended anyway. Mainly I got rid of the while and the break statements.]

	var ver=GetConfigVersion();	if (ver<0) {/* Do Nothing */;}	else if (ver<720)	{		if (confirm(configFile+"\n\n"+getText(txtUpdateConfig)))		{			UpdateWizard1();			RefreshWPI();		}		else		{			alert("You should remove config.js from the WPIScripts folder\nbefore continuing.  Then run WPI again.");			self.close();		}	}	else if (ver<770) {NeedUpdateWizard=2;}	else if (ver<800) {/* Do Nothing */;}	else if (ver<870)	{		if (confirm(configFile+"\n\n"+getText(txtUpdateConfig3)))		{			UpdateWizard3();			RefreshWPI();		}	}	else {/* Do Nothing */;}	document.write('<script type="text/javascript" src="'+configFile+'" application="yes"></' + 'script>');

Cheers and Regards

Link to comment
Share on other sites

That does and doesn't work. The main interface works and the entries show but the options and themes are not applied.

I get a windowed interface at full screen and the default windows theme. Even going into the windows and resetting them does not work.

The fault lies within the edits made to wpi.hta. I have been running tests for 3 weeks on this.

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