I have installed MiKTeX 2.9 on a Windows Server 2003R2 with IIS. I have a CGI program that's internally running the command "latex filename" but this program is failing with an error message
initexmf.exe: Windows API error 5: Access is denied. initexmf.exe: Data: C:\Documents and Settings\Default User\Local Settings\Application Data\MiKTeX latex: The operation failed for some reason. latex: Data: D:\Program Files\MiKTeX 2.9\miktex\bin\initexmf.exe
Running the same command from the command prompt as a local user works but not when I try to run it over the web. I have a second machine with an almost identical setup that has MiKTeX 2.6 installed. On this machine the same command works as expected over the web.
The installation directory is on a secondary drive (D-drive) under
So I tried to install MiKTeX on the C-drive under \Program Files and under C:\ and on the D-drive under D:\ but this didn't change anything. I've installed DebugView to identify the files that are accessed and the first file latex is tying to access is
D:\Program Files\MiKTeX 2.9\miktex\config\miktexstartup.ini
but this file doesn't exist. Obviously the permissions aren't set up properly for the user under which the CGI is run but I'm surprised that the MiKTeX installation didn't setup permissions properly.
Does anybody have an idea of what the problem could be?