c# - Check if Windows built-in local guest account is turned on -
i'm trying check determine if local windows guest account turned on or off. (please note different enabled/disabled, can check for).
as far can tell place the on/off setting has impact in local security policy setting "deny log on locally".
an acceptable workaround check can determine if built-in guest account capable of being displayed during log-in screen. question thing method needs know. in advance.
edit clarification:
this question answered averagejoeoftoronto on @ technet:
since i'm trying determine status of setting (as opposed editing it), solution provided export security policy using secedit.
secedit.exe /export /cfg %temp%\userrights.inf /areas user_rights /log %temp%\userrights.log
produces cfg contain line relevant "deny log on locally" list:
sedenyinteractivelogonright = guest
for lot of domain computers include aspnet (i recall seeing people looking same solution filter out aspnet). when aspnet or other accounts present output comma separated
sedenyinteractivelogonright = aspnet,guest,anotheruser
averagejoe kind enough inform me policy can edited ntrights.exe available in windows resource toolkit.
if use post, please go on , vote answer @ technet apparently spent on hour looking solution. joe.
Comments
Post a Comment