Page 1 of 1

Open with (POM) order (with .bat files)

Posted: 05 Nov 2011 18:42
by gtm
I am using notepad++ for .bat
The open with menu shows notepad++ first and when I double click the .bat file it opens in the notepad++
instead of executing it.

I know that the order of the open with menu and double click action is as per the PFA entries.
But running .bat file is a system (executable) sort of thing. How do I enter this into the PFA menu so that
the order is execute the .bat first, open with notepad++ later (i.e. the order).

Re: Open with (POM) order (with .bat files)

Posted: 05 Nov 2011 19:08
by nas8e9
I'm not sure how to achieve this through the POM, but as a workaround you can use either the mouse (right-click > select Open) or the keyboard (Ctrl+Shift+Enter).

Edited to add: You could try opening .bat files with cmd.exe (%WinSysDir%\Cmd.exe, in case the path is needed) in the POM.

Re: Open with (POM) order (with .bat files)

Posted: 06 Nov 2011 06:11
by gtm
It doesn't work, it just opens the command window.

Re: Open with (POM) order (with .bat files)

Posted: 06 Nov 2011 11:47
by zer0
gtm wrote:It doesn't work, it just opens the command window.
Then you're not doing it correctly ;)

Re: Open with (POM) order (with .bat files)

Posted: 06 Nov 2011 12:59
by nas8e9
gtm wrote:It doesn't work, it just opens the command window.
Try appending the /C parameter like this:

Code: Select all

cmd.exe /C

Re: Open with (POM) order (with .bat files)

Posted: 06 Nov 2011 13:57
by gtm
doesn't work either

Re: Open with (POM) order (with .bat files)

Posted: 06 Nov 2011 14:14
by nas8e9
gtm wrote:doesn't work either
This works for me:

Code: Select all

cmd>"%WinSysDir%\cmd.exe" /C
The trick is apparently to enclose the application name in quotes when specifying command line parameters.

Re: Open with (POM) order (with .bat files)

Posted: 11 Nov 2011 01:41
by xman
Unless you use Notepad++ as a default opener for everything, just prepend its entry with "|". This way, the bat file will be executed as a default option.

Re: Open with (POM) order (with .bat files)

Posted: 13 Nov 2011 08:34
by gtm
Sweet!
I see the | option
and in general about the quotes.
Thanks for both your tips guys.