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.

WPI6.5.1 Bug and Fix on %root% variable value on reboot (in config.js)

Featured Replies

:whistle:

Hello, i found a bug in WPi 6.5.1. (i hope it 's new !). The %root% variable doesn't work after a reboot (%root% you put in your config.js). In Fact it's the same king of bug than my post on 'Bug in installer.hta in wpi 6.3 & 6.4' last 4 april 2008. -->http://www.msfn.org/board/Bug-in-Installer...ded#entry751972

But, i correct it better. I change defaut_wpi() fonction in wpiscript\core.js, and i suppress now line 69 in installer.hta

Explanation : First Wpi Runs wpi.hta, and when WPi Reboot, it runs installer.hta... installer.hta runs default_wpi() function. But this one, make wrong path because "document.location" value change (....\WPI\common instead of ....\Wpi\). So i correct defaut_wpi() function, and now if we call this function, the variable %wpipath% and %root%, stay same values. By analzing code, i can say just the two variables root and wpipath, was touched by this bug.

Line 69 of installer.hta

wpipath=wpipath.substring(0,wpipath.lastIndexOf('\\'));			 //Remove the 'Common' folder from wpipath

Add after Line 19 of core.js

  if (wpipath.indexOf("Common")>0)	
{
wpipath = wpipath.substring(0,wpipath.lastIndexOf("\\")); //Remove the 'Common' folder from wpipath
}

line 19 of core.js (for information, d'ont change)

	wpipath = wpipath.replace("file:///","").replace(/\//g,"\\");

I send you the fix, on WPI6.5.1 source, with the new installer.hta and core.js

put instaler.hta in %wpipath%\common\

put core.js in %wpipath\WPIScript\

New_Installer_core.zip

Nearly same explanation in french...

Explication en Français !

WPI6.5.1 Bug sur la valeur de la variable %root% au reboot de wpi (dans config.js)

Bonjour, j'ai trouvé un nouveau bug dans WPi 6.5.1. En fait, c'est une erreur similaire à celle décrite dans mon message 'Bug in installer.hta in wpi 6.3 & 6.4' du 4 avril 2008. Je la corrige en la comprenant mieux maintenant !

La variable %root% (mise dans un config.js), n'a pas la bonne valeur après un reboot lancer par WPi.

En effet, au reboot Wpi lance installer.hta qui lance la fonction default_wpi(), et qui fait appel à l'instruction

"document.location", qui donne (....\WPI\commmon au lieu de ....\Wpi\). J'ai donc corrigé les fichiers

installer.hta et core.js. Dans installer.hta je supprime la ligne 69. Dans core.js, j'ajoute un test qui supprime,

le "common" du chemin. Et comme %root% est calculé à partir de %wpipath%, cette dernière variable est corrigé aussi. En regardant le code plus en détail, seules les variables %wpipath% et %root%, étaient concernées par cette erreur.

mettre installer.hta dans %wpipath%\common\

mettre core.js dans %wpipath\WPIScript\, %wpipath%, étant le répertoire d'installation de wpi

New_Installer_core.zip

Edited by Rackam le rouge

Thanks. I already have this fixed. Same idea you had:

core.js

	// %wpipath%
wpipath = unescape(document.location);
wpipath = wpipath.substring(0,wpipath.lastIndexOf("/"));
wpipath = wpipath.replace("file:///","").replace(/\//g,"\\");

if (ResumeInstall)
wpipath=wpipath.substring(0,wpipath.lastIndexOf('\\')); //Remove the 'Common' folder from wpipath

Rebooting works OK now with WPI.hta from a USB stick, but still fails when starting wpi.hta from a permanently mounted network drive

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.