Delete registry key from batchfile

  • Thread starter Lars-Erik Østerud
  • Start date
L

Lars-Erik Østerud

Adding/changing existing registry keys can be done with a shortcut
that runs regedit.exe with a .reg file as parameter.

BUT how do I delete a registry key automaticly from a shortcut or from
a batch file? Any easy way do do this (need to delete a key after
start, to prevent a problem when logging out later)
 
D

Doug Knox MS-MVP

Open a Command Prompt window and enter REG /? REG is a command line Registry Editor and will allow you to add/remove/change Registry entries. You can either do it with a single command line line, or as a command in a BAT file.
 
H

Haggis

Lars-Erik Østerud said:
Adding/changing existing registry keys can be done with a shortcut
that runs regedit.exe with a .reg file as parameter.

BUT how do I delete a registry key automaticly from a shortcut or from
a batch file? Any easy way do do this (need to delete a key after
start, to prevent a problem when logging out later)

well , if you already know how to add a key ...a quick "google" will give a
ton of info ,but short and sweet ?
[HKEY.....].... adds an entry
[-HKEY.....]..... deletes an entry



hth
 
H

Haggis

Lars-Erik Østerud said:
Adding/changing existing registry keys can be done with a shortcut
that runs regedit.exe with a .reg file as parameter.

BUT how do I delete a registry key automaticly from a shortcut or from
a batch file? Any easy way do do this (need to delete a key after
start, to prevent a problem when logging out later)

this may be of interest

http://www.jsifaq.com/SF/Tips/Tip.aspx?id=0170
 

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