Click to See Complete Forum and Search --> : execute exe file?


Shmulik Golan
April 17th, 2001, 11:17 AM
hi.
is it possible to execute exe or dll file from local htm file (using VbScript, maybe)?

Smile, Shmulik. (-;

Iouri
April 17th, 2001, 11:28 AM
Option Explicit

Dim FSO
Dim WSH

Const AppToRun = "C:\test.exe"

Set WSH = WScript.CreateObject("WScript.Shell")
Set FSO = CreateObject("Scripting.FileSystemObject")

If FSO.FileExists(AppToRun) Then
WSH.Run AppToRun
Else
MsgBox AppToRun & " Does not Exist"
End If

Remember to enclose long file names in Quotes





Iouri Boutchkine
iouri@hotsheet.com

Shmulik Golan
April 17th, 2001, 11:50 AM
ok it's work - but...
in this way i recieve an alart message. i do not want this message. is there another way?

Smile, Shmulik. (-;

Iouri
April 17th, 2001, 12:01 PM
Are you trying to write a virus?

Iouri Boutchkine
iouri@hotsheet.com

Shmulik Golan
April 17th, 2001, 12:20 PM
i knew you'll think so.
no. i'm trying to build a local internet application (something like intranet) on my computer, that will be able to run exe files (instead start->programs, for example). i want to run it with out IIS, so i need to execute files using VbScript.
just for remind: every thing is local. no access to the internet.

Smile, Shmulik. (-;

Rog
February 13th, 2002, 01:53 PM
I tried this code and got WScript undefined. Could you tell me the problem?? Thanks

Iouri
February 13th, 2002, 03:06 PM
Do you have WindowsScriptHost installed on your machine?

Iouri Boutchkine
iouri@hotsheet.com

Rog
February 13th, 2002, 03:59 PM
I don't know but it would seem that I do not. Any suggestions?

Rog
February 14th, 2002, 05:49 AM
Yes, I have WScript installed in the Windows Directory as a Host Application. What do you think, you have been very good so far and it is much appreciated. Any response to your download code, which works and now I need some upload code.
Thanks again

Iouri
February 14th, 2002, 09:24 AM
Rate it if it helped you

Iouri Boutchkine
iouri@hotsheet.com

Rog
February 15th, 2002, 06:04 AM
Yes, I do have it intalled. I'm trying to execute it from an HTM document-does that matter?