hta

How do you pass a javascript variable as an argument to a vbscript function (in the context of HTAs)?

I am writing an HTA and I need to pass a variable that I have in Javascript to a VBScript function. Can you please let me know how to do this? Here is a (nonworking) example of what I'm trying to do: <!DOCTYPE ... > <html> <head> <HTA:APPLICATION ID="chrome" APPLICATIONNAME="kiosk" ... /> ... <script type="text/javascrip...

Can i not show the message that apears when HTA is activated

Hi, I tried using an HTA to deploy some files to the users computer. I would like to do so silently cause our users get upset by the fact that they need to approve the activation of the HTA every time the enter the page. Can i somehow disable the apearance of the message? TIA, Arik ...

In VBScript, is there a way to tell if IE is busy loading something (e.g. a page or XHR)?

I am writing an HTML Application (HTA) that runs fullscreen and allows users to browse a list of selected websites. I notice that sometimes when you click on link to load an external website, there is no feedback to the user that the browser has accepted the request and has started trying to load the page. In Internet explorer, you get ...

Embedding Javascript Within an Image File

I've noticed a new trend in distributing potentially unsafe code where people will post an image to a server with a watermark suggesting that they change the filename to have a .HTA file extension. I realized that .HTA was an HTML Application file, which are implicitly trusted by Microsoft's logic and can contain code to do just about a...

How do you detect window.open(...) from within an HTA?

I am developing an HTA that will run as a kiosk in our reception area. This kiosk can display web-pages that launch new windows using the window.open() method. What I want to do is handle window.open() from within my HTA, so instead of spawning an Internet Explorer window, the new window will appear in a floating iframe inside the HTA. ...

How do you suppress script errors in HTAs?

I have an HTA that loads up an external webpage inside a nested IFRAME. This webpage (which I don't have control over) throws an "Access Denied" error in my HTA asking the user if they "want to continue running scripts on this page". What I want to do is have my HTA suppress all scripting error messages regardless of where they originate...

How to get an HTA to restart itself?

I have an HTML Application that I am using to build a kiosk environment. At the end of every session (when the user clicks "Logout" or after a timeout) I want the HTA to close itself and restart*. I was wondering how I would go about achieving this programatically with VBScript. The process should go something like this User clicks "l...

HTTP request with Windows script host (.hta)

I can't believe I'm stuck here, but I can't seem to make a simple HTTP request using Windows script host or simple .hta file. This is my code: <script language="Javascript"> window.onload = function() { var http = CreateObject("Microsoft.XmlHttp"); }; </script> When I start the .hta file I get a JavaScript error saying something ...

JavaScript HTA development on Windows. Can I use sockets?

I'm trying to use sockets to connect to a server through HTA scripting. Is this possible? There's isn't much information on the web, some examples would be greatly appreciated. ...

Pass Credentials to WMI Call in VBScript

Hi everyone, I have VBScript inside a HTA getting the ping status from a local WMI call.. I also have a function to get the last reboot time of the remote pc.. Function GetReboot(strComputer) Set objWMIService = GetObject _ ("winmgmts:\\" & strComputer & "\root\cimv2") Set colOperatingSystems = objWMIService.ExecQuery _ ...

Converting an HTA into an ASP page?

I was given an HTA that I think was created by the HTA_Helpomatic. They want it converted into a classic ASP page. So I made a few basic changes, and I think I almost have it working. But I'm running into a problem - the ole 'VBScript Object Required' bit. It's doing this on the line Set objlst_groupnames = document.getElementById( "list...

Compiling .hta file to .exe

I have searched far and wide for a way to compile my .hta file (and resources) to a .exe file. There are plenty of applications that claim to be able to do this - but they have not worked for this application - which is a mixture of javascript and VB. Simply, (and naively,) I don't want people looking at / screwing with the code. Any s...

Javascript/DOM: On a dynamically created form text object, how do you reference the value via DOM?

I have an array that looks like this: grades[0] = ["A", 4.0, 0, "a"]; grades[1] = ["A-", 3.67, 0, "a-minus"]; grades[2] = ["B+", 3.33, 0, "b-plus"]; grades[3] = ["B", 3.0, 0, "b"]; grades[4] = ["B-", 2.67, 0, "b-minus"]; grades[5] = ["C+", 2.33, 0, "c-plus"]; grades[6] = ["C", 2.0, 0, "c"]; grades[7] = ["C-", 1.67, 0, "c-minus"]; grades...