Solved

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

Posted on 2004-09-29
4
290 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

706 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now