Page 1 of 1

How to check the Registery keys.

Posted: Fri May 29, 2009 1:10 pm
by sunitha
My Install.exe installs the product and writes some values in the Registry .
I need to check if the Registry values exists or not.
Can you let me know if any function or method exists in Ranorex to capture this??
:)

Posted: Fri May 29, 2009 4:19 pm
by Ciege
This following code will read the value from WarnOnIntranet in the HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings path.

Code: Select all

RegistryKey CurrentUserRegKey;
CurrentUserRegKey = Registry.CurrentUser.CreateSubKey("Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings");
intKeyValue = (int)CurrentUserRegKey.GetValue("WarnOnIntranet", 1);
This is within Visual Studio using C#.