Skip to content
View in the app

A better way to browse. Learn more.

MSFN

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

[BUG+FIX] A javascript error is shown before reboots

Featured Replies

Cause

A wrong function call in installer.js causes the error

Solution

In installer.js replace

pause(3600,0);				// Give some time for {reboot} to take affect

with

Pause(3600,0);				// Give some time for {reboot} to take affect

  • Author

I belive you got this one wrong I find alot os pausenew bot no pause with the 3600,0 denominator

I re-downloaded the WPI8.2.2 code and in installer.js there are three instances of that line:

			if (CheckPendingFileRenameOperations())
{
WriteRegKey("HKEY_CURRENT_USER\\Software\\WPI\\CurrentPFRO",i,"REG_DWORD");

CheckAutoLogonCount();

cmdLine='"'+sysdir+'\\shutdown.exe" -r -f -t 10 -c "'+getText(ComputerWillRestartPFRO)+'"';
RunCmd(cmdLine,false,true);
pause(3600,0); // Give some time for {reboot} to take affect
}

			if (programs[i].repeatcommand=="yes")
{
var RepeatCommand=RegKeyValue("HKEY_CURRENT_USER\\Software\\WPI\\LastExec");
WriteRegKey("HKEY_CURRENT_USER\\Software\\WPI\\LastExec",RepeatCommand-1,"REG_DWORD"); //Save current position for reboots

FailNum++;
WriteRegKey("HKEY_CURRENT_USER\\Software\\WPI\\FailNum",FailNum,"REG_DWORD");
}

cmdLine='"'+sysdir+'\\shutdown.exe" -r -f -t 5 -c "'+getText(ComputerWillRestart)+'"';
RunCmd(cmdLine,false,true);
pause(3600,0); // Give some time for {reboot} to take affect

	if (IsReboot)
{
CheckAutoLogonCount();

box='';
box+='<table border="0" width="100%" cellpadding="0" cellspacing="0">';
box+='<tr><td class="InstallText" nowrap>';
box+='<img src="../Common/imgs/spacer.gif" border="0" width="20" height="1">';
box+=getText(lblCommand)+' '+cmdNum+'...';
box+='</td><td width="100%">';
if (!ShowInstallerImages)
box+='<div id="div'+item+'_'+cmdNum+'_'+FailNum+'" class="InstallSuccess" style="position:relative; top:0px; left:0px; width:100%;">'+getText(txtInstallSuccess)+'</div>';
else
box+='<div id="div'+item+'_'+cmdNum+'_'+FailNum+'" class="InstallSuccess" style="position:relative; top:0px; left:0px; width:100%;"><img src="../Themes/'+Theme+'/Install_Success.png" border="0" width="16" height="16"></div>';
box+='</td></tr></table>';
AddHistoryEntry(box+"\n");

pause(3600,0); // Give some time for {reboot} to take affect
}

Maybe the spacing was changed when I posted the message so an exact search of the line doesn't work: try looking only for pause(3600,0);

Create an account or sign in to comment

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.