Solved

WinExec doesn't work from Web Broker CGI standalone applications in IIS 6 on Win 2003

Posted on 2004-09-29
4
293 Views
Last Modified: 2010-04-04
WinExec() function of windows.pas cannot run any command line application from within a web broker CGI stand alone application in IIS 6. It works perfect in Apache. I have given IUSR_SREVERNAME the execute permission to the application that need to be executed in the command line. Example code I have been trying is: WinExec( strPCopy( Qry, 'C:\Mol.exe'), SW_Normal); and it doesn't execute C:\Mol.exe application when tried in IIS 6 but does in Apache win32. Thank you.
0
Comment
Question by:chemwatch
  • 2
4 Comments
 
LVL 12

Accepted Solution

by:
Ivanov_G earned 500 total points
ID: 12177463
WinExex (Win32 SDK Help)
This function is provided for compatibility with earlier versions of Windows. For Win32-based applications, use the CreateProcess function.

Using CreateProcess to Execute Programs
http://www.delphicorner.f9.co.uk/articles/wapi4.htm
0
 
LVL 12

Expert Comment

by:Ivanov_G
ID: 12177473
sorry, I ment WinExec... Exex was mistake...
0
 
LVL 17

Expert Comment

by:Wim ten Brink
ID: 12178003
CreateProcess or ShellExecute or ShellExecuteEx. Check the helpfile and the MSDN files for more information about these functions.

And this seems a permissions problem to me. Although IUSR_SREVERNAME is allowed to execute your program, IIS is probably preventing IUSR_SREVERNAME to start any other executable that is not located in one of the IIS folders with execute rights. It's not a Delphi problem, but an IIS problem.
0
 
LVL 13

Expert Comment

by:BlackTigerX
ID: 12214674
in IIS 6 you have to configure specifically which executable will be the one running, not only the directory where you can run executables from

I don't have IIS 6 here so I can't test it, but as you have figured out is "just" permissions problem in IIS
0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

786 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question