Ok, I've finally found a fix.
The root problem was that the WMI (Windows Management Instrumentation) service was missing and so I had to add these lines to RunOnceEx.cmd before launching wpi.hta:
REM Register WMI
cd /d %windir%\system32\wbem
for %%i in (*.dll) do RegSvr32 -s %%i
scrcons.exe /RegServer
unsecapp.exe /RegServer
winmgmt.exe /Regserver
wmiadap.exe /RegServer
wmiapsrv.exe /RegServer
wmiprvse.exe /RegServer
Thank you mritter for the info in your replies.

QUOTE (icnocop @ Jul 18 2008, 03:32 PM)

Ok, it seems that the line number was misleading (as usual in javascript)
The script error actually occurs in core.js line 102:
var OSProps = GetObject("winmgmts:").InstancesOf("Win32_OperatingSystem");
I will try to troubleshoot this issue further, since maybe wmi is disabled on this machine or something.
QUOTE (icnocop @ Jul 18 2008, 12:20 PM)

Hi.
WPI v6.5.1 on Windows XP Professional x64 Edition with SP2 integrated produces "Invalid syntax" error in wpi.hta on line 103 char 5. (See attachment)
I am using RunOnceEx.cmd to run wpi in this manner:
%DVD%\WPI\WPI.hta timer=0
line 103: timerSecs = WPIcmdArgs[15];
However, if I run wpi.hta after manually finishing installing windows xp professional x64, I do not get this error.
Any ideas \ work-arounds?
This seems like an issue with Internet Explorer, but I'm not sure how to fix it.
Thank you.