How to use CreateObject("wscript.shell").run( "some.exe") 
Author Message
 How to use CreateObject("wscript.shell").run( "some.exe")

Hi everyone.

I have used this code to run a .exe from an ASP:
***********
<button onclick='VBScript:call
createobject("wscript.shell").run("Notepad")'> Notepad</button>
*************

It works fine when i use a command button in the page, however i would like
to do something similar with a link: instead of calling a web page, call an
external application.

How can i run a program when the user click on a link?

Thanks in advance.

Sealtiel Paula



Sat, 08 Mar 2003 03:00:00 GMT  
 How to use CreateObject("wscript.shell").run( "some.exe")
Try This

Set WshShell = Server.CreateObject("WScript.Shell")
WshShell.Run("application_Name_with_Path")
set WshShell = nothing

Sm


Quote:
> Hi everyone.

> I have used this code to run a .exe from an ASP:
> ***********
> <button onclick='vbscript:call
> createobject("wscript.shell").run("Notepad")'> Notepad</button>
> *************

> It works fine when i use a command button in the page, however i would
like
> to do something similar with a link: instead of calling a web page, call
an
> external application.

> How can i run a program when the user click on a link?

> Thanks in advance.

> Sealtiel Paula



Sat, 08 Mar 2003 03:00:00 GMT  
 How to use CreateObject("wscript.shell").run( "some.exe")
Hi

<a onclick='vbscript:call createobject("wscript.shell").run("Notepad")'><u>Notepad</u></a>

  Thorsten


Quote:
> Hi everyone.

> I have used this code to run a .exe from an ASP:
> ***********
> <button onclick='vbscript:call
> createobject("wscript.shell").run("Notepad")'> Notepad</button>
> *************

> It works fine when i use a command button in the page, however i would like
> to do something similar with a link: instead of calling a web page, call an
> external application.

> How can i run a program when the user click on a link?

> Thanks in advance.

> Sealtiel Paula



Sat, 08 Mar 2003 03:00:00 GMT  
 How to use CreateObject("wscript.shell").run( "some.exe")

Thanks,

I have tried this but the only problem is the mouse pointer because the user
doesn't notice that's a link.

Any idea?

Thanks again.

Sealtiel Paula



Quote:
> Hi

> <a onclick='vbscript:call

createobject("wscript.shell").run("Notepad")'><u>Notepad</u></a>
Quote:

>   Thorsten




Quote:
> > Hi everyone.

> > I have used this code to run a .exe from an ASP:
> > ***********
> > <button onclick='vbscript:call
> > createobject("wscript.shell").run("Notepad")'> Notepad</button>
> > *************

> > It works fine when i use a command button in the page, however i would
like
> > to do something similar with a link: instead of calling a web page, call
an
> > external application.

> > How can i run a program when the user click on a link?

> > Thanks in advance.

> > Sealtiel Paula



Sat, 08 Mar 2003 03:00:00 GMT  
 How to use CreateObject("wscript.shell").run( "some.exe")

try putting a STYLE="" argument in the <a> tag like this:

<a style="cursor: hand" onclick...>

That will probably work.

-Chad


Quote:
> Thanks,

> I have tried this but the only problem is the mouse pointer because the user
> doesn't notice that's a link.

> Any idea?

> Thanks again.

> Sealtiel Paula



> > Hi

> > <a onclick='vbscript:call
> createobject("wscript.shell").run("Notepad")'><u>Notepad</u></a>

> >   Thorsten



> > > Hi everyone.

> > > I have used this code to run a .exe from an ASP:
> > > ***********
> > > <button onclick='vbscript:call
> > > createobject("wscript.shell").run("Notepad")'> Notepad</button>
> > > *************

> > > It works fine when i use a command button in the page, however i would
> like
> > > to do something similar with a link: instead of calling a web page, call
> an
> > > external application.

> > > How can i run a program when the user click on a link?

> > > Thanks in advance.

> > > Sealtiel Paula



Sat, 08 Mar 2003 03:00:00 GMT  
 How to use CreateObject("wscript.shell").run( "some.exe")
Hi,
try
<a id=bla style="color:blue;cursor:hand;" onclick='vbscript:call
createobject("wscript.shell").run("Notepad"):bla.style.color="red"'><u>Notepad</u></a>

(all one line)

  Thorsten


Quote:
> Thanks,

> I have tried this but the only problem is the mouse pointer because the user
> doesn't notice that's a link.

> Any idea?

> Thanks again.

> Sealtiel Paula



> > Hi

> > <a onclick='vbscript:call
> createobject("wscript.shell").run("Notepad")'><u>Notepad</u></a>

> >   Thorsten



> > > Hi everyone.

> > > I have used this code to run a .exe from an ASP:
> > > ***********
> > > <button onclick='vbscript:call
> > > createobject("wscript.shell").run("Notepad")'> Notepad</button>
> > > *************

> > > It works fine when i use a command button in the page, however i would
> like
> > > to do something similar with a link: instead of calling a web page, call
> an
> > > external application.

> > > How can i run a program when the user click on a link?

> > > Thanks in advance.

> > > Sealtiel Paula



Sat, 08 Mar 2003 03:00:00 GMT  
 
 [ 6 post ] 

 Relevant Pages 

1. Set WSHShell = WScript.CreateObject("WScript.Shell")

2. Set WshShell = CreateObject("WScript.Shell")

3. can't CreateObject("Wscript.Shell")

4. CreateObject("Excel","//server"), MsgBox output

5. CreateObject("Excel","//server"), MsgBox output

6. *"*-.,._,.-*"* I"LL TRADE VISUAL C++ FOR VBASIC *"*-.,_,.-*"*

7. shell.run("CONNECTION NAME")

8. Running "Calc.exe" from ASP

9. How to RUN "CSVDE.EXE"

10. JavaScript "\"" and WShell Run

11. Disabling "BACK"/"FORWARD" buttons

12. Using &quot;CreateObject&quot;

 

 
Powered by phpBB® Forum Software