Assuming my machine is called MYMACHINE, my domain is MYDOMAIN, my username is rik and I’m logged in as MYDOMAIN/rik, what will the following return?
- Environment.UserDomainName & "\\" & Environment.UserName
- System.Security.Principal.WindowsIdentity.GetCurrent().Name()
- HttpContext.Current.User.Identity.Name
- Threading.Thread.CurrentPrincipal.Identity.Name
Bonus point: Whose registry setting will this affect?
Registry.CurrentUser.OpenSubKey ( @"Software\Microsoft\Internet Explorer\PageSetup", true ).SetValue("footer", "xxx")