Good Evening All:
I would like to be able to read a registry key in Windows 8.1 to see if the 
Windows Defender is active. So:
gbError = .f.  &&on error handles a key not found
goWSHShell = CreateObject("WScript.Shell") 
lcKey = "HKLM\SOFTWARE\Microsoft\Windows Defender\DisableAntiSpyware"
lnReturn = goWSHShell.RegRead(lcKey)
do case 
  case gbError 
      gcDefender  = "Microsoft Windows Defender Key Not Found..."
  case lnReturn = 1    
     gcDefender  = "Microsoft Windows Defender Found And Enabled..."
  case lnReturn = 0 
    gcDefender  = "Microsoft Windows Defender Present But Not Enabled..."
endcase
wait window gcDefender timeout 1    
I have zero issues reading a registry key in Windows 7 but in 8.1 I get an 
error 'invalid root key'
I am sure it has something to do with the permissions of the key. I checked the 
permissions this and it gives 'read' rights to all users.
But I still can't access the key.
So how do you accesses the key? Thanks for any help.
Best regards
Jack
_______________________________________________
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: 
http://leafe.com/archives/byMID/profox/7d9e7f72b813014c8fd022cf04f820ed0137b7e...@ex06.drdad.thenewarkarena.com
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to