Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - run an exe file on the server
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

run an exe file on the server

 Post Reply Post Reply
Author
sonda View Drop Down
Newbie
Newbie


Joined: 07 October 2003
Status: Offline
Points: 1
Post Options Post Options   Thanks (0) Thanks(0)   Quote sonda Quote  Post ReplyReply Direct Link To This Post Topic: run an exe file on the server
    Posted: 07 October 2003 at 10:13pm

I downloaded ASPExec 3.0 from http://www.serverobjects.com. It
is supposed to allows you to execute DOS and Windows apps.
I moved the DLL in the subdirectory \winnt\system32 and I typed regsvr32
aspexec.dll

I went into control panel/services/world wide web publishing service and turn "Allow Service to Interact with Desktop" on.
I execute the program :
The results :

Attempting to execute notepad.exe
The result of this call was : Ok

I see Notepad in the taskmanager but it does not appear on my desktop.

Did i do something incorrectly?

code:

<%
  Set Executor = Server.CreateObject("ASPExec.Execute")
  Executor.Application = "notepad.exe"
  Executor.Parameters = "c:\autoexec.bat"
  Executor.ShowWindow = True
  Response.Write "Attempting to execute " & Executor.Application & "<br>"
  strResult = Executor.ExecuteWinApp
  Response.Write "The result of this call was: " & strResult
%>

I wait for your advices,

Thank so much!



Edited by sonda
Back to Top
Coco Brown View Drop Down
Senior Member
Senior Member
Avatar

Joined: 26 April 2002
Location: United States
Status: Offline
Points: 245
Post Options Post Options   Thanks (0) Thanks(0)   Quote Coco Brown Quote  Post ReplyReply Direct Link To This Post Posted: 09 October 2003 at 2:11pm

I did this with the shell command in a commandline environment.  I didn't try this out with a webserver, but you could give it a shot.

set wShell = server.createObject(wScript.shell)
wShell.run("%comspec% /c run notepad.exe ")

...you need to preface the DOS command with "%comspec% /c"

The server creates an instance of the wscript shell object. It then sends an environmental variable to command.exe.  The DOS command is "run notepad.exe" .You will probably have to put the path in front of notepad.exe however.

I hope this helps.     

Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.