I have this command, which works when running in command line directly.
import "os/exec"
...
out, err := exec.Command("cmd", "/C", `%windir%\system32\inetsrv\appcmd list APP /site.name:"My website" /text:[path='/'].physicalPath`).Output()
When I run it via Go app, it throws exit status 3222072890 with this error message:
Failed to process input: Invalid XML input - please make sure that your XML is well-formed and follows the required format (HRESULT=c00cee3a).
I've already tried to change slashes, use various quotation marks, but still does not work.
I use IIS 8.5 on Windows Server 2012 R2.
It seems that command is corrupted before execution. Is there any way how to see the output command?