Compatible Support Forums: remove entrys from registry automatically

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

remove entrys from registry automatically

#1 User is offline   fatattack 

  • journeyman
  • Group: Members
  • Posts: 76
  • Joined: 08-January 01

Posted 13 November 2001 - 01:23 AM

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
0

#2 User is offline   insaNity 

  • member
  • Group: Members
  • Posts: 155
  • Joined: 09-November 01

Posted 14 November 2001 - 08:52 PM

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.
0

#3 User is offline   Xiven 

  • addict
  • Group: Members
  • Posts: 690
  • Joined: 21-May 00

Posted 14 November 2001 - 10:15 PM

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"
0

#4 User is offline   fatattack 

  • journeyman
  • Group: Members
  • Posts: 76
  • Joined: 08-January 01

Posted 14 November 2001 - 10:16 PM

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
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users