I am having trouble getting the following script to work right on Windows 7. It fails to create or push the captured information into the IIS7SiteList.txt. Windows 2012 R2 works fine.
Running "cmd.exe /c C:\Windows\System32\inetsrv\appcmd.exe list site /text:name > C:\Users\e0104088\Desktop\WebSvcCfg 2015 Release\IIS7SiteList.txt" froma cmd prompt works fine.
Any thoughts?
ScriptLocation = DirScript()
WINDIR = Environment("windir")
RunHideWait("cmd.exe",strCat(" /c ", WINDIR, "\System32\inetsrv\appcmd.exe list site /text:name > %ScriptLocation%IIS7SiteList.txt"))
For debugging purposes use Run instead of RunHideWait and change the '/c' to '/K' so you can see and error messages in the shell command prompt window. Also remember that you need to quote your output redirection file path+file name when the path contains spaces and there is the 64-bit/32-bit file redirection issue to consider.
Quote from: td on June 29, 2015, 02:59:57 PM
Tthere is the 64-bit/32-bit file redirection issue to consider.
I am unaware of that. Please explain.