Microsoft Windows Vista Community Forums - Vistaheads
Recommended Download



Welcome to the Microsoft Windows Vista Community Forums - Vistaheads, YOUR Largest Resource for Windows Vista related information.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so , join our community today!

If you have any problems with the registration process or your account login, please contact us.

Driver Scanner

File associations - open with - context menu

microsoft.public.windows.vista.file management






Speedup My PC
Reply
  #1 (permalink)  
Old 03-28-2007
=?Utf-8?B?SnVhbiBIZXJyZXJv?=
 

Posts: n/a
File associations - open with - context menu
I wished to amend a .BAT file, so opened it with OPEN WITH and selected my
editor (NoteTabPro). Now when I double click on BAT files it opens the file
in the editor instead of running the BAT file. I tried changing the OPEN WITH
to cmd.exe, but that just opens the DOS window. How can I set .BAT files to
run correctly? What should I OPEN WIT?? The old (XP) way to change file
associations doesn't seem to have any effect. Similarly, if I right-click an
HTML file and choose "edit", it opens MS WORD; but I want to use my own
editor (NoteTabPro) - how can I change this setting (again, file associations
don't take). I dare not use OPEN WITH !!!!
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 03-29-2007
Ramesh, MS-MVP
 

Posts: n/a
Re: File associations - open with - context menu
Download/apply the .BAT file association fix from here.

File association fixes for Windows Vista:
http://www.winhelponline.com/articles/105/1/

--
Regards,

Ramesh Srinivasan, Microsoft MVP [Windows Shell/User]
Windows® Troubleshooting http://www.winhelponline.com


"Juan Herrero" <JuanHerrero@discussions.microsoft.com> wrote in message news:47BC4222-C461-49AA-95C2-5780677C8042@microsoft.com...
I wished to amend a .BAT file, so opened it with OPEN WITH and selected my
editor (NoteTabPro). Now when I double click on BAT files it opens the file
in the editor instead of running the BAT file. I tried changing the OPEN WITH
to cmd.exe, but that just opens the DOS window. How can I set .BAT files to
run correctly? What should I OPEN WIT?? The old (XP) way to change file
associations doesn't seem to have any effect. Similarly, if I right-click an
HTML file and choose "edit", it opens MS WORD; but I want to use my own
editor (NoteTabPro) - how can I change this setting (again, file associations
don't take). I dare not use OPEN WITH !!!!
Reply With Quote
  #3 (permalink)  
Old 03-29-2007
=?Utf-8?B?SnVhbiBIZXJyZXJv?=
 

Posts: n/a
Re: File associations - open with - context menu
Many thanks Ramesh.
I downloaded, unzipped and merged as instructed, and got this message...
"Cannot import C:/.../Desktop/batfix_vista.reg: Not all data was successfully
written to the registry. Some keys are open by the system or other processes."
But it seems to have worked anyway - I can run BAT files again!


"Ramesh, MS-MVP" wrote:

> Download/apply the .BAT file association fix from here.
>
> File association fixes for Windows Vista:
> http://www.winhelponline.com/articles/105/1/
>
> --
> Regards,
>
> Ramesh Srinivasan, Microsoft MVP [Windows Shell/User]
> Windows® Troubleshooting http://www.winhelponline.com
>
>
> "Juan Herrero" <JuanHerrero@discussions.microsoft.com> wrote in message news:47BC4222-C461-49AA-95C2-5780677C8042@microsoft.com...
> I wished to amend a .BAT file, so opened it with OPEN WITH and selected my
> editor (NoteTabPro). Now when I double click on BAT files it opens the file
> in the editor instead of running the BAT file. I tried changing the OPEN WITH
> to cmd.exe, but that just opens the DOS window. How can I set .BAT files to
> run correctly? What should I OPEN WIT?? The old (XP) way to change file
> associations doesn't seem to have any effect. Similarly, if I right-click an
> HTML file and choose "edit", it opens MS WORD; but I want to use my own
> editor (NoteTabPro) - how can I change this setting (again, file associations
> don't take). I dare not use OPEN WITH !!!!
>

Reply With Quote
  #4 (permalink)  
Old 03-29-2007
cquirke (MVP Windows shell/user)
 

Posts: n/a
Re: File associations - open with - context menu
On Wed, 28 Mar 2007 04:14:02 -0700, Juan Herrero

>I wished to amend a .BAT file, so opened it with OPEN WITH and selected my
>editor (NoteTabPro).


Did you clear the "[x] Always open with..." checkbox?

>Now when I double click on BAT files it opens the file
>in the editor instead of running the BAT file. I tried changing the OPEN WITH
>to cmd.exe, but that just opens the DOS window.


..BAT isn't "opened" with CMD.EXE, even though that may be the
interpreter for it, and extra syntax is needed to pass a batch file to
Cmd.exe so that Cmd.exe will invoke it. Cmd.exe %1 won't do it.

Instead, the default is to open .BAT as itself, i.e. the "open" action
is simply %1 (the file itself), just as if it were an .EXE

You can re-assert this via Regedit, or this .REG should do it...

<paste>

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\.bat]
@="batfile"

[HKEY_CLASSES_ROOT\batfile]
@="MS-DOS Batch File"
"EditFlags"=hex:30,04,00,00

[HKEY_CLASSES_ROOT\batfile\shell]

[HKEY_CLASSES_ROOT\batfile\shell\edit]

[HKEY_CLASSES_ROOT\batfile\shell\edit\command]
@=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00 ,52,00,6f,00,6f,00,74,00,25,\

00,5c,00,53,00,79,00,73,00,74,00,65,00,6d,00,33,00 ,32,00,5c,00,4e,00,4f,00,\

54,00,45,00,50,00,41,00,44,00,2e,00,45,00,58,00,45 ,00,20,00,25,00,31,00,00,\
00

[HKEY_CLASSES_ROOT\batfile\shell\YourEdit]

[HKEY_CLASSES_ROOT\batfile\shell\YourEdit\command]
@="\"C:\\Path\\To\\Your\\Editor\\YourEdit.exe\" \"%1\""

[HKEY_CLASSES_ROOT\batfile\shell\open]
"EditFlags"=hex:00,00,00,00

[HKEY_CLASSES_ROOT\batfile\shell\open\command]
@="\"%1\" %*"

</paste>

You can edit the "YourEdit" section to taste, to integrate your editor
as a non-defaul rt-click action.

>Similarly, if I right-click an HTML file and choose "edit", it opens MS WORD


I know, and it's AWFUL when Word:
- makes it a "special" Word HTML file
- bloats it up several times in size
- drops stuff that triggers risk-management heuristics

Word is unfit for use as an HTML editor, because it just doesn't "get"
the idea behind HTML; great portability across platforms, and flexible
appearance. Instead, the Word team try to do DTP with it.

> but I want to use my own editor (NoteTabPro) - how can I change this
>setting (again, file associations don't take).


For HTML, it can be trickier - I know, I want to use Front Page
Express, but it takes a bit of tap-dancing to get it to appear as a
choice within IE's "Programs" list for editing HTML.

>I dare not use OPEN WITH !!!!


Yep, Open With (when [x] Always use...) is a stone-age club.



>--------------- ---- --- -- - - - -

Saws are too hard to use.
Be easier to use!
>--------------- ---- --- -- - - - -

Reply With Quote
  #5 (permalink)  
Old 03-29-2007
=?Utf-8?B?SnVhbiBIZXJyZXJv?=
 

Posts: n/a
Re: File associations - open with - context menu
Thanks for the extra info.

The "[x] Always open with..." checkbox has a habit of being greyed out and
unclearable!!!

The BAT problem was solved by Ramesh's download (see other messages).

As to context menus, I found a reference elsewhere which pointed me at
creativelement.com powertools, which does the job admirably, and I now have
"Edit" entries in context menus to my satisfaction. It also enabled me to
change the icons for filetypes, which I was about to give up on!


"cquirke (MVP Windows shell/user)" wrote:

> On Wed, 28 Mar 2007 04:14:02 -0700, Juan Herrero
>
> >I wished to amend a .BAT file, so opened it with OPEN WITH and selected my
> >editor (NoteTabPro).

>
> Did you clear the "[x] Always open with..." checkbox?
>
> >Now when I double click on BAT files it opens the file
> >in the editor instead of running the BAT file. I tried changing the OPEN WITH
> >to cmd.exe, but that just opens the DOS window.

>
> ..BAT isn't "opened" with CMD.EXE, even though that may be the
> interpreter for it, and extra syntax is needed to pass a batch file to
> Cmd.exe so that Cmd.exe will invoke it. Cmd.exe %1 won't do it.
>
> Instead, the default is to open .BAT as itself, i.e. the "open" action
> is simply %1 (the file itself), just as if it were an .EXE
>
> You can re-assert this via Regedit, or this .REG should do it...
>
> <paste>
>
> Windows Registry Editor Version 5.00
>
> [HKEY_CLASSES_ROOT\.bat]
> @="batfile"
>
> [HKEY_CLASSES_ROOT\batfile]
> @="MS-DOS Batch File"
> "EditFlags"=hex:30,04,00,00
>
> [HKEY_CLASSES_ROOT\batfile\shell]
>
> [HKEY_CLASSES_ROOT\batfile\shell\edit]
>
> [HKEY_CLASSES_ROOT\batfile\shell\edit\command]
> @=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00 ,52,00,6f,00,6f,00,74,00,25,\
>
> 00,5c,00,53,00,79,00,73,00,74,00,65,00,6d,00,33,00 ,32,00,5c,00,4e,00,4f,00,\
>
> 54,00,45,00,50,00,41,00,44,00,2e,00,45,00,58,00,45 ,00,20,00,25,00,31,00,00,\
> 00
>
> [HKEY_CLASSES_ROOT\batfile\shell\YourEdit]
>
> [HKEY_CLASSES_ROOT\batfile\shell\YourEdit\command]
> @="\"C:\\Path\\To\\Your\\Editor\\YourEdit.exe\" \"%1\""
>
> [HKEY_CLASSES_ROOT\batfile\shell\open]
> "EditFlags"=hex:00,00,00,00
>
> [HKEY_CLASSES_ROOT\batfile\shell\open\command]
> @="\"%1\" %*"
>
> </paste>
>
> You can edit the "YourEdit" section to taste, to integrate your editor
> as a non-defaul rt-click action.
>
> >Similarly, if I right-click an HTML file and choose "edit", it opens MS WORD

>
> I know, and it's AWFUL when Word:
> - makes it a "special" Word HTML file
> - bloats it up several times in size
> - drops stuff that triggers risk-management heuristics
>
> Word is unfit for use as an HTML editor, because it just doesn't "get"
> the idea behind HTML; great portability across platforms, and flexible
> appearance. Instead, the Word team try to do DTP with it.
>
> > but I want to use my own editor (NoteTabPro) - how can I change this
> >setting (again, file associations don't take).

>
> For HTML, it can be trickier - I know, I want to use Front Page
> Express, but it takes a bit of tap-dancing to get it to appear as a
> choice within IE's "Programs" list for editing HTML.
>
> >I dare not use OPEN WITH !!!!

>
> Yep, Open With (when [x] Always use...) is a stone-age club.
>
>
>
> >--------------- ---- --- -- - - - -

> Saws are too hard to use.
> Be easier to use!
> >--------------- ---- --- -- - - - -

>

Reply With Quote
  #6 (permalink)  
Old 03-29-2007
cquirke (MVP Windows shell/user)
 

Posts: n/a
Re: File associations - open with - context menu
On Thu, 29 Mar 2007 08:00:01 -0700, Juan Herrero

>The "[x] Always open with..." checkbox has a habit of being greyed out and
>unclearable!!!


Hmmm... that could be a protective EditFlags setting...

>The BAT problem was solved by Ramesh's download (see other messages).


I see now, yes - good one!

>As to context menus, I found a reference elsewhere which pointed me at
>creativelement.com powertools, which does the job admirably, and I now have
>"Edit" entries in context menus to my satisfaction. It also enabled me to
>change the icons for filetypes, which I was about to give up on!


Regedit's tough for those things, and I miss the "old" File Types UI
in Vista... thanks for the link, I'm downloading it now :-)

File associations can get brittle, and they changed in XP from being a
single HKLM subtree that is mirrored as HKCR, to HKCR as a merging of
both HKLM and new-for-XP HKCU material.

Just how the HKCU and HKLM material interact, both as direct overlays
and across parent-child inheritance, may be hard to predict - so I'm
hoping that this toolset will be aware of these changes.

Hmm... very nice! I like the linkage down to Regedit. Could be a
must-have for Vista... I also like the way various tools can be
selected and deselected from the control panel, making it a bit safer
for tech-and-user scenarios.

Thanks!



>--------------- ---- --- -- - - - -

"We have captured lightning and used
it to teach sand how to think."
>--------------- ---- --- -- - - - -

Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Add "Open with Notepad" to right-click context menu BlogFeed Windows Vista Blogs Forum 0 03-16-2007 00:54
Re: Can't create file on root from context menu Rich Milburn [MVP] microsoft.public.windows.vista.general 0 02-28-2007 17:43
Open file drop menu List Phil [300003] microsoft.public.windows.vista.general 0 02-22-2007 21:13
The "Open with" context menu =?Utf-8?B?YmFkdm9j?= microsoft.public.windows.vista.performance maintenance 1 02-14-2007 13:23
Per-user shell context menu extensions? Keith MacDonald microsoft.public.windows.vista.security 6 01-17-2007 14:52




All times are GMT +1. The time now is 03:21.




Driver Scanner - Free Scan Now

Vistaheads.com is part of the Heads Network. See also XPHeads.com , Win7Heads.com and Win8Heads.com.


Design by Vjacheslav Trushkin for phpBBStyles.com.
Powered by vBulletin® Version 3.6.7
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.6.0 RC 2

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120