Click here to Skip to main content
15,891,607 members
Everything / Registry

Registry

registry

Great Reads

by Amir Mohammad Nasrollahi
How to list the installed applications of your system and their setup details in C# language
by Michael Chourdakis
A simple template for manipulating the registry
by Avelino Ferreira
"Don't care about Google Maps/Routing/StreetView programming. This Control gives your WinForms applications the power of Google Maps API v3". - my previous article. Unfortunately, since Dec.2015, Google Maps JavaScript API applications requires authentication and the program stopped working properly
by Marijan Nikic
One-file shell-integrated easy solution for automatic recognition of movies and TV shows

Latest Articles

by Minh Danh Nguyen (ToughDev)
Dual-system Bluetooth keyboard setup: Seamless pairing with Windows 11 and Ubuntu 22
by Bruno van Dooren
This article describes how to use Windows transactions to recursively delete a registry tree under a registry subkey and then the subkey itself.
by Greg Utas
Registering and efficiently accessing polymorphic objects
by Marijan Nikic
One-file shell-integrated easy solution for automatic recognition of movies and TV shows

All Articles

Sort by Updated

Registry 

23 Jan 2024 by Minh Danh Nguyen (ToughDev)
Dual-system Bluetooth keyboard setup: Seamless pairing with Windows 11 and Ubuntu 22
25 Mar 2023 by l o o l
Understand that this is true said by Dave-Kreskowiak You cannot export a single value. You would have to write your own tool to do that A bat would do that, but use a filter and a temp file: @echo off set "_hkey=HKLM\SOFTWARE\Dinesh" >nul reg...
25 Mar 2023 by Dinesh Kumar Dora
How can i export only a single reg entry from a reg key? I dont need all the subkeys or entries or values to be exported. Just a specific single reg entry. I tried reg export but it exports the whole reg key with whole reg subkeys and other...
3 Mar 2023 by Dave Kreskowiak
You can't. There is no tool that comes with Windows that will export anything other than an entire key and all of its sub-keys and values. You cannot export a single value. You would have to write your own tool to do that.
3 Mar 2023 by Richard MacCutchan
PowerShell is fun :) Export registry information using PowerShell[^] Batch Script - Reading from the Registry[^]
29 Nov 2022 by Dave Kreskowiak
There's no such thing as a "smart key", or anything "smart" in the registry. What you are seeing are component GUIDs data rearranged into a different order. I ran into this about five or six years ago. I can't find my notes on it, but various...
29 Nov 2022 by Chester West
It seems like there are some "smart" keys in the windows registry. When I say smart...I mean that they are there (RegEdit sees them) but if you perform a search you won't find them (via OpenSubKey/GetSubKey routines). Case in point: The...
24 Sep 2022 by DoingWork
Dear Fellows How to check .net 6.x.x version installed or not by Registry ? for both x86 and 64 bit OS. What I have tried: I found 2 registry values by google but their exists multiple on different PCs. So I want to handle all registry keys...
24 Sep 2022 by RickZeeland
The registry location seems to change per update as a user commented here: Correct approach to Check for .NET 6 installation - Microsoft Q&A[^] Quote: ...
24 Sep 2022 by Gerry Schmitz
Quote: The version of .NET Framework (4.5 and later) installed on a machine is listed in the registry at HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full. If the Full subkey is missing, then .NET Framework 4.5 or above isn't...
16 Aug 2022 by Bruno van Dooren
This article describes how to use Windows transactions to recursively delete a registry tree under a registry subkey and then the subkey itself.
11 Feb 2022 by Member 11312264
In .NET C#, we can identify network availability changes by calling this event NetworkChange.NetworkAvailabilityChanged += AvailabilityChanged; But how to know is WIFI disconnected from Laptop manual or because of other technical issues. Let...
11 Feb 2022 by Gerry Schmitz
If you want "more", you need to relate any log information with one of your "incidents", and go from there. wireless networking - How to check the event log (if any) for network failure? - Super User[^] Using Windows logs to troubleshoot...
11 Feb 2022 by OriginalGriff
You can't - it doesn't know or care why the WiFi no longer works, just that the device is no longer connected. Think about it: the phone line could have failed, the power gone, the router burst into flames, the user unplugged the router, he...
21 Jan 2022 by Sascha Manns
I already googled it, but currently have not found an answer. I'm thinking about storing application settings. So I can use the .NET ConfigurationManager to use a user.config in %AppData%. One possible way is to store the information in a...
21 Jan 2022 by Dave Kreskowiak
A major problem with the Registry is portability. The Registry is specific to Windows only. That means you cannot use it if you port your code over to other platforms, like phones. If all you're doing is storing a small list of settings, speed...
19 Jan 2022 by sarunsm
Computer\HKEY_CLASSES_ROOT\Dir...
22 Sep 2021 by Devendra Sarang
I have developed one project and in that "Microsoft.Access.Database.Engine.2010" and "Crystal Reports for .NET Framework 4.0" are two Prerequisites of my project. I have added "product.xml" file with both of them which will check if they are not...
22 Sep 2021 by OriginalGriff
It's probably related to the age of the package: Access 2010 is in the era of Windows 7, and access to the registry was tightened up as of Win 8 - partly for security, and partly to reduce the "bloating" of the registry which was becoming silly...
11 Jul 2021 by Raphael Bernard 2021
I have a website built with asp.net core. How can I make sure my user information is not leaked? How can I actually have a secure registration? What I have tried: I have a website built with asp.net core. How can I make sure my user information...
11 Jul 2021 by OriginalGriff
That's far too big a question for a little text box, it involves many factors rather thna just "do this and you'll be good". Start by using HTTPS instead of HTTP - secure the communications: The Complete Guide To Switching From HTTP To HTTPS —...
6 Jul 2021 by Emil12345687
Hello, i have an .exe file which is needed to be started initially as SYSTEM user. This .exe is calling another instance(copy) of itself, but in user context so that interactive actions can be done (in this case showing a Toast Notification). ...
6 Jul 2021 by Emil12345687
thank you very much for your quick reponse! You're right, Registry is not a good place for the needs... I tried a bit with ConfigurationManager.AppSettings, but wasn't able to get it run properly immediately. So i decided to solve it witch a...
6 Jul 2021 by CHill60
If you are looking to share data that does not need to be "persisted" (i.e. stored on your local disk) then I've used Memory Mapped files in the past, see C# Send Data Between Processes (w/ Memory Mapped File) | coding.vision[^] But as you are...
6 Jul 2021 by OriginalGriff
That's because HKEY_LOCAL_MACHINE is always a protected space in registry, so you need to either elevate privileges on any process that accesses it, or better not use the registry at all. That's partly why the registry is getting harder and...
30 Jun 2021 by Marcel W 2021
system("reg add HKEY_LOCAL_MACHINE\HARDWARE\DESCRIPTION\System\CentralProcessor\ /v TEST /t REG_SZ /d CPU Name"); I need this command executed in my c++ Project but it gives my following error while executing: Invalid Key Name becouse it doesnt...
30 Jun 2021 by Richard MacCutchan
Adding keys to the registry can make your system unusable, especially when not using the proper API calls. You should use Registry Functions - Win32 apps | Microsoft Docs[^], and only ever add to a keyname that you create inside HKEY_CURRENT_USER.
30 Jun 2021 by CPallini
Quote: system("reg add HKEY_LOCAL_MACHINE\HARDWARE\DESCRIPTION\System\CentralProcessor\ /v TEST /t REG_SZ /d CPU Name"); The backslash is the escape character in C/C++ strings, and it must be escaped as well. Replace every occurrence of \, in...
6 Apr 2021 by PiAndNoTau
I recently learned about the Registry in Windows, more specifically about the directory; Computer\HKEY_CLASSES_ROOT\Directory\shell There you can make a key called eg. Test and another key called command and there you can make a new String...
3 Apr 2021 by Richard MacCutchan
If you just scroll down from Computer\HKEY_CLASSES_ROOT\Directory you will find the Folder key. However, be warned, that editing registry keys carries risk. If you make mistakes you can cause serious system problems.
4 Mar 2021 by deXo-fan
Hello, I know similar problems have been posted here before. I know this because I've searched this site for solutions, but the ones I've found haven't worked out for me. I have a problem with the web browser control. Right now, it renders pages like an old version of Internet Explorer. I need...
4 Mar 2021 by Member 15090244
I blocked the security and nothing happens :) Regards
15 Feb 2021 by Member 14864964
Hello, using a batch file, on my admin account, I would like to load the regedit hive of a disconnected windows user (NTUSER.DAT). Then, getting part of the "RemotePath" value of one of his mapped drive (what comes next \\\\server\\users\\) : ...
15 Feb 2021 by Richard Deeming
According to this StackOverflow answer[^], it is possible to do this in Powershell. reg.exe load 'HKLM\TempHive' Path\to\offline\file.dat $path = Get-ItemProperty -Path "HKLM:\TempHive\Network\z" -name RemotePath | Select-Object -ExpandProperty...
4 Feb 2021 by Dan Sutton
So, as it turns out, you can change the default font for Notes inside Outlook - the sticky notes, I mean - and in Outlook up to (I think) 2010, there's an option to do it in Settings - which changes a registry entry. If you then export that,...
16 Dec 2020 by vigneshjayaraman
I have set the winlogon shell registry to my executable application. I have no issues running my application. Buti have to set the background for kiosk mode so that if multi monitors connected i can display the selected image to wallpaper for all...
5 Nov 2020 by Richard Deeming
You're potentially throwing another NullReferenceException from within your first catch block. But you don't need either of those catch blocks: public bool ValueExists(string Key, string Value) { using (RegistryKey rk =...
4 Nov 2020 by WillingMost7
I need to make an application in WinForm C# as my final programming project. The project is about managing Registry more nicely to make it easier for the user to edit values. The problem is, when I read whether the UninstallString exists or not,...
4 Nov 2020 by Richard MacCutchan
Why are you relying on a NullReferenceException to check the code is correct. You should test the returned value from any of the Registry calls to see if it is null before proceeding. You should never write code like: RegistryKey rk =...
6 Jul 2020 by Greg Utas
Registering and efficiently accessing polymorphic objects
21 Jun 2020 by Member 3017361
I hit the same problem: took a day of debugging what to hook. If you want to hook the registry access -- you need to snag the versions in kernelbase.dll not advapi32.dll or kernel32.dll. Otherwise some things will hook, but others, like...
23 Jan 2020 by Richard Deeming
Those appear to be the correct registry keys and values: Web Browser Control & Specifying the IE Version - Rick Strahl's Web Log[^] I suspect the MainForm_Load event is too late to set them; the control will already have been initialized by this point. You could try updating the registry from...
13 Nov 2019 by Marijan Nikic
One-file shell-integrated easy solution for automatic recognition of movies and TV shows
12 Mar 2019 by Salvia the Sage
Hi. This is my first post at this site. Seems like a cool place. There is a right click menu in Windows for quickly creating files with certain file extension types. I figured out how to add specific filetypes here for easy file creation as well ass how to add previously defined entries in...
6 Feb 2019 by Richard Deeming
I already gave you the answer to that question two weeks ago! Need help with VB.NET code with dotnet 2.0 framework only[^]: How to read the 64 bit registry from a 32 bit application or vice versa | Rhyous[^] EDIT: VB.NET translation of the code from example 2: Imports System Imports...
5 Feb 2019 by Maciej Los
MSDN documentation is here: Reading from and Writing to the Registry (Visual Basic) | Microsoft Docs[^] It contains information about security: Quote: Robust Programming The registry holds top-level, or root, keys that are used to store data. For instance, the HKEY_LOCAL_MACHINE root key is...
5 Feb 2019 by Dinesh Kumar Dora
Hello Friends, I converted my VB6 code to VB.net and due to environment dependencies i have to stick to dotnet 2.0. Now after converting there is only one piece of code that is failing which i am not able to fix. Here is the code that fails and gives System.Io.exception: Bad File name or...
31 Jan 2019 by Ralf Meier
Sometimes Google helps : [^] Perhaps you try it like this ...
29 Jan 2019 by Michael____
Hello, I´m stuck with my knowledge regarding receiving registry values remotely so I wanto to ask for help. My situation is as follows: I have a computer A and a computer B which are domain members. From computer A I want to read registry values from a remote PC, in this case computer B. To...
28 Jan 2019 by Dave Kreskowiak
See my comment above about the WMI way to do this. You never mentioned a problem with this method. But, there is a way to get the .NET Registry classes to work remotely AND with provided credentials. See Rhyous » Blog Archive » How to authenticate and access the registry remotely using C#[^].
19 Aug 2018 by Michael Haephrati
Here is a way to find what is the email address / addresses used by the user running a program
25 Jul 2018 by ZYV0
Screen I work on app to copy and paste filenames. I already have a working context menu with little subapps (written in c#), but I would like to that paste options will be visible only if clipboard contains some text. How to do it? Is it possible by add something to registry? What I have tried:...
25 Jul 2018 by Dave Kreskowiak
There's nothing you can put into the registry that's going to do the whole "If there's something on the clipboard" thing. You're going to have to provide actual code for that and modify the context menu on-the-fly. The only way to do that is to write a shell extension. This is FAR from a...
25 Jul 2018 by OriginalGriff
See here: Clipboard.ContainsText Method (System.Windows.Forms)[^]
24 May 2018 by OriginalGriff
Just like there is no "Paste Event", there is no "Paste Registry key" or even "Paste Context menu item" - Context menus are free text, they aren't "windows standard items" where all apps use the same items (like they do for Open and Save dialogs). You can create your own context menu which uses...
24 May 2018 by Dilan Shaminda
Below is the screenshot of the registry key of the shell contextmenu. I couldn't find the paste key here What I have tried: I am trying to get the click event of the shell contextmenu paste event. Whether the user clicks on paste event or not. But I couldn't find the registry key and Is there...
24 May 2018 by Richard MacCutchan
We explained to you yesterday at How to capture the paste event in windows?[^] that this is not possible.
17 May 2018 by Member 13830097
Good afternoon members of the forum. Faced such a problem: When I try to print the value of the key, Install does not output anything at all What I have tried: TCHAR lpData[1024]={0}; DWORD buffersize = sizeof(lpData); HKEY hKey; // if (RegOpenKeyEx (HKEY_CURRENT_USER,...
17 May 2018 by User 7429338
The path you are looking for is under HKEY_LOCAL_MACHINE, not under HKEY_CURRENT_USER.
17 Jan 2018 by Roland M Smith
I have a program written in C++ (not .Net) that is compiled 64bit and has admin rights in the manifest. I am trying to add the registry settings for the application Event Source but it keeps giving me errors. The key is under LocalMachine: ...
17 Jan 2018 by Roland M Smith
I have it figured out. If the key doesn't exist, I have to create it. For the delete key, you have to open the key one level above.
17 Jan 2018 by Roland M Smith
Running the command prompt as administrator isn't helping. The following gives the error message: The system cannot find the file specified. dwResult = RegOpenKeyEx(HKEY_LOCAL_MACHINE, szRegKey, 0, KEY_SET_VALUE, &hRegKey); if ( dwResult == ERROR_SUCCESS ) { ...
17 Jan 2018 by Dave Kreskowiak
The application does NOT get admin rights from the manifest file. It always gets its rights from the account that launched it. If it's a service, the Log On tab of the service properties page shows the account that the service is launched as. Also, code cannot give itself greater permissions...
17 Jan 2018 by Phil J Pearson
Quote: it keeps giving me errors and Quote: it fails are not satisfactory descriptions of the problem. If you take the trouble to define what you mean by that then you may identify the reason yourself. If you don't describe the problem better than that don't expect a better answer than this.
19 Nov 2017 by Member 11299538
Hi, I have a problem that is i compiled .mof which runs powershell... my problem is how to undo this code...i'm stuck with powershell running every 5 min in my computer... so can any one know where is .mof compiled files write there codes so can i delete it or undo it. thanks What I have tried:...
19 Nov 2017 by Richard MacCutchan
Running the MOF Compiler on a File (Windows)[^].
12 Sep 2017 by sri durga
Hello, I have C# application, i want to check tool which is registered or not in the registry. if the tool is registered i want to get the path and execute that exe in command prompt? can anyone suggest me, How to do this? Thanks. What I have tried: using (RegistryKey rk =...
12 Sep 2017 by Richard Deeming
The most likely cause is that you're running a 32-bit application on a 64-bit OS: c# - OpenSubKey() returns null for a registry key that I can see in regedit.exe - Stack Overflow[^] By default, you'll be looking in HKLM\Software\Wow6432Node, thanks to the registry redirector: Registry...
4 Sep 2017 by Bohdan Stupak
The tip explains Windows registry redirection feature with a simple example
16 Aug 2017 by Asyraf Patt
How to disable checkbox "Automatically detect settings" , Enable checkbox "use automatic configuration script" ? [^] What I have tried: Below is my code for change the value fo auto configuration proxy.But i need to enable the checkbox of "use automatic configuration script" to use below...
16 Aug 2017 by Jochen Arndt
There is no registry key for that check box. The checkbox is enabled if the AutoConfigUrl value exists. When disabling the checkbox, the value is removed from the registry. However, it seems that the control panel stores the value somewhere when unchecking the box. But don't ask me where. You...
7 Jul 2017 by Priyanka Sabharwal81
One of my windows service uses the java.exe to run. The path where java lies in my C drive is stored in a registry entry. Java keeps updating its revision when updates happens and it keeps deleting the old folder and creates a new one. This new path needs to be updated in my registry entry other...
7 Jul 2017 by KarstenK
You must use the registry entries of the Java installaion, not these values. Tip: You can also use EnumRegistry Another solution is to find the javaws.exe in the program files folder of the disk with FindFirstFile. See the example code.
15 Jun 2017 by neelamjain2012
I am building an application to read .mdd file using given code class Program { static void Main(string[] args) { MDMLib.Document document = new Document(); document.Open(@"D:\Sample.mdd", "", MDMLib.openConstants.oREAD); foreach (IMDMField field in document.Fields) { ...
15 Jun 2017 by Dave Kreskowiak
Two possibilities: 1) You really didn't register MDMLib.dll. REGASM only works on .NET libraries. If this .DLL is not a .NET library, you use REGSVR32 on it instead. 2) One or more .DLL's MDMLib.dll depends on are not present and/or registered where MDMLib expects them.
6 Apr 2017 by daviddelombaerde
This is a bit simular as my previous question, but I think I need another approach. I have a app that can connect to other pc's on the company network. For now I can connect to their explorer as an admin without any dialog asking for my credentials. But now I want to be able to import their...
6 Apr 2017 by OriginalGriff
You cannot elevate a process to Admin privilege without UAC: that's the whole idea. And if you could - which you can't - we wouldn't tell you how to do it, as it would render access control meaningless which would only benefit hackers, ransomware writers, and such like low life scum. We do not...
28 Mar 2017 by Mohamed Ahmed
Hi all I'm totally new in C# I have two AutoCAD registry key I want to merge them at once without user confirmation messagefor example those two files calledPS.regTF.reghow could I do this ..What I have tried: Microsoft.Win32.RegistryKey key; private void...
27 Mar 2017 by .Net Jim
How to access the Windows Registry using C# | InfoWorld[^]
19 Mar 2017 by Evil Jay
Hi to All.There is some problem:I'm use fault tolerant system with Microsoft Windows Server 2008 sp2.Where I try to get registry value as Microsoft.Win32.RegistryKey key = Microsoft.Win32.Registry.ClassesRoot.CreateSubKey(@"Installer\Components\" + myBranch);if (key.GetValue("1001") !=...
19 Mar 2017 by OriginalGriff
The first thing to do is find out which bit is null: probably it's "key" but we can't tell.So either use the debugger to find out, or add code to check if the value of key after the attempt to create the subkey is null. If it is, then the subkey creating failed - and that's likely to be a...
27 Feb 2017 by Nika Qantaria
I'm trying to develop an application, where user can load a proxy list and software should navigate to a page with different IP's. I'm using some registry settings to do that. But the problem is that when i try to change the IP address it remains the same, in "Internet Options" the IP has...
27 Feb 2017 by Jochen Arndt
There may be two reasons for such behaviour.The first is that the page is not requested again but got from the cache. This can be only avoided by clearing the cache (see How to clear the cache when your application hosts a WebBrowser control in Visual C# .NET[^]).The second reason might...
3 Feb 2017 by Satish Jagtap
This article is written in VC++ as utility to manage startup applications of Windows.
27 Nov 2016 by Aner Izraeli
im using ms-detours to hook functions. im successfully injecting my dll to a process. im successfully catching functions of createfile\deletefile and event see them at "debugView".im unable to catch all registry functions.tried:REGSETVALUEX OrigRegSetValueEx = NULL;REGOPENKEYEXA...
27 Nov 2016 by Arthur V. Ratz
I've just reviewed your code and this all seems to me a kind of strange. I'd recommend you to read this article API Hooking with MS Detours
4 Jul 2016 by Avelino Ferreira
"Don't care about Google Maps/Routing/StreetView programming. This Control gives your WinForms applications the power of Google Maps API v3". - my previous article. Unfortunately, since Dec.2015, Google Maps JavaScript API applications requires authentication and the program stopped working properly
17 Jun 2016 by glen205
I think your SendKeys isn't opening the menu properly. Looks like you're opening the File menu and tabbing downwards to menu item 4 (Connect Network Registry).Some information on SendKeys here (MSDN) and here (Stack Overflow)You are sending ALT (which as a keystroke will highlight the...
17 Jun 2016 by Member 12589590
Hello i need to connect to a computer but with the registry.i got this, but it just open regedit and then it makes nothing. Private Sub Button1_Click_3(sender As Object, e As EventArgs) Handles Button1.Click System.Diagnostics.Process.Start("regedit.exe") ...
17 Jun 2016 by OriginalGriff
First off, why would you want to do that? Retrieve the Registry entry properly and use the value it returns: Registry.GetValue Method (String, String, Object) (Microsoft.Win32)[^]Secondly, did you really expect that to work? The first thing Regedit will do is kick up UAE to get user permission...
17 May 2016 by dravoss
Hello ,i tried to use this code to replace any __Random_and[x,y] with rand(x,y) but it didn't run please help me function charCallbackRand($matches1){ $charOne = (int)$matches1[1]; $charTwo = (int)$matches1[2]; return rand($charOne,$charTwo); } $myword =...
17 May 2016 by Patrice T
RegEx only apply on strings, not on code.function charCallbackRand($matches1){ $charOne = (int)$matches1[1]; $charTwo = (int)$matches1[2]; return 'rand('.$charOne.','.$charTwo.')'; } $myword = '__Random_and[22,95]'; $result =...
17 May 2016 by George Jonsson
Instead of using a preg_replace_callback() you can directly insert the wanted numbers from the original text with preg_replace()Try this:$string = '__Random_and[22,95]';$pattern = '/__Random_and\[(\d+),(\d+)\]';$replacement = 'rand($1,$2)';$result preg_replace($pattern,...
30 Apr 2016 by ByeByeByeByeBye
how would I change the wallpaper with C# back to a known path of a bitmap or remove the wallpaper for good? Is there any command for it. A SendKeys Combo would be fine.Can't access my wallpaper settings manually any longer, it's been greyed out all options and I have a strange bitcoin...
30 Apr 2016 by Richard MacCutchan
See also Wallpaper Changer[^].
20 Apr 2016 by h.sabatou
Hi,I have found some code on the web to get a registry key remotely with special credentialPublic Enum RegHive As UInteger HKEY_CLASSES_ROOT = &H80000000UI HKEY_CURRENT_USER = &H80000001UI HKEY_LOCAL_MACHINE = &H80000002UI HKEY_USERS = &H80000003UI...
20 Apr 2016 by Dave Kreskowiak
Error code 2 is FILE NOT FOUND.You can find what those error codes are here[^].The path you built doesn't exist on the target machine.
18 Apr 2016 by Member 12468000
Getting message“ .dll was loaded, but the DllRegisterServer entry point was not found”... can anyone help me to find the solution of the above ??step by step ... like ..step 1 : a step 2 : bstep 3 : c....so on.. Anyway, a big thanks in advance to my GURU/s who can help me to get my...
18 Apr 2016 by Sergey Alexandrovich Kryukov
Please see my comment to the question. The thing is: the question, as formulated, simply makes no sense.I'm not sure you are aware of purpose of regsvr32. It registers or unregisters ActiveX control or other COM components in system...
13 Apr 2016 by Abdulmateen50
I have a case where i have to login to the computer using active directory logon name only. The user will enter only active directory logon name on the main login screen of windows and click on OK button then the domain computer should fetch the password from AD and login to the computer...