Reg.OpenKey('SOFTWARE\Microsoft\WindowsNT\CurrentVersion\Winlogon', False)为何返回false
我用
OpenKey( ′Software\Microsoft\Windows\CurrentVersion′,false )
返回true倒底是什么原因

解决方案 »

  1.   

    Delphi syntax:function OpenKey(const Key: String; CanCreate: Boolean): Boolean;DescriptionCall OpenKey to make a specified key the current key. Key is the name of the key to open. If Key is nil (Delphi) or NULL (C++), the CurrentKey property is set to the key specified by the RootKey property.CanCreate specifies whether to create the specified key if it does not exist. If CanCreate is true, the key is created if necessary.Key is opened or created with the security access value specified by the Access property. OpenKey only creates non-volatile keys, A non-volatile key is stored in the registry and is preserved when the system is restarted. OpenKey returns true if the key is successfully opened or created //注意这一句
      

  2.   

    错了,用下面这个。注意空格!
    'SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon'