Solved

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

Posted on 2004-09-29
4
306 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
Suggested Courses
Course of the Month6 days, 11 hours left to enroll

636 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