Micro Focus QTP (UFT) Forums
How to read registry values using DotNetFactory in QTP - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners)
+--- Thread: How to read registry values using DotNetFactory in QTP (/Thread-How-to-read-registry-values-using-DotNetFactory-in-QTP)



How to read registry values using DotNetFactory in QTP - mag - 07-16-2008

How to read registry values using DotNetFactory in QTP?

I tried the following code,but it is giving some error.

Code:
Set regVersion = DotNetFactory.CreateInstance("Microsoft.Win32.RegistryKey")

RegKeyFinal = regVersion.OpenSubKey("SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon",True)

msgbox RegKeyFinal.GetValue("ParseAutoexec")

PLease suggest if i am missing any steps.