VB.Net从Registry中读取DWORD

时间:2017-09-06 05:07:02

标签: vb.net

如何从VB.Net中的注册表中读取DWORD 我在代码下面累了

Dim rk As Microsoft.Win32.RegistryKey = Microsoft.Win32.Registry.LocalMachine.OpenSubKey("SOFTWARE\Microsoft\Windows NT\CurrentVersion", False)

Dim registryValue As Int32 = CInt(rk.GetValue("InstallDate", Microsoft.Win32.RegistryValueKind.DWord))

但它总是返回0.

0 个答案:

没有答案