Jump to content
Strawberry Orange Banana Lime Leaf Slate Sky Blueberry Grape Watermelon Chocolate Marble
Strawberry Orange Banana Lime Leaf Slate Sky Blueberry Grape Watermelon Chocolate Marble

MSFN is made available via donations, subscriptions and advertising revenue. The use of ad-blocking software hurts the site. Please disable ad-blocking software or set an exception for MSFN. Alternatively, register and become a site sponsor/subscriber and ads will be disabled automatically. 


Sign in to follow this  
ayhopkins

.reg and .cmd extension files

Recommended Posts

I have been working on an unattended install for Windows XP Home, and I found I have fumbled my clicks and sometimes have run files with the extensions ".reg" and ".cmd". I usually could avoid problems with the ".reg" file because of the confirmation, but the ".cmd" files just ran. In one case, I had a registry run within it and screwed up my machine so that I had to reinstall.

I used "File Options" to change the default for the ".reg" files to "edit" instead of "merge".

I also used "File Options" to change the default for the ".cmd" files to "edit" as well and then I decide to delete "open". I had to get these registry entries saved because you can not enter the data yourself afterwards.

Windows Registry Editor Version 5.00

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

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

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\cmdfile\shell\open]
"EditFlags"=hex:00,00,00,00

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

I then deleted it because it seemed to be only a shell extension and I checked you can still run scripts from the commandline.

I know some software upgrades use some kind of scripts, but I don't know if I should add this back. I feel a lot safer with them gone.

Is there a reason I need "open" for ".cmd". I think the ".reg" is fine.

Thanks

Share this post


Link to post
Share on other sites

You need it, when you want to run a .cmd by double click, not more and not less. If you personally need it, is another question, only you can answer.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...