
launch script from a hta?
hey that looks cool.
I'll give it a try thanks
Quote:
> It is also possible to launch from a hyperlink. This also
> shows instantiating from <object> tag as well:
> <html>
> <head><title>foojslink</title>
> <hta:application id="ohta">
> <object id="wsh"
classid="clsid:F935DC22-1CF0-11D0-ADB9-00C04FD58A0B"></object>
Quote:
> <script language="JScript">
> function launch(){
> wsh.run("nowdate.vbs")
> }
> </script>
> </head>
> <body>
> <h1>Launch App via Link & JScript</h1>
> <a href="" onClick="wsh.run('nowdate.vbs');return false">Launch1</a>
> <a href="" onClick="launch();return false">Launch2</a>
> </body>
> </html>
> > Don't launch the .vbs file from the href of an anchor tag. Create an
> > instance of WScript.Shell and Run the .vbs file...
> > <html>
> > <head><title>foobar</title>
> > <hta:application id="ohta">
> > <script language="VBscript">
> > sub foobar_onclick()
> > with createobject("wscript.shell")
> > .run "junk.vbs"
> > end with
> > end sub
> > </script>
> > </head>
> > <body>
> > <a href="junk.vbs">junk</a>
> > <input id="foobar" type="button" value="junk">
> > </body>
> > </html>
> > --
> > Michael Harris
> > Microsoft.MVP.Scripting
> > --
> > Please do not email questions - post them to the newsgroup instead.
> > --
> > > Hello I am new to making hta apps and wanted to know if there was a
way to
> > > launch a vbs script without getting a download dialog box?
> > > I have searched many webpages and the answer seems to have something
to
> > do
> > > with making the app "trusted".
> > > It was my understanding that hta's were already trusted but I can't
seem
> > > to make this work. Could somebody post an example of how this works.
> > > Thanks