What registry access can you get without Administrator privileges?

In general, a non-administrator user has this access to the registry: Read/Write to: HKEY_CURRENT_USER Read Only: HKEY_LOCAL_MACHINE HKEY_CLASSES_ROOT (which is just a link to HKEY_LOCAL_MACHINE\Software\Classes) It is possible to change some of these permissions on a key-by-key basis, but it’s extremely rare. You should not have to worry about that. For your purposes, your application … Read more

Visual Studio output file permissions?

Wooho I finally figured this one out. It’s a bug in Windows 7 and likely in Windows Server 2008 (possibly 64bit versions only). It surfaces when you disable Application Experience service. Re-enabling this service has fixed this problem for me. You can’t imagine how happy I am, this was making programming so frustrating as it’s … Read more

How do I set a Windows scheduled task to run in the background? [closed]

As noted by Mattias Nordqvist in the comments below, you can also select the radio button option “Run whether user is logged on or not”. When saving the task, you will be prompted once for the user password. bambams noted that this wouldn’t grant System permissions to the process, and also seems to hide the … Read more

How do you request administrator permissions using NSIS?

Outfile RequireAdmin.exe RequestExecutionLevel admin ;Require admin rights on NT6+ (When UAC is turned on) !include LogicLib.nsh Function .onInit UserInfo::GetAccountType pop $0 ${If} $0 != “admin” ;Require admin rights on NT4+ MessageBox mb_iconstop “Administrator rights required!” SetErrorLevel 740 ;ERROR_ELEVATION_REQUIRED Quit ${EndIf} FunctionEnd Page InstFiles Section SectionEnd is the basic code I usually recommend to make sure … Read more

Detect if program is running with full administrator rights

Win9x: Everyone is “admin” NT4: OpenThreadToken/OpenProcessToken + GetTokenInformation(…,TokenGroups,…) on DOMAIN_ALIAS_RID_ADMINS SID in a loop 2000+: OpenThreadToken/OpenProcessToken + CheckTokenMembership on DOMAIN_ALIAS_RID_ADMINS SID Other alternatives are: IsUserAnAdmin or AccessCheck Checking the TOKEN_ELEVATION* stuff in the token is not required for testing the current process but it is useful if you need to find out if the user … Read more