Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Activating external exe from an ASP
Message
From
29/04/2002 08:34:18
 
 
To
All
General information
Forum:
Internet
Category:
Active Server Page
Title:
Activating external exe from an ASP
Miscellaneous
Thread ID:
00650312
Message ID:
00650312
Views:
62
Hi,

I have a group of customers that attach files of a proprietary format to emails that they send me. The files have a .kok extension and can only be read by an executable that a manufacturer provides. The output of the executable is three jpg files. I open the .kok files with the executable, produce the jpgs and then post them to a web site. I wanted to automate the process so I did the following: I made a web page that gives the customers the ability to upload the .kok files to my server. I thought I could activate the manufacturer's executable from the ASP or from a .com object that was on the ASP but that does not work. The executable fails to run. In fact, I attempted to activate a different executable (ie:notepad.exe) thinking that maybe it was my executable that was the problem. But notepad.exe failed to run also. I don't get an error but the exe simply does not run.

I would not mind the minor hit running the executable will take because the web site and server experience very minor traffic and is set up just for a few a these customers.

In summary: How do I get an ASP to launch a short running executable that will run on the server so that the .kok can be read and the 3 jpgs can be produced?

Some sample ASP code below utilizing windows scripting host to do the external run:

Set objWSH = Server.CreateObject("Wscript.Shell")
objRun = objWSH.Run(myApp.exe,0,false)

I also noticed that when I make a vfp class (runexternals) and include a method that performs the code above ( getimages() ), it will function properly when run from the vfp command window.
IE: oo = createobj("runexternals")
oo.getimages()

But if I set the runexternals class to olepublic, compile the project into a multithread com server (.dll) and then attempt to call the server as :
oo = createobject(myapp.runexternals)
oo.getimages()
The run fails as it did in the ASP.

Any thoughts?
Thanx,
Neil
Next
Reply
Map
View

Click here to load this message in the networking platform