Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to run ImageMagick from batch via exec() or passthru() I've already changed security settings for cmd.exe and ImageMagick folder. These are my current settings.

C:\ImageMagick-6.5.3-Q8 BUILTIN\Administrators:(OI)(CI)F 
                    NT AUTHORITY\SYSTEM:(OI)(CI)R 

C:\WINDOWS\system32\cmd.exe COMPUTERNAME\TelnetClients:R 
                        NT AUTHORITY\INTERACTIVE:R 
                        NT AUTHORITY\SERVICE:R 
                        NT AUTHORITY\SYSTEM:F 

After doing this this is the actual script that I'm trying to run:


define("ABSOLUTE_PATH", "C:\\Inetpub\\vhosts\\\\httpdocs\\online");
define("IMAGE_MAGICK_CONVERT", "C:\ImageMagick-6.5.3-Q8\convert.exe");
echo(IMAGE_MAGICK_CONVERT . " " . ABSOLUTE_PATH . "\\convert\\myfile1.jpg " . ABSOLUTE_PATH . "\\convert\\myfile1.pdf");
echo exec("cmd /c " . IMAGE_MAGICK_CONVERT . " " . ABSOLUTE_PATH . "\\convert\\myfile1.jpg " . ABSOLUTE_PATH . "\\convert\\myfile1.pdf 2>&1");
passthru(IMAGE_MAGICK_CONVERT . " " . ABSOLUTE_PATH . "\\convert\\myfile1.jpg " . ABSOLUTE_PATH . "\\convert\\myfile1.pdf 2>&1");

So I'm still receiving a Access is denied. Please help out...

share|improve this question

Run Process Monitor and watch to see what operation exactly is failing. It could well be writing to the ABSOLUTE_PATH\Convert directory.

share|improve this answer

You aren't doubling your backslashes in IMAGE_MAGICK_CONVERT.

share|improve this answer
up vote 0 down vote accepted

I've fixed it finally.. It was due security issues as expected ...

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.