Regedit

  • Thread starter Thread starter GT
  • Start date Start date
G

GT

I need to reset stuff with a scanner occasionally - too complicated to go
into, but anyone know a command I can use in a batch file to quickly erase a
registry key? (same key every time).
 
GT said:
I need to reset stuff with a scanner occasionally - too complicated to go
into, but anyone know a command I can use in a batch file to quickly erase
a registry key? (same key every time).

Yes, Wscript.Shell.Regdelete in VBScript for instance. Or look at the
Tie::Registry module for Perl.

You can also use a simple registry patch (as long as the key has no sub-keys
only values), by pre-pending a minus sign.
e.g.
-[HKEY_CURRENT_USER\Control Panel\don't load]

Windows XP Annoyances by David Karp has sections on this.

Dave (not Karp!)
 
The line in the batch file should be something like this:

START /WAIT %SystemRoot%\Regedit.exe /S yourfilehere.reg


The .reg file should be something like this:

REGEDIT4

-[HKEY_CURRENT_USER\Control Panel\don't load]

GT said:
I need to reset stuff with a scanner occasionally - too complicated to go
into, but anyone know a command I can use in a batch file to quickly erase
a registry key? (same key every time).

Yes, Wscript.Shell.Regdelete in VBScript for instance. Or look at the
Tie::Registry module for Perl.

You can also use a simple registry patch (as long as the key has no sub-keys
only values), by pre-pending a minus sign.
e.g.
-[HKEY_CURRENT_USER\Control Panel\don't load]

Windows XP Annoyances by David Karp has sections on this.

Dave (not Karp!)
 
Back
Top