Page 1 of 1

Invoke scripts using shell_exec and Windows?

Posted: Thu Apr 29, 2010 2:29 pm
by alex.barylski
I have a command for some custom binaries, running on Windows. When I invoke the command throuh cmd.exe manually, everything works as expected, however I cannot get a simple mkdir to work:
command = "mkdir.exe C:\WINDOWS\temp\alextest";
system($command);
No errors, nothing.

I have tried system, shell_exec, exec, etc with no results...what am I missing?

Cheers,
Alex

Re: Invoke scripts using shell_exec and Windows?

Posted: Thu Apr 29, 2010 5:52 pm
by requinix
mkdir is not a program - it's a command supported by cmd.exe. system() can only run actual executables.

Re: Invoke scripts using shell_exec and Windows?

Posted: Fri Apr 30, 2010 8:12 am
by alex.barylski
OK but I'm not actually using mkdir I'm using htmldoc which is a command and I still get nothing when invoked through shell_exec. Any ideas? Works fine on Linux, I'm using the Windows binary.

Cheers,
Alex

Re: Invoke scripts using shell_exec and Windows?

Posted: Fri Apr 30, 2010 8:22 am
by Eran
Seems obvious, but are you using the full path to the executable?