How to Add a DOS Command to Registry
MS DOS commands can be run from the Windows command line prompt. You can also execute DOS commands at startup using a batch file that you save to the Windows Registry. The Registry has a "Run" section that executes commands each time you boot your computer. For instance, if you want to use DOS to map a drive each time a user logs in, you can execute this command by running the batch file from the Windows Registry "Run" section.
Instructions
-
-
1
Click the Windows "Start" button. Type "notepad" into the text box and press "Enter," or in Windows XP, click "Run" and then type "notepad" into the text box. This launches your text editor which you can use to create the batch file.
-
2
Type the MS DOS commands that you want to run into the text file. In the example below, the DOS command "net use" is executed which maps a drive:
net use x: \\computer\myfolder
Replace "computer" with your network computer's name and "myfolder" with the shared resource.
-
-
3
Click "File" on the Notepad toolbar and then "Save As." Name the file "mydos.bat" and save to your desktop. Right-click the file, select "Properties" and highlight the location of the file. Press "Ctrl + C" to copy the location to the Windows clipboard.
-
4
Click the "Start" button again. Click "Run" if you are using Windows XP. Type "regedit" in the text box that opens and press "Enter" to launch your Windows Registry editor. Navigate to "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run".
-
5
Right-click on white space in the "Run" details pane, then select "New" and choose "DWORD Value" from the list of options. This opens a configuration window where you enter your new batch file.
-
6
Click the text box labeled "Value" in the configuration dialog window. Press "Ctrl + V" to paste the location of the batch file. Type a friendly name in the "Name" text box. Click "OK" to save your registry entry.
-
1