Hi,
I've created the simple code below for an HTA application which has a button to launch Notepad.
The script works fine on Windows 2003 and Windows XP.
My problem is when I try to use the script on Windows PE 2.0.
- The HTA application loads fine but when I click the button to launch Notepad I get the error below.
The error is actually blank without any data in it and I cannot close the error or the HTA app without use "Taskkill" to end the entire HTA application.
NOTE: I have added the HTA, WMI and Scripting packages in the Windows PE Build.
Anyone have any idea what is wrong?
Thanks in advance for any help on this.
Script Code for test.hta
Dave Namou, MCSE CCEA
I've created the simple code below for an HTA application which has a button to launch Notepad.
The script works fine on Windows 2003 and Windows XP.
My problem is when I try to use the script on Windows PE 2.0.
- The HTA application loads fine but when I click the button to launch Notepad I get the error below.
The error is actually blank without any data in it and I cannot close the error or the HTA app without use "Taskkill" to end the entire HTA application.
NOTE: I have added the HTA, WMI and Scripting packages in the Windows PE Build.
Anyone have any idea what is wrong?
Thanks in advance for any help on this.
Code:
[Internet Explorer Script Error]
An Error has occured in the script on this page.
Line:
Char:
Code:
URL:
Do you want to continue running scripts on this page?
[yes] [no]
Script Code for test.hta
Code:
<HTML>
<HEAD>
<TITLE>Menu</TITLE>
<HTA:APPLICATION
ID = "MyMenu"
APPLICATIONNAME = "Menu"
>
<Script language="VBScript">
Sub RunCmd
Dim WshShell
Set WshShell = CreateObject("WScript.Shell")
WshShell.Run "Notepad.exe", 1, true
End Sub
</Script>
</HEAD>
<BODY>
<Input type="button" value="Run CMD" name="RunCMD" onclick="RunCMD">
</BODY>
</HTML>
Dave Namou, MCSE CCEA