Running NT shell commands from an HTML Application 
Author Message
 Running NT shell commands from an HTML Application

I've recently started dabbling in HTML applications, and I
can't seem to find a way to run shell commands. In a VBS
file, I would just use the WScript.Shell.Run() method, but
this won't work in an HTA, and I can't find an equivalent.
I'm using MSIE 5.5 and Windows Script Host 5.5 on NT4.0.
Is there any way to do this?

Thanks!



Tue, 06 Apr 2004 18:03:53 GMT  
 Running NT shell commands from an HTML Application
Just use VBScript's CreateObject to create objects in an HTA.  The WScript object doesn't exist outside WSH hosted script.  HTAs are hosted by mshta.exe.

--
Michael Harris
Microsoft.MVP.Scripting
--

Please do not email questions - post them to the newsgroup instead.
--

Quote:

> I've recently started dabbling in HTML applications, and I
> can't seem to find a way to run shell commands. In a VBS
> file, I would just use the WScript.Shell.Run() method, but
> this won't work in an HTA, and I can't find an equivalent.
> I'm using MSIE 5.5 and Windows Script Host 5.5 on NT4.0.
> Is there any way to do this?

> Thanks!



Wed, 07 Apr 2004 02:31:12 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Shell.Application.Count or Shell.Application.Contents.Count

2. Command (DOS or NT Command Shell) Prompt

3. Command (DOS or NT Command Shell) Prompt

4. Command (DOS or NT Command Shell) Prompt

5. Command (DOS or NT Command Shell) Prompt

6. Command (DOS or NT Command Shell) Prompt

7. Command (DOS or NT Command Shell) Prompt

8. How do I get Shell.Application to work in NT 4.0

9. List of NT Users ina domain from running an application on an NT Client

10. Can not get Shell.Application to run

11. Specify working directory for shell.run command?

12. Running shell command and recording output

 

 
Powered by phpBB® Forum Software