remove entrys from registry automatically

Hi, I have a little general windows question with a reg file I know how to add entry's in the registry. Is it possible to use such a script to remove entry's ? It's quite annoying to go browsing the entire registry after every reinstall.

Customization Tweaking 1789 This topic was started by ,


data/avatar/default/avatar13.webp

76 Posts
Location -
Joined 2001-01-08
Hi,
 
I have a little general windows question
 
with a reg file I know how to add entry's in the registry.
Is it possible to use such a script to remove entry's ?
 
It's quite annoying to go browsing the entire registry after every reinstall. I would prefer to build me a script ( if possible ) and put every entry that should be removed in there.
 
ps : if you guys do know a way, would it be possible to include an example script , because I really have no clue at this point.
 
Thanks in advance

Participate on our website and join the conversation

You have already an account on our website? Use the link below to login.
Login
Create a new user account. Registration is free and takes only a few seconds.
Register
This topic is archived. New comments cannot be posted and votes cannot be cast.

Responses to this topic


data/avatar/default/avatar14.webp

155 Posts
Location -
Joined 2001-11-09
I know how to delete a string, but that's all. To do anything else you need to make an installer as far as I know.
 
But then MS has all that automated deployment stuff - It could be worth checking out, as well as their msi compliler thingy...anyways here is an example .reg file.
 
It just covers the stuff I learned accidently while reading a .reg file and I made it to remind myself.
----start-----
REGEDIT4
 
;example reg file, note how comments work
;File must start with REGEDIT4 alone on first line, then a blank line.
;@ means default - @ must have no quotes, and it's value must be in quotes.
;string - (alpha-numeral)
;to delete a string, set its value to -. string is in quotes, it's value is not.
;dword (binary)
;hex (hexi-decimal)
;make sure there is a linefeed/carriage return after last entry (leave a blank line at bottom) or it wont work properly.
 
[HKEY_LOCAL_MACHINE\SOFTWARE\test-key]
@="test"
"string"="one"
"string2"=-
"dword"=dword:00000001
"hex"=hex:01
 
; you can put a comment anywhere in the file, as long as its on its own line starting with a semi-colon.
; dont FTP .REG files using ASCII mode, as carriage return/line feeds will be converted to UNIX style on UNIX based Servers.
; Tip: to import reg files without dialog boxes (useful for batch files) run "regedit /s name.reg" (silent mode)
 
[HKEY_LOCAL_MACHINE\SOFTWARE\test-key\sub-key]
"sub-key-string"="keys must be done in steps"
 
----end----
 
The word wrapping stuffs it up a bit as does copy/pasting, but you should get the idea.

data/avatar/default/avatar19.webp

690 Posts
Location -
Joined 2000-05-21
To delete a registry key, put a minus sign in front of it in the .reg file:
 
Windows Registry Editor Version 5.00
 
[-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\
CurrentVersion\Explorer\RemoteComputer\NameSpace\
{D6277990-4C6A-11CF-8D87-00AA0060F5BF}]
@="Scheduled Tasks"

data/avatar/default/avatar13.webp

76 Posts
Location -
Joined 2001-01-08
OP
thanks, I'll have a look at it
 
btw for the intrested:
 
I found a little proggy ( from M$ ) command line registry and it does exactly what the name says, registry control from the command prompt, maybe ideal for scripting a batch file
 
Have still to check it out