Running programs from a HTA (without Windows Scripting Host) 
Author Message
 Running programs from a HTA (without Windows Scripting Host)

Hello,

I'd like to run a program from a HTA. Is there a way without
WScript.Shell.Run? (Luckily) not everyone has the scripting host installed.

Thanks.

Johann
--

Du versuchst die kriminellen Handlungen zu verniedlichen und mich
pers?nlich zu beleidigen?



Sat, 28 Feb 2004 02:32:46 GMT  
 Running programs from a HTA (without Windows Scripting Host)
Well, without the scripting host, the only other option I can think of is a
custom COM object that does what Windows Scripting Host already does.

Matt


Quote:
> Hello,

> I'd like to run a program from a HTA. Is there a way without
> WScript.Shell.Run? (Luckily) not everyone has the scripting host
installed.

> Thanks.

> Johann
> --

> Du versuchst die kriminellen Handlungen zu verniedlichen und mich
> pers?nlich zu beleidigen?




Sat, 28 Feb 2004 06:02:22 GMT  
 Running programs from a HTA (without Windows Scripting Host)
Yeah, that's the ticket! Write it as a MFC app and install it over the
Internet using Installshield!  ;-)

I can't think of any way around it either. Something simple like
window.open("some.exe", "new") will still bring up the download dialog in
the local zone.

Removing WSH as an antivirus measure is no substitute for common sense.


Quote:
> Well, without the scripting host, the only other option I can think of is
a
> custom COM object that does what Windows Scripting Host already does.

> Matt



> > Hello,

> > I'd like to run a program from a HTA. Is there a way without
> > WScript.Shell.Run? (Luckily) not everyone has the scripting host
> installed.

> > Thanks.

> > Johann
> > --

> > Du versuchst die kriminellen Handlungen zu verniedlichen und mich
> > pers?nlich zu beleidigen?




Sat, 28 Feb 2004 11:21:23 GMT  
 Running programs from a HTA (without Windows Scripting Host)

Quote:

> Hello,

> I'd like to run a program from a HTA. Is there a way without
> WScript.Shell.Run? (Luckily) not everyone has the scripting host installed.

> Thanks.

> Johann

Before you start writing a custom COM object, if your platform is
limited to Win2000/WinMe (and I presume this would work on WinXP also),
you can use IShellDispatch2::ShellExecute.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shel...

var oShell = new ActiveXObject("Shell.Application");
oShell.ShellExecute("notepad.exe");

Regards,
Steve



Sat, 28 Feb 2004 16:43:09 GMT  
 Running programs from a HTA (without Windows Scripting Host)

 > Before you start writing a custom COM object, if your platform is
 > limited to Win2000/WinMe (and I presume this would work on WinXP
 > also), you can use IShellDispatch2::ShellExecute.

Hm, Shell.Application also is in Win98, even in my old version with IE 4.

 > var oShell = new ActiveXObject("Shell.Application");
 > oShell.ShellExecute("notepad.exe");

Thanks. I was playing around with shl.Open(), but I seem to have
overlooked ShellExecute.

Johann
--

Du versuchst die kriminellen Handlungen zu verniedlichen und mich
pers?nlich zu beleidigen?



Sat, 28 Feb 2004 20:12:05 GMT  
 Running programs from a HTA (without Windows Scripting Host)
And on boxes with WMI installed there's Win32_Process.Create as well...

Of course, if you start assuming WinXP or Win2000 or WinME or that WMI installed or..., then in all
likelihood WSH is available as well and for most purposes simpler to use.

--
Michael Harris
Microsoft.MVP.Scripting
--

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

Quote:


>  > Before you start writing a custom COM object, if your platform is
>  > limited to Win2000/WinMe (and I presume this would work on WinXP
>  > also), you can use IShellDispatch2::ShellExecute.

> Hm, Shell.Application also is in Win98, even in my old version with IE 4.

>  > var oShell = new ActiveXObject("Shell.Application");
>  > oShell.ShellExecute("notepad.exe");

> Thanks. I was playing around with shl.Open(), but I seem to have
> overlooked ShellExecute.

> Johann
> --

> Du versuchst die kriminellen Handlungen zu verniedlichen und mich
> pers?nlich zu beleidigen?




Sun, 29 Feb 2004 00:22:31 GMT  
 
 [ 6 post ] 

 Relevant Pages 

1. Research: Windows Script Host or Windows Scripting Host

2. Running VBscripts without the scripting host

3. Problems Installing Windows Script 5.0 and Windows Script Host 2.0 Beta on Windows NT 4.0

4. String length limit on Windows Scripting Host Run method

5. Windows Scripting Host Run method fails - HELP!

6. running .hta files *without* IE5

7. Windows scripting host - Checking a service in Windows NT 4

8. Windows Scripting Host on Windows 95 OSR2

9. Windows 95 OSR1 and Windows Scripting Host

10. Windows Scripting Host for Windows 98 Book

11. Windows Script Host to Execute Remote Script Q311269

12. Windows Script Host Shell Object (Malacious script detected)

 

 
Powered by phpBB® Forum Software