I'm trying to execute an external program and redirect the output to a file, the built command string works fine if I run it from the shell directly but for some reasons using the Execute() command does not produce any output.
During my tests I've tried to execute simple commands to test the redirection, for example :
Code: Select all
Execute("dir >text")
To be honest I don't remember if I had to provide full paths for system commands in HW7...
Anyway, let's return to my original problem, to simplify things I've made a test with the 7zip executable, here is the test code:
Code: Select all
Execute(dq .. "C:\\Program Files\\7-Zip\\7z.exe" .. dq .. " >C:\\test\\log.txt")
DebugPrint(dq .. "C:\\Program Files\\7-Zip\\7z.exe" .. dq .. " >C:\\test\\log.txt")
If I run the above code no output is generated, If I copy & paste the output that the DebugPrint() prints to a shell and I execute it the output is correctly generate... maybe I'm just getting confused with double-quotes...