gregorsamsa11 Posted March 18, 2009 Posted March 18, 2009 I have an HTA application originally written for WinPE 1.2 using JavaScript. I'd like to port it to WinPE 2.0, but there seems to be no JavaScript support. Googling has turned up no information on the subject, so I was hoping someone could enlighten me. Is there any reasonable way to get JavaScript support with WinPE 2.0?Thanks!
gregorsamsa11 Posted March 18, 2009 Author Posted March 18, 2009 I should clarify the situation. I created a WinPE 2.0 image which includes the HTA-suppport and Scripting packages. I also wrote the following "hello,world" hta/javascript program and added it to the image. When I boot the image and run the hta file, it is apparent that neither of the two JavaScript statements are executed.I did find one obscure post somewhere claiming that JavaScript is supported, but nothing else I've read or done confirms that.<html><head><title>My application</title><hta:application id="MyApp" applicationName="My application" > </head><body> <script language = JavaScript> <!-- document.write("Hello, World"); alert("Hello, World"); //--> </script> </body> </html>
allanf Posted March 19, 2009 Posted March 19, 2009 pre-WAIK (before Vista) -> WinPE 1.xWAIK 1.0 (Vista) -> WinPE 2.0WAIK 1.1 (Vista SP1) -> WinPE 2.1WAIK 2.0 (Win7 beta) -> WinPE 3.0I tried your hta in WinPE 2.1 and WinPE 3.0.In WinPE 2.1, it requires the XML Package as well as HTA and Scripting Host. BTW, nice hta! ... ....I can't say for certain, but assume the situation is the same for WinPE 2.0, although I seem to remember that once upon a time, an hta needed to be executed with mshta.exe ... ... which is not the case now.AFAIK, for WinPE 3.0, the base winpe.wim now includes XML and it is no longer an optional Package. However, the javascript part of your hta does not work in WinPE 3.0, even with all the other OS Packages installed. ... ... At least with my attempt.Perhaps someone else can figure it out.Regards
Tripredacus Posted March 19, 2009 Posted March 19, 2009 You can try using VBScript, which should be similar enough for you to write your functions with. It works fine in PE 2.0.
gregorsamsa11 Posted March 19, 2009 Author Posted March 19, 2009 Adding in the XML package did the trick. I'm using WinPE 2.1 as it turns out, so the 3.0 issue is not a problem for me. Your efforts are much appreciated. Thanks, mate.
gregorsamsa11 Posted March 19, 2009 Author Posted March 19, 2009 I have an existing HTML application that uses JavaScript, so I was hoping to avoid a rewrite in VBscript. I've got it running, so I'm happy.
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now