I screwed up .cmd file extension association.

S

steve.emmett

I had a HD crash last week so I've had to install Win2k on a new HD.
Part of my rebuild process was to change some file extensions and their
associations with various applications. I didn't see an extension for
..CMD so I created one and associated the EDIT function with my favorite
ascii editor. Thus the problem!

Before, I would see "Open|Edit|Print" whenever I did the right mouse
click over a file with the .cmd extension. Now, all I see is Open.
When I click on Open, the file starts in the editor instead of
executing.

On the command line, when I type in the name of the .cmd file, it
executes as it should.

How do I get back Open|Edit|Print for .cmd files? Any assistance in
recovering from this error would be greatly appreciated.

Steve
 
D

Dave Patrick

This may help or restore the registry for a recent backup.

--------------------------------------
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\cmdfile\shell\edit]

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\cmdfile\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_LOCAL_MACHINE\SOFTWARE\Classes\cmdfile\shell\open]
"EditFlags"=hex:00,00,00,00

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\cmdfile\shell\open\command]
@="\"%1\" %*"

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\cmdfile\shell\print]

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\cmdfile\shell\print\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,2f,00,70,00,20,\
00,25,00,31,00,00,00
--------------------------------------
(watch for line wrap)

--

Regards,

Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect

|I had a HD crash last week so I've had to install Win2k on a new HD.
| Part of my rebuild process was to change some file extensions and their
| associations with various applications. I didn't see an extension for
| .CMD so I created one and associated the EDIT function with my favorite
| ascii editor. Thus the problem!
|
| Before, I would see "Open|Edit|Print" whenever I did the right mouse
| click over a file with the .cmd extension. Now, all I see is Open.
| When I click on Open, the file starts in the editor instead of
| executing.
|
| On the command line, when I type in the name of the .cmd file, it
| executes as it should.
|
| How do I get back Open|Edit|Print for .cmd files? Any assistance in
| recovering from this error would be greatly appreciated.
|
| Steve
|
 
S

steve.emmett

Dave

Thanks for the info. I have already tried this. I have another machine
running Win2K and have compared the
HKEY_LOCAL_MACHINE\SOFTWARE\Classes\cmdfile from the "good" machine
with the one I screwed up. The entries are identical.

Stev
 
D

Dave Patrick

Have you tried creating a new user account? If so restore the registry from
backup.

--

Regards,

Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect

| Dave
|
| Thanks for the info. I have already tried this. I have another machine
| running Win2K and have compared the
| HKEY_LOCAL_MACHINE\SOFTWARE\Classes\cmdfile from the "good" machine
| with the one I screwed up. The entries are identical.
|
| Stev
|
 
T

Torgeir Bakken \(MVP\)

Dave

Thanks for the info. I have already tried this. I have another machine
running Win2K and have compared the
HKEY_LOCAL_MACHINE\SOFTWARE\Classes\cmdfile from the "good" machine
with the one I screwed up. The entries are identical.
Hi,

Run the following command in a command prompt and see if it helps:

assoc .cmd=cmdfile
 
S

steve.emmett

Dave

Not sure what creating a new user account would accomplish.

since this is a brand new install (I committed the screwup about 2
hours after the install), I've not yet backed up anything.

I'm traveling this week so won't beable to get back to this problem til
the weekend.

TNX

Steve
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top