Classic Shell http://www.classicshell.net/forum/ |
|
The "%3% parm no longer works http://www.classicshell.net/forum/viewtopic.php?f=8&t=4665 |
Page 1 of 1 |
Author: | BXF [ Wed May 27, 2015 6:47 pm ] |
Post subject: | The "%3% parm no longer works |
Running Win7 Pro X64. It has been awhile since I used one particular custom command, which uses the "%3% option. When trying it now with 4.2.1 or 4.1.0, the temporary file with the selected file names is appropriately created, but the routine indicated in the Custom Command definition is not invoked. I've reduced the routine to a single executable line (WsCript.Echo) and it still produces nothing. Replacing the "%3" with "%2" or "%1" works properly. I have no idea when it stopped working. Any suggestions? Thanks. |
Author: | Ivo [ Wed May 27, 2015 6:55 pm ] |
Post subject: | Re: The "%3% parm no longer works |
Show me your exact script and the exact command line you use. |
Author: | BXF [ Wed May 27, 2015 7:13 pm ] |
Post subject: | Re: The "%3% parm no longer works |
The original command is "C:\Program Files X\BXF Scripts\SelectFPV.exe" "%3" but for debugging purposes (after the problem appeared) was replaced with "D:\Scripts\VBScript\SelectFPV.vbs" "%3" At which time the script was reduced to: Option Explicit DIM wshShell, SelectedItemFile, objShell Set wshShell = WScript.CreateObject("WScript.Shell") Set objShell = CreateObject("Shell.Application") SelectedItemFile = WScript.Arguments(0) WScript.Echo SelectedItemFile Thanks for looking. |
Author: | Ivo [ Wed May 27, 2015 9:59 pm ] |
Post subject: | Re: The "%3% parm no longer works |
The problem is that VBS files are not executable. This works for me: c:\windows\system32\wscript.exe d:\test\test.vbs "%3" |
Author: | BXF [ Thu May 28, 2015 3:55 am ] |
Post subject: | Re: The "%3% parm no longer works |
Oops, I forgot about that, but interestingly: "D:\Scripts\VBScript\Test.vbs" "%1" works "D:\Scripts\VBScript\Test.vbs" "%2" works "D:\Scripts\VBScript\Test.vbs" "%3" does not work, but WScript.exe "D:\Scripts\VBScript\Test.vbs" "%3" does work Now, the problem initially arose executing an "exe" file (a compiled VBS script), even though the same script and custom command were working in the past. Your "reminder" about VBS did make me think along a different line, so I recompiled my script, and it now works. Must have been something that changed in Windows, I guess. My apologies, and thanks. |
Author: | Ivo [ Thu May 28, 2015 7:37 am ] |
Post subject: | Re: The "%3% parm no longer works |
When %3, %4 or %5 is used, the command is started in a different way that requires an executable file. It allows more control over the created process. |
Page 1 of 1 | All times are UTC - 8 hours [ DST ] |
Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |