how Find a key in all registry and delete all keys?

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
r2du-soft
Posts: 68
Joined: 09 Sep 2011 12:13

how Find a key in all registry and delete all keys?

#1 Post by r2du-soft » 12 Jan 2012 04:42

hi :)
Please help me
i will find keys (example keys windows) in all registry and delete all key's
How do we do it؟
what code I do this?
thanks

Ed Dyreen
Expert
Posts: 1569
Joined: 16 May 2011 08:21
Location: Flanders(Belgium)
Contact:

Re: how Find a key in all registry and delete all keys?

#2 Post by Ed Dyreen » 12 Jan 2012 20:09

'
I think you want to enumerate a regPath and delete all key-values underneath right ? In that case AutoIT can solve this within 3 lines of code but then again this is a batch forum. The DosTips function library would be a good place to start:
http://www.dostips.com/DtCodeCmdLib.php#Function.GetRegKeys

But it's everything but a 3 liner in DOS :|

r2du-soft
Posts: 68
Joined: 09 Sep 2011 12:13

Re: how Find a key in all registry and delete all keys?

#3 Post by r2du-soft » 14 Jan 2012 07:04

hi
Thanks for help
but I not find that code for find and delete keys!!!
i'm Live in iran and My EN Language is not good.
If it is possible Write that code.
Thanks


find in all registry "sheed" and delete all find's

Thanks for help

r2du-soft
Posts: 68
Joined: 09 Sep 2011 12:13

Re: how Find a key in all registry and delete all keys?

#4 Post by r2du-soft » 17 Jan 2012 06:35

anybody not Answer my question?!!!!!!!

alan_b
Expert
Posts: 357
Joined: 04 Oct 2008 09:49

Re: how Find a key in all registry and delete all keys?

#5 Post by alan_b » 17 Jan 2012 16:12

For his own good, to protect a child from the loss of a leg,
I would not give him a chain saw.

Your questions cause me to fear that if they were answered you would do irreparable damage to a P.C.

Ed Dyreen
Expert
Posts: 1569
Joined: 16 May 2011 08:21
Location: Flanders(Belgium)
Contact:

Re: how Find a key in all registry and delete all keys?

#6 Post by Ed Dyreen » 17 Jan 2012 17:01

'
@r2du-soft

I would like to solve your problem, the problem is I think it's too difficult (for you) to solve this with batch.
alan_b is right, there is a risk you'll do unrepairable damage, trying to use code you don't understand.

So you don't understand the DOSTips link I posted. And I don't "yet" have a library that is a 100% safe.

Google AutoIT, it's a BASIC like language and should be easy enough to understand.

Code: Select all

While 1
   $Name = RegEnumVal ( $FullPath, $Count )
   If @error <> 0 then ExitLoop
   If StringInStr ( $Name, $SCRIPT_Path ) Then RegDelete ( $FullPath, $Name )
   $Count += 1
WEnd
I believe there is even an Iranian version :)

r2du-soft
Posts: 68
Joined: 09 Sep 2011 12:13

Re: how Find a key in all registry and delete all keys?

#7 Post by r2du-soft » 19 Jan 2012 02:02

hi Ed Dyreen
Thanks for help
just a Problem
I place
$Name
$FullPath
$Count
$SCRIPT_Path
What replace?
I search in all registry & find & delete key "sheed"

Thanks

Post Reply