Problems with Execute()
Posted: Sun Feb 17, 2019 11:00 am
Hello, I have this issue on WIndows 10 + Hollywood 8:
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 :
But a system error popup saying that "<path_to_my_script>/dir" cannot be found... is it the standard behaviour? Should I provide full path to the dir command?
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:
the dq variable holds a double-quote character.
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...
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...