I am trying to run a command module using a file path from a copy file module. Using toec.exe --console
, I can see that the command is running with the proper file path and immediately failing. Logs:
2022-10-04 17:22:00,438 INFO [4] ModuleCommandManager DESKTOP-S73CSJ1\Administrator - Running Command Module: PC Check-ins
2022-10-04 17:22:00,438 DEBUG [4] ServiceProcess DESKTOP-S73CSJ1\Administrator - Starting Command: cmd.exe /c "C:\Program Files\Toec\AppData\2eb9ecc7-db9c-434e-b824-aa7b9cb4ff22\Check-Ins-Setup-1.10.0.exe" /S
2022-10-04 17:22:00,469 INFO [4] ModuleCommandManager DESKTOP-S73CSJ1\Administrator - {"ExitCode":1,"StandardError":"","StandardOut":""}
2022-10-04 17:22:00,469 INFO [4] ModuleCommandManager DESKTOP-S73CSJ1\Administrator - Command Module: PC Check-ins Finished
2022-10-04 17:22:00,469 ERROR [4] PolicyExecutor DESKTOP-S73CSJ1\Administrator - An Error Occurred In Module PC Check-ins
2022-10-04 17:22:00,469 ERROR [4] PolicyRunner DESKTOP-S73CSJ1\Administrator - Aborting Current Policy
And if I run the command it says it is running:
C:\Users\Administrator>cmd.exe /c "C:\Program Files\Toec\AppData\2eb9ecc7-db9c-434e-b824-aa7b9cb4ff22\Check-Ins-Setup-1.10.0.exe" /S
'C:\Program' is not recognized as an internal or external command,
operable program or batch file.
It looks like it is failing because of the space in Program Files not being properly escaped. Is there a fix for this?