How Do I Execute A Server-Side File using VBScript
-
Well, the topic pretty much sums it up. I have an EXE(On the Server) that creates a text document(Also on the Server depending on parameters that are sent to it. I'm trying to find a way to execute it (I have set permissions) from my .asp page depending on what parameters the user inputs. I've tried Googling, but pretty much every result Involving the words "Run" and "VBScript" end off with WScript examples running off of local machines... Any assistance would be GREATLY appreciated! - Reelix
-= Reelix =-
-
Well, the topic pretty much sums it up. I have an EXE(On the Server) that creates a text document(Also on the Server depending on parameters that are sent to it. I'm trying to find a way to execute it (I have set permissions) from my .asp page depending on what parameters the user inputs. I've tried Googling, but pretty much every result Involving the words "Run" and "VBScript" end off with WScript examples running off of local machines... Any assistance would be GREATLY appreciated! - Reelix
-= Reelix =-
Are you sure you're not confusing your clients and your servers here? Where is your asp(x) application running, if not on the same server as your .exe?
-
Are you sure you're not confusing your clients and your servers here? Where is your asp(x) application running, if not on the same server as your .exe?
Let me rephrase slightly :) The EXE is in the same folder (On the Server) as the .asp File. I'm trying to find a way for the person browsing the .asp file (On their OWN Browser) to execute the EXE (On the Server - So that it runs on the Server) I hope that clarifies my question :) - Reelix
-
Let me rephrase slightly :) The EXE is in the same folder (On the Server) as the .asp File. I'm trying to find a way for the person browsing the .asp file (On their OWN Browser) to execute the EXE (On the Server - So that it runs on the Server) I hope that clarifies my question :) - Reelix
Yes, but, but... as asp page runs on the server, before sending plain HTML down to the client on their browser. It does not run on the client machine. This is the whole point of server-side scripting....
-
Yes, but, but... as asp page runs on the server, before sending plain HTML down to the client on their browser. It does not run on the client machine. This is the whole point of server-side scripting....
-
Well, since it runs on the server, should it not be able to execute a file? I don't want the client to have any interaction with the exe - It must all be server-side (By the page itself) - Or am I missing something... :doh:
-= Reelix =-
Reelix wrote:
Or am I missing something
well, one of us is. By default, for security reasons, you cannot run executables, but if you have access to the server and can set the appropriate permissions then there are ways, as your Google search has turned up. But the idea of an asp(x) page is that your scripts are executed on the server - the client may not even have the capability to run scripts. If you run an asp page then do a "view source" in your browser and look at the page source, all you will see is plain HTML. The client has requested the page, the server has executed your asp code, and returned plain HTML to the browser. If you have set the right permissions, you should be able to run an exe on the server during this process.
-
Reelix wrote:
Or am I missing something
well, one of us is. By default, for security reasons, you cannot run executables, but if you have access to the server and can set the appropriate permissions then there are ways, as your Google search has turned up. But the idea of an asp(x) page is that your scripts are executed on the server - the client may not even have the capability to run scripts. If you run an asp page then do a "view source" in your browser and look at the page source, all you will see is plain HTML. The client has requested the page, the server has executed your asp code, and returned plain HTML to the browser. If you have set the right permissions, you should be able to run an exe on the server during this process.
-
"If you have set the right permissions, you should be able to run an exe on the server during this process." How? :) Permissions have already been set :p
-= Reelix =-
Reelix wrote:
I've tried Googling, but pretty much every result Involving the words "Run" and "VBScript" end off with WScript examples running off of local machines...
your exe and your asp pages are on the same machine, ergo local...
-
Reelix wrote:
I've tried Googling, but pretty much every result Involving the words "Run" and "VBScript" end off with WScript examples running off of local machines...
your exe and your asp pages are on the same machine, ergo local...
-
Don't do that - you'll give yourself a headache... the point is, as far as your VBScript is concerned, the exe *is* on thw local machine, so you should be able to use your Google'd examples to create your code. "Local machine" doesn't mean "client machine", it means local....