Context :
I have a script file called doStuff.vbs in folder C:\WITH SPACE
If i create a button like :
Command: C:\WITH SPACE\doStruff.vbs
Parameters: %P%N %T%N
Everything is OK
If i change parameter to
Parameters: %S
I Got an error :no file extension for "C:\WITH" coming from Windows Scripting host....
It seems that ahk, autoit, powerpro scripts are also not called as expected. But bat, cmd file are called successfully ????
Strange behaviour with script files and %S in parameters
Moderators: Hacker, petermad, Stefan2, white
- ghisler(Author)
- Site Admin
- Posts: 50386
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Try putting the command itself in double quotes "". While TC adds them automatically for parameters, it doesn't add them for the program itself. TC uses a different function (CreateProcess) for %S than for %P%N to launch files (ShellExecuteEx), because CreateProcess supports much longer command lines up to 32kBytes. CreateProcess is more sensitive to missing double quotes than ShellExecuteEx.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
If i set "Mycmd.vbs" in program, I have the same behaviour.ghisler(Author) wrote:Try putting the command itself in double quotes "". While TC adds them automatically for parameters, it doesn't add them for the program itself. TC uses a different function (CreateProcess) for %S than for %P%N to launch files (ShellExecuteEx), because CreateProcess supports much longer command lines up to 32kBytes. CreateProcess is more sensitive to missing double quotes than ShellExecuteEx.
If i set ""Mycmd.vbs"" in program, I have file not found from tc.
- ghisler(Author)
- Site Admin
- Posts: 50386
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact: