windows - How to call shell commands by using absolute path with spaces inside? -
this question related to: why calling drush command system() fail?
i need launch command like:
c:\program files\iis express\appcmd.exe list site 1>nul 2>nul
because of space command fails.
i tried %20 in place of spaces, no luck.
anyway solved issue by:
replacing
c:\users[administrator]\documents\iiexpress
with
c:\windows\system32\config\systemprofile\documents
try:
system("\"c:\program files\iis express\appcmd.exe\" list site 1>nul 2>nul");
you need put command quotes itself
Comments
Post a Comment