-1

is it possible to check if UAC is enabled with VB6 on win7 and vista? i know it has to do with reading a value in the registry, i have see .net versions, but i need a vb6 sample code

thanks

Smith
  • 5,765
  • 17
  • 102
  • 161
  • 2
    Isn't the answer here: http://stackoverflow.com/questions/95510/how-to-detect-whether-vista-uac-is-enabled ? Or do you know the registry details already and just asking "how do I read the registry in VB6?" – Leo Davidson Jan 05 '11 at 07:38
  • that example is actually a .net vesion. i specifically dont know how to do it in vb6, thats why i wrote this one – Smith Jan 05 '11 at 15:07

1 Answers1

3

DevX.com has an example of how to read the registry using VB6.

You'll have to add this constant: Const HKEY_LOCAL_MACHINE = &H80000002...it's missing from the sample.

You'll want to read the HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System key's EnableLUA value. 1 == enabled.

There's also a decent example at freevbcode.com.

C-Pound Guru
  • 15,967
  • 6
  • 46
  • 67