Hi,What happens if you test the following:
code:
$scKeyFull="HKEY_LOCAL_MACHINE\Software\BdG\AMO\SoftwareDistribution"
$y=ExistKey($scKeyFull)
If $y=0
? "Key exists, Error value is: " + $y
Sleep 2
Else
? "Key not found, Error value is: " + $y
Sleep 2
Endif
I think maybe the brackets could cause a problem? ([$index]) If the above works, try loosing the brackets like this:
code:
$scKeyFull="HKEY_LOCAL_MACHINE\Software\BdG\AMO"
$RegParameters0 = "SoftwareDistribution"
$RegParameters1 = "City"
$Index = 0
$SubKeyValue = ""DO
$SubKeyValue = $scKeyFull + "\" + $RegParameters + $Index
If EXISTKEY($SubKeyValue)=0
$RegParamValue + $Index = READVALUE ($scKeyFull, $RegParameters + $Index)
Else
Etc etc... If this doesn't work, is it possible that that part of the registry is protected with rights?
Just some thoughts...