How do I overwrite values with KixTart in the registry? I have something like:

$Write = WriteValue($DNSKEY,"SearchList",$Parameters,"REG_SZ")

If i run the script more than once it keeps appending the $parameters to the SearchList key. How can i get it to overwrite?


Thanks
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
Nevermind, the author had an if statement built in if there was a comma. I just commented it out

; If $DNS = ""
$Write = WriteValue($DNSKEY,"SearchList",$Parameters,"REG_SZ")
; Else
; $Parameters = $Parameters + "," + $DNS
; $Write = WriteValue($DNSKEY,"SearchList",$Parameters,"REG_SZ")
; EndIf


DNSSuffix("server.div.domain.com,div.domain.com")
Answered 01/20/2006 by: schieb
Purple Belt

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