Hey guys, as i dont still dont have vista again i am unable to test this function
would someone please test this for me, it all looks good to me...but one can never tell
would someone please test this for me, it all looks good to me...but one can never tell
Code:
-- Check if user is admin (returns true if admin, false if not) function IsUserAdmin() local strSystem=System.GetOSName() local tbUserInfo=System.GetUserInfo() if strSystem == "Windows Vista" then if tbUserInfo.IsAdmin then if tbUserInfo.IsVistaAdminLimitedToken then return false else return true end else return false end else if tbUserInfo.IsAdmin then return true else return false end end end -- Test if IsUserAdmin() then Dialog.Message("Notice", "User Is Admin", MB_OK, MB_ICONNONE, MB_DEFBUTTON1); else Dialog.Message("Notice", "User Is NOT Admin", MB_OK, MB_ICONNONE, MB_DEFBUTTON1); end
Comment