It is currently Tue Nov 12, 2019 5:16 pm

All times are UTC - 8 hours [ DST ]


Forum rules


Please, keep discussions on topic and in the right forum. The start menu topics go into the Classic Start Menu forum, etc. This makes it easier for people to locate topics they are looking for.
If you get a satisfactory response to your question, please mark the topic as "solved". Click the green √ button in the bottom-right of the post.



Post new topic Reply to topic  [ 6 posts ] 
Author Message
PostPosted: Wed May 27, 2015 6:47 pm 
Offline

Joined: Mon Jun 10, 2013 11:32 pm
Posts: 5
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.


Top
 Profile  
Reply with quote  
PostPosted: Wed May 27, 2015 6:55 pm 
Offline
Site Admin
User avatar

Joined: Wed Jan 02, 2013 11:38 pm
Posts: 5333
Show me your exact script and the exact command line you use.


Top
 Profile  
Reply with quote  
PostPosted: Wed May 27, 2015 7:13 pm 
Offline

Joined: Mon Jun 10, 2013 11:32 pm
Posts: 5
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.


Top
 Profile  
Reply with quote  
PostPosted: Wed May 27, 2015 9:59 pm 
Offline
Site Admin
User avatar

Joined: Wed Jan 02, 2013 11:38 pm
Posts: 5333
The problem is that VBS files are not executable. This works for me:
c:\windows\system32\wscript.exe d:\test\test.vbs "%3"


Top
 Profile  
Reply with quote  
PostPosted: Thu May 28, 2015 3:55 am 
Offline

Joined: Mon Jun 10, 2013 11:32 pm
Posts: 5
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.


Top
 Profile  
Reply with quote  
PostPosted: Thu May 28, 2015 7:37 am 
Offline
Site Admin
User avatar

Joined: Wed Jan 02, 2013 11:38 pm
Posts: 5333
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.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC - 8 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group, Almsamim WYSIWYG Classic Shell © 2010-2016, Ivo Beltchev.
All right reserved.