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.

Fix for 'undefined' reboot error in WPI 6.5.1

Featured Replies

It really tooks a long way to locate this bug in VMware!

E.g.: the 'undefined' error comes up if you have the 'LogInstallation' flag in 'useroptions.js' disabled

and choose only one menu entry containing the %reboot% command:

config.js
...
pn=1;
prog[pn]=['APP 1 - Reboot'];
ordr[pn]=[101];
desc[pn]=['Test APP 1'];
uid[pn]=['APP1'];
dflt[pn]=['yes'];
cat[pn]=['System'];
forc[pn]=['no'];
cmd1[pn]=['"%wpipath%\\Install\\APP_1.cmd" %wpipath%\\'];
cmd2[pn]=['%reboot% 10'];
pn++;

prog[pn]=['APP 2'];
ordr[pn]=[102];
desc[pn]=['Test APP 2'];
uid[pn]=['APP2'];
dflt[pn]=['yes'];
cat[pn]=['System'];
forc[pn]=['no'];
cmd1[pn]=['"%wpipath%\\Install\\APP_2.cmd" %wpipath%\\'];
pn++;
...

The machine reboots and then 'Installer.hta' throws an 'undefined' error and

terminates:

Installer.hta
...

// Check for ResumeInstall registry entries
try
{
CurrentInstall=WshShell.regRead("HKEY_CURRENT_USER\\Software\\WPI\\CurrentInstall");
LastExec=WshShell.regRead("HKEY_CURRENT_USER\\Software\\WPI\\LastExec");
LastTopLine=WshShell.regRead("HKEY_CURRENT_USER\\Software\\WPI\\LastTopLine");
Language=WshShell.regRead("HKEY_CURRENT_USER\\Software\\WPI\\Language");

// ===>
LogPath[0]=WshShell.regRead("HKEY_CURRENT_USER\\Software\\WPI\\LogPath");
// ===> this line throws 'undefined' if the REG entry does not exist !!!
// ===> then WPI exits

numCommands=WshShell.regRead("HKEY_CURRENT_USER\\Software\\WPI\\numCommands");
curCommand=WshShell.regRead("HKEY_CURRENT_USER\\Software\\WPI\\curCommand");
}
catch (ex)
{
alert(getText(UnableToResumeInstall));
try
{
WshShell.regWrite("HKEY_CURRENT_USER\\Software\\WPI\\ResumeInstall",0,"REG_DWORD");
}
catch (ex)
{;}
ExitWPI();
}
...

The solutions is quite simple: writing the REG 'LogPath' entry by default:

WPI.hta
...
<script type="text/javascript">
try
{
WshShell.regWrite("HKEY_CURRENT_USER\\Software\\WPI\\Theme",Theme,"REG_SZ");
WshShell.regWrite("HKEY_CURRENT_USER\\Software\\WPI\\Language",Language,"REG_SZ");
WshShell.regWrite("HKEY_CURRENT_USER\\Software\\WPI\\PlayAudioInInstaller",PlayAudioInInstaller,"REG_SZ");
WshShell.regWrite("HKEY_CURRENT_USER\\Software\\WPI\\AudioVolume",Volume,"REG_SZ");

// ===> insert the following line
// ===> to fix

WshShell.regWrite("HKEY_CURRENT_USER\\Software\\WPI\\LogPath",LogPath,"REG_SZ");

// ===>

}
catch (ex)
{;}
</script>
...

Also the 'undefinied' message - when installing Office2003 - is gone...

That's it - I hope you like it :)

Thanks. I put your additional line in install_log.js instead. A "default" entry was not being written. It now writes a "blank" path if Log Installation is not checked.

  • Author
Thanks. I put your additional line in install_log.js instead.

Hi,

I think that's just the problem: the flag 'LogInstallation=false' from 'useroptions.js' prevents the setting of the reg key entry - look in 'installer_log.js' - if (LogInstallation) ... . Therefore I put the code add in WPI.hta to secure that the entry is written ever.

Right, it was. But installer.js is where the log entry is called from, not wpi.hta. In installer.js I updated

function OpenLogFile()
{
position="installer_log.js";
whatfunc="OpenLogFile()";

var logFile;
var stamp, month, date, hours, minutes, seconds;
var TheDate = new Date();

if (LogInstallation)
{
if (LogPath=="")

..........

}
else
write default blank reg key here
}


function LogGlobalVariables()
{

This way if Log Installation is checked the official key is written. If not checked a blank one is written just so the read won't error.

  • Author
Right, it was. But installer.js is where the log entry is called from, not wpi.hta. In installer.js I updated

This way if Log Installation is checked the official key is written. If not checked a blank one is written just so the read won't error.

You are right - the call comes from installer.js - my mistake!

Edited by wwsmith

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.