日期:2014-05-19  浏览次数:20385 次

asp.net读注册表问题,高手过来看一下
VB.net的

Sub   Readreg()
                Dim   reg   As   Microsoft.Win32.RegistryKey,   subreg   As   Microsoft.Win32.RegistryKey
                reg   =   Microsoft.Win32.Registry.CurrentUser
                subreg   =   reg.OpenSubKey( "Software\Eoffice\Run ",   True)
                If   Not   subreg   Is   Nothing   Then
                        If   subreg.GetValue( "No ")   <>   " "   Then
                                Dim   str   As   Object   =   subreg.GetValue( "No ")
                                lblSimpleCode.Text   =   str.ToString()
                        Else
                                lblSimpleCode.Text   =   "empty "
                        End   If
                Else
                        lblSimpleCode.Text   =   "NO   Key "
                End   If
        End   Sub

为什么subreg总是nothing??,我确定键值是一定存在的。
我用winform运行正确,请教各位。谢

------解决方案--------------------
既然不是我说的错误,也只能帮顶了...