Questions tagged [registrykey]

355 questions
7
votes
2 answers

Mysterious, Native "A" Registry Key with Path: Registry\A

I recently wrote a native NT registry editor for Windows, and ran it on Windows 7. To my surprise, in addition to the two standard root keys, MACHINE and USER, that are present on Windows XP, there was also a mysterious key named "A", that cannot be…
user541686
  • 205,094
  • 128
  • 528
  • 886
7
votes
1 answer

accessing HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData

Can anyone tell me why I can't access the registry key of "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData"? if I query the GetSubKeysNames of "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer"…
Tim Windsor
  • 319
  • 1
  • 5
  • 17
7
votes
3 answers

Check if a key exists in the Windows Registry with VB.NET

In VB.NET I can create a key in the Windows Registry like this: My.Computer.Registry.CurrentUser.CreateSubKey("TestKey") And I can check if a value exists within a key like this: If My.Computer.Registry.GetValue("HKEY_LOCAL_MACHINE\MyKey", _ …
Max
  • 4,965
  • 17
  • 49
  • 64
7
votes
2 answers

Finding Registry Keys in C#

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…
Pandemonium1x
  • 81
  • 1
  • 1
  • 5
6
votes
1 answer

How to change specific registry setting for another user in powershell

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…
Redgum
  • 388
  • 5
  • 14
6
votes
2 answers

How to add a REG_NONE empty value using Batch?

This registry script writes a REG_NONE empty value in the reg editor (which is represented as binary data): Windows Registry Editor Version 5.00 [HKEY_CURRENT_USER\keyname] "valuename"=hex(0): (the english translation of the data-description in…
ElektroStudios
  • 19,105
  • 33
  • 200
  • 417
6
votes
4 answers

Error : System.IO.IOException: the network path was not found

when i am executing following code it results an error please help me to resolve this. class MySample { public static void Main() { string eventLogName = "Security"; string sourceName = "BTHUSB"; string machineName =…
Gomathipriya
  • 905
  • 7
  • 19
  • 38
6
votes
2 answers

How to use RegistryKey.SetValue

I'm trying to create a new registry key using following code and getting this error: Cannot write to the registry key. Where am I going wrong??? var rs = new RegistrySecurity(); string user = Environment.UserDomainName + "\\" +…
kashif
  • 3,713
  • 8
  • 32
  • 47
5
votes
3 answers

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

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…
ScruffyDuck
  • 2,606
  • 3
  • 34
  • 50
5
votes
2 answers

How to access registry key in a UWP app?

I would like to access windows10 registry key by a UWP app. key as: \HKEY_LOCAL_MACHINE\SOFTWARE\MyCompanyName\MyName I can not find any function call to accomplish it. Please indicate me How to do it? Thank you,
Yong-Long Liu
  • 115
  • 2
  • 8
4
votes
2 answers

.NET 3.5 Dispose Registry Key

I have the following code: RegistryKey installKey = Registry.LocalMachine.OpenSubKey(installKey); I am running a static analysis tool on my code and it is giving me a defect saying that I am returning from the medthod without disposing installKey.…
DukeOfMarmalade
  • 2,680
  • 10
  • 41
  • 70
4
votes
1 answer

Registry Key Exist True of False Output

I have what I would consider a simple power shell script that I am trying to run. The script will basically check for the existence of the RegKey and return a value with an output of 0 or 1. The issue I have is that my test results are not…
Omer
  • 43
  • 1
  • 3
4
votes
1 answer

Create a REG_NONE empty value in the Windows Registry via C#

How can I create an empty value in the Windows Registry that has the type REG_NONE? For instance, for this key: HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\ .htm\OpenWithProgids Here are the values that I see on…
DavidRR
  • 18,291
  • 25
  • 109
  • 191
4
votes
0 answers

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

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…
B. Clay Shannon-B. Crow Raven
  • 8,547
  • 144
  • 472
  • 862
3
votes
1 answer

C# loop through the registry searching for keys containing certain text

Is it possible to go through the registry and copy the names of all keys found with a certain text? For example, say I had keys under SOFTWARE of item1, item2, item fred, item34 etc. Am I able to do a search under software for all keys containing…
deepseapanda
  • 3,717
  • 8
  • 32
  • 39
1
2
3
23 24