1. Re: EUPHORIA Digest - 13 May 2000 to 14 May 2000 (#2000-136)
From: Greg Phillips <i.shoot at REDNECKS.COM>
>Has anyone written any programs for manipulating the Windows registry? More
>specifically, any functions for deleting keys? Adding them and modifying
>them is simple enough to achieve with a *.reg file, but there doesn't appear
>to be any easy way to delete keys (besides going in and editing the registry
>manually).
I normally do that sort of thing with a DOS batch file. There are Windows
API functions for it, and VBscript/Javascript ways to do it, but I don't know
them. If the command-line/batch file/system( command, 2 ) method is good
enough for you, these are the switches:
REGEDIT [/L:system] [/R:user] filename1
REGEDIT [/L:system] [/R:user] /C filename2
REGEDIT [/L:system] [/R:user] /E filename3 [regpath1]
REGEDIT [/L:system] [/R:user] /D regpath2
/L:system Specifies the location of the SYSTEM.DAT file.
/R:user Specifies the location of the USER.DAT file.
filename1 Specifies the file(s) to import into the registry.
/C filename2 Specifies the file to create the registry from.
/E filename3 Specifies the file to export the registry to.
regpath1 Specifies the starting registry key to export from.
(Defaults to exporting the entire registry).
/D regpath2 Specifies the registry key to delete.