windows-registry

Register file extension in window registry?

I want to register my own project extension in window registry. I searched on google, at least i found this code, this works well, but I don't understand one line. What is meaning of "%L". The C# code is string ext = ".ext"; RegistryKey key = Registry.ClassesRoot.CreateSubKey(ext); MessageBox.Show(exePath); key....

Reading registry values with cmake

On a Windows 7 machine I cannot read any registry values that contain a semicolon. For example if you have 7-zip, running the following SET(MYPATH [HKEY_LOCAL_MACHINE\\SOFTWARE\\7-Zip;Path]) MESSAGE("MYPATH = ${MYPATH}") results in MYPATH = [HKEY_LOCAL_MACHINE\SOFTWARE\7-Zip;Path] instead of the actual path as per the following t...

Registry permission question for win7-64 c# development

vs2008, c#: First time my winforms app runs it needs to create a setting in HKLM\Software. Obviously a permissions problem, but the requirement is that the user may not have admin rights, and setting permissions on the registry manually is not possible for the end user. I could create keys during install, but is there any way to do this ...

Is CLSID in registry for windows operating system is constant

Hi, I am developing a windows mobile application where i need to get a registry value of notification settings ,that is stored with CLSID as a key .Can i depend on the CLSID for retrieving the value of a particular notification event.Will my application works in all the devices if i depend on CLSID . ...

What is the Maximum length that a Windows Registry Key name can be?

I'm writing a very long registry Key name (it's a list of programs for a combined uninstall) and I think it's too big. What's the max size the key can be (in characters) ? (The smallest maximum among Win xp, vista, 7 since it'll need to work on all of them) ...

What are the registry keys that detects an installed application?

This application is not working right now, and i want to remove it, to install another one. The problem is that the uninstall/repair is not working because he's not able to find the service to remove(i don't know what the user did to end up in this state where the service has been removed, as well as the service installstate file could n...

Remove registry key during uninstall

Hello there. I have a simple C# application that allows users to specify that it should be (or should not be) started with Windows; it does so by setting (or deleting) a registry key (namely, ...\Software\Microsoft\CurrentVersion\Run\MyApplicationHere). I am using a VS setup project to create the installer for this program. I don't wa...

windows 7 - where and how can I store machine user independent data?

I have an app (32 bit c++) running under XP that I need to adapt to run under Windows 7 and Vista. It needs to store a few dozen bytes of data someplace independent of User. Under XP, I stored the data in the registry under HKEY_LOCAL_MACHINE\Software. When I run the app on Windows 7 the registry entries are virtual-ized and each user...

Simplest way to read registry key value to std::string ?

What's the simplest way to read a registry key value to std::String? Say I've got : HKEY_LOCAL_MACHINE / SOFTWARE / MyApp / value1 = "some text" HKEY_LOCAL_MACHINE / SOFTWARE / MyApp / value2 = "some more text" How do I get those values to std::string in a fast way ? ...

Good Windows Registry Wrapper for C++

Hi, Does anyone know of any good free/open source Windows Registry wrappers for VC++ which do not require MFC (i.e. can be run in a console app)? ...

How can save Application Settings in the Registry via MFC?

Hi, I have a MFC application created by the MFC Project Wizard. I wanted to save/read application settings in the registry and so asked this question to find a C++ Registry wrapper as the Windows API is very messy. However, I have now heard that the MFC provides a way to do this. Is this true? If so, how can I read/write values, see whe...

Problem opening registry key on Windows 7

This code used to work on Vista (and Windows XP) but after an upgrade to Windows 7 it now fails with the error shown: Python 2.6.2 (r262:71605, Apr 14 2009, 22:40:02) [MSC v.1500 32 bit (Intel)] on win32 >>> import _winreg >>> h1 = _winreg.ConnectRegistry(None, _winreg.HKEY_LOCAL_MACHINE) >>> key = r'SOFTWARE\Python\PythonCore\2...

How do you read a registry value using a custom msbuild task?

I'm creating an MSBuild task that will read the registry for a specific registry key. If I write the same line of code (see below) in a console application, it returns the expected result, but when it is within the MSBuild task, it returns nothing. Return Registry.GetValue("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSSQLServer\Setup\", "...

NSIS: What is a registry?

What is a registry in NSIS? How do you write to and read from a registry? ...

Increasing Cygwin's memory allocation

I just added a ton of images to my local git repo. As a result, when I try to push to our remote repo, I get the error: fatal: out of memory, malloc failed76) My hypothesis is that this is due to a lack of memory allocated to Cygwin. I've tried to increase Cygwin's memory by following these instructions but i can't find the registry...

Detect changes to registry, prevent changes, etc

How can you detect when the registry is changed? Furthermore, how can you prevent changes to the system registry? I want to create a security tool, but can't seem to find this anywhere. This is in vb.net. I know the registry is stored as files on your computer somewhere, but I have no clue where it is stored, though I could probably ...

How Can I get muitiple files selected to the same application launch from a "right click" context menu (windows explorer)

I am able to get a shell registry type context menu function to work , see below . But is there a way to tell windows to send multiple files selected to the same application , perhaps instead of %1 or %L some other parameter . What happens now is that it launches the associated application for each file in the list . Windows Registry E...

Windows Registry Variables vs. Environment Variables?

At first glance this seems like a purely subjective/aesthetic issue, but I'd be interested to hear opinions (especially any technical ones) on whether environment variables or the registry is the preferred place for storing configuration data in a Windows environment. I can currently only think of the following differences: Registry s...

code for creating context menu does not works properly

when i install an application it should add an item to windows explorer context menu using system registry. but it gives an error that "SOME OR ALL IDENTITY REFERENCES COULD NOT BE RESOLVED" KINDLY HELP ...

How to get DigitalProductId from Registry via TSQL

Currently have this to get a value from the registry in TSQL. However, I need to get the DigitalProductId and it does not return the value required. I think its stored as a binary in the registry. Any ideas? DECLARE @retvalue int, @data varchar(500) EXECUTE @retvalue = master.dbo.xp_instance_regread 'HKEY_LOCAL_MACHINE', 'SOFTWARE\Micr...