General discussion

Locked

Launching cmd file from HTA

By jim brown ·
I create a CD for our Engineers, which has all the prereqs for our OS platfrom, before they would have had a CD with the components (Service packs, IE, MSDE, etc) in a folder and they would run the setup.exe etc to install the component.

As the amount of components grew, we introduced a Web frontend, for ease of use.

As IE insists that it run all files in C:\Docume~1\%Username%\desktop, alas I can't run .cmd files to launch the components.

I've had a look around the MS site for HTA as this apparently works, I can get a test page up and running with a button, which I would like to use to launch a setup.cmd to install the component

Is it possable to launch a .cmd file using a button on a HTA page or am I barking up the wrong tree?

(Note: I'm not a programmer, by trade, simple explanations please)

This conversation is currently closed to new comments.

3 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

by Juergen Hartl In reply to Launching cmd file from H ...

you have a button similar to :
<input id=BTN1 type="button" value="Run" name="run_button" onClick="RunScript()">

sub RunScript()
Set objShell = CreateObject("WScript.Shell")
objShell.run("drive:\path\yourFile.cmd")
set objShell = nothing
end sub

Collapse -

by jim brown In reply to
Collapse -

by jim brown In reply to Launching cmd file from H ...

This question was closed by the author

Back to Web Development Forum
3 total posts (Page 1 of 1)  

Related Discussions

Related Forums