当前位置: 代码迷 >> ASP.NET >> asp.net读注册表有关问题,高手过来看一下
  详细解决方案

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

热度:2822   发布时间:2013-02-26 00:00:00.0
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运行正确,请教各位。谢

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