Solved

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

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Delphi component that can load a DLL in design time? 8 53
Simple Delphi Question 9 83
how to center only a line in richedit? 4 52
can't find the executable in Simulator 1 77
Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.
Need to grow your business through quality cloud solutions? With everything required to build a cloud platform and solution, you may feel like the distance between you and the cloud is quite long. Help is here. Spend some time learning about the Con…

929 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

16 Experts available now in Live!

Get 1:1 Help Now