jero1987 Posted April 24, 2007 Posted April 24, 2007 Is there anyway if i can do a logical check if a registry entry exists or not? Im not sure if i can do this with the FileExists function or not? Thanks guys James
Tripredacus Posted April 24, 2007 Posted April 24, 2007 I believe you can set a var to a RegRead result. Example: $var = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion", "ProgramFilesDir") so then you can do a if $var = expectedResult then RegWrite or whatever you need to do. Twitter | MSFN | VGCollect
jvanegmond Posted April 24, 2007 Posted April 24, 2007 RegRead failure behavior: Failure: Returns "" and sets the @error flag: 1 if unable to open requested key 2 if unable to open requested main key 3 if unable to remote connect to the registry -1 if unable to open requested value -2 if value type not supported github.com/jvanegmond
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now