%S Paramter let VBS SCRIPT CRASH OR NOT EVEN EXECUTE
Moderators: Hacker, petermad, Stefan2, white
- ghisler(Author)
- Site Admin
- Posts: 50549
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
How does the association of .au3 with AutoIt look like?
Is it
D:\Programme\AutoIt3\AutoIt3.exe %1
or
D:\Programme\AutoIt3\AutoIt3.exe "%1"
Is it
D:\Programme\AutoIt3\AutoIt3.exe %1
or
D:\Programme\AutoIt3\AutoIt3.exe "%1"
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
I guess that's the one you're looking for:
And here's the one for VBS:(It's a REG_EXPAND_SZ so I've posted it in clear text instead of the binary stuff.)
[ADD]
But it can't have anything to do with the file type's association since it works correctly as soon %S is removed from the parameter field.
[ADD2]
BTW: This bug is not limited to button bar but the starter menu is also affected. So TC's handling of commands is wrong when %S is used in the parameters field.
Regards
Dalai
Code: Select all
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\AutoIt3Script\Shell\Run\Command]
@="D:\\Programme\\AutoIt3\\AutoIt3.exe \"%1\" %*"
Code: Select all
%SystemRoot%\System32\WScript.exe "%1" %*
[ADD]
But it can't have anything to do with the file type's association since it works correctly as soon %S is removed from the parameter field.
[ADD2]
BTW: This bug is not limited to button bar but the starter menu is also affected. So TC's handling of commands is wrong when %S is used in the parameters field.
Regards
Dalai
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64
Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64
Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
How can I convince you that this is an actual bug that needs fixing?
Regards
Dalai
Regards
Dalai
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64
Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64
Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
- ghisler(Author)
- Site Admin
- Posts: 50549
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Do we have to go through that again? Did you take a look at the command line of wscript.exe or autoit3.exe when one of the above buttons is launched that contains %S in the parameter field?
It's really simple: In Process Explorer, compare the command lines TC launches, one button containing %S in the parameter field, the other one without it. There's no crash, it's TC removing all quotes, so wscript.exe or autoit3.exe (or any other I guess) can't find their stuff.
Somebody else have any other idea how we can help Ghisler with this?
Regards
Dalai
It's really simple: In Process Explorer, compare the command lines TC launches, one button containing %S in the parameter field, the other one without it. There's no crash, it's TC removing all quotes, so wscript.exe or autoit3.exe (or any other I guess) can't find their stuff.
Somebody else have any other idea how we can help Ghisler with this?
Regards
Dalai
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64
Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64
Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
- ghisler(Author)
- Site Admin
- Posts: 50549
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
But %S does automatically surround names with spaces with ""! Maybe it's because you combine %L and %S? That doesn't really make any sense...
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
%L doesn't matter here, you can try any combination of parameters together with %S, or %S alone, add some other parameter like "test", it doesn't matter. Please just check for yourself that TC DOES NOT quote any parameters when %S is used! Even worse, it removes the quotes if any were set, either in the button itself or in the registry.
I don't know what else I can say. I posted the relevant buttons, screenshots of the command lines in Process Explorer and I've described multiple times what's wrong.
Please just check the command lines of the processes TC launches in Process Explorer, it will only take a few minutes.
Regards
Dalai
I don't know what else I can say. I posted the relevant buttons, screenshots of the command lines in Process Explorer and I've described multiple times what's wrong.
Please just check the command lines of the processes TC launches in Process Explorer, it will only take a few minutes.
Regards
Dalai
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64
Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64
Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
Okay (once again)
1. No file selected, Cursor placed on "C:\test\Test Script.vbs"
2. CORRECT:-> Command line by Proccess Explorer:
3. WRONG:
-> Command line by Proccess Explorer:
Tested with TC9.0B5 x64 (Windows 7)
This is definitely a problem of TC!
Regards
Holger
1. No file selected, Cursor placed on "C:\test\Test Script.vbs"
2. CORRECT:
Code: Select all
TOTALCMD#BAR#DATA
"C:\test\Test Script.vbs"
%P%N
C:\Windows\System32\WScript.exe,2
Test Script
C:\test\
-1
Code: Select all
"C:\Windows\System32\WScript.exe" "C:\test\Test Script.vbs" "C:\test\Test Script.vbs"
Code: Select all
TOTALCMD#BAR#DATA
"C:\test\Test Script.vbs"
%P%S
C:\Windows\System32\WScript.exe,2
Test Script
C:\test\
-1
Code: Select all
C:\Windows\System32\WScript.exe C:\test\Test Script.vbs "C:\test\Test Script.vbs"
Tested with TC9.0B5 x64 (Windows 7)
This is definitely a problem of TC!
Regards
Holger
- ghisler(Author)
- Site Admin
- Posts: 50549
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
So it's not the quotes around %P%S, but around the program? That doesn't really make any sense. But I will check it in the debugger.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
And around the parameters that are not added by %S, in Holger's case C:\test\Test Script.vbs, where the cursor was when pushing the button.ghisler(Author) wrote:So it's not the quotes around %P%S, but around the program?
Regards
Dalai
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64
Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64
Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
- ghisler(Author)
- Site Admin
- Posts: 50549
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
That's not in the parameter field, but in the program field. And it's the same as when using %P%N...C:\test\Test Script.vbs
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Oops, you're right.ghisler(Author) wrote:That's not in the parameter field, but in the program field.C:\test\Test Script.vbs
???And it's the same as when using %P%N...
The button contains the same string ("C:\test\Test Script.vbs"), but the result is different, depending on whether %S is used in the parameter field.
Regards
Dalai
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64
Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64
Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
- ghisler(Author)
- Site Admin
- Posts: 50549
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
I found the problem - when you use parameter %S, TC uses CreateProcess to open the program, because it supports longer command lines than ShellExecuteEx. Since CreateProcess cannot open vbs files, I have to determine the associated program, and launch that with the vbs as a parameter. Here this double quotes were lost.
Please try again with beta 6!
Please try again with beta 6!
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Yep, now it works correctly.
Regards
Dalai
Regards
Dalai
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64
Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64
Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror