Check for Registry VALUE in script
Posted on 2006-10-20
I want to use a log on script to check for a registry VALUE. The key may or may not exist. if the key exists it can have two values- 1, and 2.
i want the script to change the value to 2 if it's currently 1 but not to do anything if the key doesn't exist.
Is that possible?
I know you can look for the KEY by using:
If exist [HKEY_LOCAL_MACHINE\rest of key]
but how do I make the script look for the value?
thanks in advance.