Thank you for the nice description of your case.
You didn't make any mistake. However, it won't work for you because the file path contains a space; this requires extra quotation marks, which must also be escaped. The correct line is as follows:
cmd """C:\Program Files (x86)\Magic RDS 4\DTS\wxxxdts.bat"""
I am fully aware that this is not very intuitive. Although it might seem that the program could add the quotation marks automatically, this is unfortunately not possible because there is no reliable way to determine where the file path ends and the command-line parameters begin. Any attempt to guess could break otherwise valid commands.
Therefore, if a file path contains spaces, it must be enclosed in double quotation marks. This applies to both the executable file and any file paths passed as parameters.
For example:
cmd """C:\Program Files\MyApp\program.exe"" ""C:\My Documents\data.txt"""
This ensures that commands are passed to Windows without modification, preserving full flexibility and compatibility with Windows command-line syntax.
I should also point out that, in Windows, folders located under Program Files are not intended for storing working files; in fact, doing so is often impossible due to a lack of the necessary permissions.