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
Solved

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

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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
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…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

790 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