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

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
gtm
Posts: 87
Joined: 01 May 2011 11:03

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

Post 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).

nas8e9
Posts: 2232
Joined: 21 Jun 2008 14:50

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

Post 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.

gtm
Posts: 87
Joined: 01 May 2011 11:03

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

Post by gtm »

It doesn't work, it just opens the command window.

zer0
Posts: 2676
Joined: 19 Jan 2009 20:11

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

Post by zer0 »

gtm wrote:It doesn't work, it just opens the command window.
Then you're not doing it correctly ;)
Reporting a bug? Have a wish? Got a question? Use search - View roadmap - FAQs: Forum + XY site
Windows 7/10
Always using the latest stable two-decimal build

nas8e9
Posts: 2232
Joined: 21 Jun 2008 14:50

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

Post 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

gtm
Posts: 87
Joined: 01 May 2011 11:03

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

Post by gtm »

doesn't work either

nas8e9
Posts: 2232
Joined: 21 Jun 2008 14:50

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

Post 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.

xman
Posts: 133
Joined: 28 Nov 2009 22:57

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

Post 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.

gtm
Posts: 87
Joined: 01 May 2011 11:03

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

Post by gtm »

Sweet!
I see the | option
and in general about the quotes.
Thanks for both your tips guys.

Post Reply