I added the Manifest file with the element
<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
I built the project and it keeps crashing when a non-administrator runs it.
Unhandled Exception: System.Security.SecurityException: Request for the permissi on of type 'System.Security.Permissions.RegistryPermission, mscorlib, Version=2. 0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed. at System.Security.CodeAccessSecurityEngine.Check(Object demand, StackCrawlMa rk& stackMark, Boolean isPermSet) at System.Security.CodeAccessPermission.Demand() at Microsoft.Win32.RegistryKey.CheckSubKeyReadPermission(String subkeyName) at Microsoft.Win32.RegistryKey.CheckOpenSubKeyPermission(String subkeyName, B oolean subKeyWritable) at Microsoft.Win32.RegistryKey.OpenSubKey(String name, Boolean writable) at LotusTrustedSites.RegistryKeyExtensionMethods.GetOrCreateSubKey(RegistryKe y registryKey, String parentKeyLocation, String key, Boolean writable) at LotusTrustedSites.ReportDownloader.Main(String[] args) The action that failed was: Demand The type of the first permission that failed was: System.Security.Permissions.RegistryPermission
The assembly or AppDomain that failed was: MyApp, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null The method that caused the failure was: Microsoft.Win32.RegistryKey GetOrCreateSubKey(Microsoft.Win32.RegistryKey, Syste m.String, System.String, Boolean)