gregorsamsa11 Posted March 18, 2009 Share 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! Link to comment Share on other sites More sharing options...
gregorsamsa11 Posted March 18, 2009 Author Share 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> Link to comment Share on other sites More sharing options...
allanf Posted March 19, 2009 Share 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 Link to comment Share on other sites More sharing options...
Tripredacus Posted March 19, 2009 Share 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. Link to comment Share on other sites More sharing options...
gregorsamsa11 Posted March 19, 2009 Author Share 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. Link to comment Share on other sites More sharing options...
gregorsamsa11 Posted March 19, 2009 Author Share 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. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now