Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Activating external exe from an ASP
Message
From
04/05/2002 02:14:23
 
 
General information
Forum:
Internet
Category:
Active Server Page
Miscellaneous
Thread ID:
00650312
Message ID:
00652721
Views:
18
>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

Hi Neil,
What permissions have you set for your virtual directory? To be able to run executable files you need to set "Script and Executables" for Execute Permission (see Virtual Directory properties). In addition, the IWAM_... and IUSR_... users must have "Read and Execute" permissions for that directory if it is on NTFS partition.
Alex
Previous
Reply
Map
View

Click here to load this message in the networking platform