add 2008 to the list of versions on which UAC is enabled
git-svn-id: file:///home/svn/framework3/trunk@11787 4d416f70-5f16-0410-b530-b9f4589650daunstable
parent
b97ccd5d88
commit
1cbadda8c0
|
@ -10,14 +10,17 @@ module Priv
|
||||||
return session.railgun.shell32.IsUserAnAdmin()["return"]
|
return session.railgun.shell32.IsUserAnAdmin()["return"]
|
||||||
end
|
end
|
||||||
|
|
||||||
# Checks if UAC is enabled, if it is enabled it will return true y running as
|
#
|
||||||
# system or disabled it will return false also if running on a system that does
|
# Returns true if UAC is enabled
|
||||||
# not have UAC it will return false.
|
#
|
||||||
|
# Returns false if the session is running as system, if uac is disabled or
|
||||||
|
# if running on a system that does not have UAC
|
||||||
|
#
|
||||||
def is_uac_enabled?
|
def is_uac_enabled?
|
||||||
uac = false
|
uac = false
|
||||||
winversion = session.sys.config.sysinfo['OS']
|
winversion = sysinfo['OS']
|
||||||
|
|
||||||
if winversion =~ /Windows (Vista|7)/
|
if winversion =~ /Windows (Vista|7|2008)/
|
||||||
if session.sys.config.getuid != "NT AUTHORITY\\SYSTEM"
|
if session.sys.config.getuid != "NT AUTHORITY\\SYSTEM"
|
||||||
begin
|
begin
|
||||||
key = session.sys.registry.open_key(HKEY_LOCAL_MACHINE, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System',KEY_READ)
|
key = session.sys.registry.open_key(HKEY_LOCAL_MACHINE, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System',KEY_READ)
|
||||||
|
|
Loading…
Reference in New Issue