Windows IIS + cgiip.exe + msgr.log location

Posted by Paul Koufalis on 10-May-2017 20:22

Windows 2008 R2
IIS 7.0
DLC 11.2, 11.5 (you'll understand below)

1. cgiip.exe and my wsc scripts are in c:\inetpup\scripts
2. The 11.5 AdminServer is running (though I doubt it matters)
3. cgiip.exe write to the DLC112 %WRKDIR%\msgr.log

How does cgiip.exe know which %DLC%\properties\ file to read? It is not in the wsc file as this points to an AdminServer on a UNIX box. Heck that doesn't even really matter because the file sets the logfile location as @{Workpath}\msgr.log. So really the question is, how does cgiip know the value of Workpath? 

Using Process Explorer, I checked the environment of the IIS process and I didn't see anything pointing to any kind of DLC. The cgiip.exe instances are too short lived for me to examine them.

All Replies

Posted by innov8cs on 10-May-2017 21:40

It knows by Registry entries.  The exact name of the entries is hard coded in the executables based on the version.  One of the things I consistently suggest at least in the case of log files is to *always* put the exact name of the file you want it to be.  I remove all references to WKDIR in all items in  That way there is never any confusion of where the logs are and where it's writing to.

Posted by Rob Fitzpatrick on 10-May-2017 22:00

> The cgiip.exe instances are too short lived for me to examine them.

You can examine the environment and other attributes of short-lived processes with Process Monitor.  Use the class filters to filter out all but Process and Thread Activity.  Look for the first event for a process which will be a Process Start operation.  The information in the Detail column (also visible by double-clicking that line item) will include the parent PID, command line, current directory, and full environment.  

Note that you have to be able to elevate to admin to run procmon.

This thread is closed