HI

I have some registry key containing some entries of various formarts

I have to analyze only the REG_SZ values of the entries in these keys to find if a specific string is included in (not equal to) these values to replace this string with another string.

So how do I do this?

THANKS

BYE
0 Comments   [ + ] Show Comments

Comments

Please log in to comment

Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.

Answers

0
You could do worse than start here.

Heard of Google, BTW? It was all I could do to resist sending the link above as a LMGTFY one...
Answered 08/16/2010 by: VBScab
Red Belt

Please log in to comment
0
For vbscript check out the InStr and Replace functions.
Answered 08/16/2010 by: AngelD
Red Belt

Please log in to comment
0
Kim, the OP is using an emerging forum standard whereby, when posting to generic fora, you prefix your subject line with a hint. In this case, PS = PowerShell.
Answered 08/16/2010 by: VBScab
Red Belt

Please log in to comment
0
I see Ian, learning some new stuff today :)
Answered 08/16/2010 by: AngelD
Red Belt

Please log in to comment
0
So if I write:


param($Key,$findval,$repval)

function RepEntryValue ($Key,$findval,$repval)
{
$GetKey = Get-Item $Key
$prop = Get-Itemproperty $GetKey.pspath
$strprops = @{}
$strprops = $GetKey.property | where { $prop.$_.gettype().name -eq "String"}
$strprops | $_ -replace $findval $repval
}

RepEntryValue -Key 'Key analyzed' -findval 'Value searched' -repval 'Value replaced'


I reach my goal?

THANKS

BYE
Answered 08/17/2010 by: balubeto
Senior Yellow Belt

Please log in to comment
Answer this question or Comment on this question for clarity