registrykey

How can i check for RegistryKey permissions like ReadKey or FullControl in .NET?

青春壹個敷衍的年華 提交于 2019-12-25 03:42:41
问题 I want to check that I have permissions on a RegistryKey for example can I read values and write values. This blog enumerates permissions http://blogs.msdn.com/b/bclteam/archive/2006/01/06/509867.aspx How can I go from GetAccessControl() to knowing that I have for example FullControl? 回答1: I'm afraid there is no managed code for this. you could use a dllimport and invokeCheckAccess but i prefer just accessing the registry and handling the exception (if any) 来源: https://stackoverflow.com

WiX Add Registry Key to Customize Context Menu

痴心易碎 提交于 2019-12-24 03:51:21
问题 I want to create an .msi installer that will add a cascading context menu when I right-click my mouse on my desktop. First, I tried doing this using the following script, and this works fine: [HKEY_CLASSES_ROOT\DesktopBackground\Shell\MyApp] "MUIVerb"="My Application" "SubCommands"="app1;app2" "Position"=- [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\app1] @="Run App1" [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer

MaxWebConfigFileSizeInKB and IIS 10

五迷三道 提交于 2019-12-24 03:39:04
问题 I am using a Web application with a web.config file larger than 250KB on IIS 10. In IIS 8.5 and below the registry key HKLM\SOFTWARE\Wow6432Node\Microsoft\InetStp\Configuration\MaxWebConfigFileSizeInKB (REG_DWORD) could be set to allow web.configs to be larger than 250KB. However it seems that this registry key is not read by IIS 10 any longer. Does anyone know if this key should still work on IIS 10 or how to use config files larger than 250KB in combination with IIS 10? 回答1: I forgot to set

Which Branch[es] of the Registry does a CE Device Read?

梦想与她 提交于 2019-12-23 13:05:16
问题 My Windows CE (Motorola/Symbol) handheld devices have folders named \Software\Microsoft\Windows CE Services below both HKEY_CURRENT_USER and HKEY_LOCAL_MACHINE. HKEY_CURRENT_USER only has one entry, "DeviceFriendlyName"; it is read by the device, as the device is labeled in Windows Explorer with that key's value. However, what about HKEY_LOCAL_MACHINE? It contains many more keys, such as ExcludeExts, FileSyncPath, GuestOnly, &c. Why is there a \Software\Microsoft\Windows CE Services in two

Finding Registry Keys in C#

馋奶兔 提交于 2019-12-23 12:18:39
问题 I am working on a project that will allow me to delete the registry key from a Windows 7 PC. Specifically I am trying to make a program that will allow me to delete a profile from the machine via the ProfileList key. My problem is no matter what I try I can't seem to read the key correctly which I want to do before I start randomly deleting stuff. My code is RegistryKey OurKey = Registry.LocalMachine; OurKey = OurKey.OpenSubKey(@"SOFTWARE\Microsoft\WindowsNT\CurrentVersion\ProfileList", true)

How to change specific registry setting for another user in powershell

混江龙づ霸主 提交于 2019-12-23 12:01:10
问题 Goal: To edit a specific registry key setting for a specific user, and no others, in powershell. Known: OS: Windows 8.1 Embedded Industry Pro (Same as Win 8.1, but with some embedded features) I can do this manually on the target machine by opening REGEDIT, selecting HKU, then click on File Menu, click on Load Hive, navigate to the user's profile directory, e.g: c:\users\MrEd and when prompted, type in 'ntuser.dat' - import HKEY_CURRENT_USER. The Hive will be loaded into HKU where you can

Remove a 'Deny' rule (permission) from the 'UserChoice' key in the Registry via C#

喜夏-厌秋 提交于 2019-12-21 18:03:28
问题 I am working on File Associations. I have identified that there is a key called UserChoice in: HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\[ext]. I have been able to read from and write to the UserChoice key provided that I create it and that it has not already been created by Windows. However, if the UserChoice key has already been created by Windows, then I need to run as Administrator to get access to the key. My ultimate goal is to delete the UserChoice

How do I get the value of a registry key and ONLY the value using powershell

独自空忆成欢 提交于 2019-12-20 09:32:01
问题 Can anyone help me pull the value of a registry key and place it into a variable in PowerShell? So far I have used Get-ItemProperty and reg query and although both will pull the value, both also add extra text. I need just the string text from the registry key and ONLY the string text from the key. I'm sure I could create a function to strip off the extra text but if something changes (i.e. reg key name) it might affect this. 回答1: $key = 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion' (Get

W. Aus Standard Time .Net TimeZoneInfo SupportsDaylightSavingsTime Issue

陌路散爱 提交于 2019-12-20 06:13:26
问题 The .Net / Windows TimeZoneInfo object for W. Aus Standard Time shows that it supports daylight savings time. A search on the Australian government site regarding territories' observance of daylight savings shows Western Australia repealed it in 2009, so no daylight savings from 2010 to present and beyond. I have checked the TimeZoneInfo object on several systems, and they all say W Aus Standard Time supports dst. All their registries have the same value. I have checked Windows Updates and

C# Registry SetValue throws UnauthorizedAccessException

折月煮酒 提交于 2019-12-19 17:40:09
问题 Before you try to answer this with, "Do a quick Google search." I'd like to point out that I have already. Here is the situation, I have the following method that attempts to modify a registry key value. The problem I'm getting is that when executed, it throws an UnauthorizedAccessException even though I've opened the key as writeable . I'm running Visual Studio as administrator and even tried to make a small .exe with a manifest file forcing it to run as admin that will execute the code with