Hi all. I'm not sure if this is the correct place to post this, but whatever. I have a simple .reg file that adds the command 'Open Dos Box' to the menu that pops up when you right click a file (on windows) I want it to open a DOS window. Here is the code (working example):

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\*\Shell\Open DOS box\command

With that in mind, one could easily open the registry editor and set the Value Data (of 'command') to "cmd.exe" (command prompt). The only problem is that I want to do it without the use of registry editor. something simple, like notepad. I saw somewhere that you can use something like


to set value data's, but I've had no luck. Any sugestions?

Why don't you right click on your registry editor and export the registry key in question. Use notepad to open the .reg file -- it just plain text, and examine how the .reg file is setup. I understand you don't want to use regedit but you can view it once to learn how it works.

I know how it all works, but I want it to be a simple .reg file that you can launch, that will take care of everything without the need of actually opening up the registry editor and inputting value data

What I'm saying is create a .REG file so you can see the format it takes ... then take that format and embed it in your code so you can do what you want.

Why don't you use the REG command in DOS? If will prompt the user "Are you sure you want to import this .reg file?" and in vista it will probably launch the UAC to open up the registry editor for the import. I'm not sure if REG will do that.


thanks for the recommendation. i figured out that to edit value data in a .reg file, you type:

@="\system command here\"