registry

Unable to debug ASP .NET 1.0 Application

When I try to debug a web site in .NET 1.0, I get the following error "Error while trying to run project: Unable to start debugging on the web server. Could not read key from registry" I was not able to find any documentation on this particular error for not not being able to read the key from registry. I did look at Microsoft KB For T...

Windows Registry best practices

In what way is the Windows registry meant to be used? I know it's alright to store a small amount of user preferences, but is it considered bad practice to store all your users data there? I would think it would depend on the data set, so how about for small amounts of data, say, less than 2KB, in 100 or so different key/value pairs. Is ...

Universal approach for storing INI-type settings and/or DB files on various Windows machines

OK, true confession first: Maybe it's just me, but sometimes "best practices for program settings" on Windows machines feels like it's changed more than Microsoft's data access strategies. I'm still running XP, and somewhere along the way just kind "glazed over" about where MS wanted me to store all my app's data, etc. I controlled all...

Vista + VB.NET - Access Denied while writing to HKEY_LOCAL_MACHINE

I want my program to be able to edit a values within a registry key that resides in 'HKEY_LOCAL_MACHINE' My.Computer.Registry.SetValue("HKEY_LOCAL_MACHINE\SOFTWARE\XYZ", "MyValue", "MyData") The above works fine in Windows XP, but throws an UnauthorizedAccessException in Vista. ...

Service Host Resolving - C# Equivalent to RMI Registry?

I'm taking a Masters capstone course early and doing my project in C# while everyone else is doing theirs in Java. The project has 4 services and requires a name server that maps service names to sockets. The instructor is suggesting that the students use RMI to build this registry. Since I'm not very familiar with Java, and the instr...

C#: Storing a .Net Object in the Registry

Is it possible to store a .Net object in the registry? I want to store a generic List<> in the registry, and then retrieve it and parse it back to the List. Is this possible, or do I need to manually serialize it and then deserialize it back? [UPDATE] Following the posted answers, I am going to serialize the object and save it in ...

Android: how to store variable values to registry?

Hi, I am creating an application which requires login and enables user to configure some settings. However I would like to enable user to store preferred settings, username and password. Does anyone know how to store and retrieve values from registry? Another possibility is using SQL Lite database but if possible I would prefer to sto...

PHP : Creating a folder in the registry

How do I create a new registry value using PHP? The following code doesn't work: function registry_write($folder, $key, $value, $type="REG_SZ") { $WshShell = new COM("WScript.Shell"); $registry = "HKEY_LOCAL_MACHINE\\SOFTWARE\\" . $folder . "\\" . $key; //$result = $WshShell->RegRead($registry); $result = $WshShell->RegWrite(...

WiX: How to prevent a registry value from being removed on uninstall?

I want to assert that a certain registry value exists after installation, so I added the following component: <Component Id="RegistryEntryContextMenuOdt" Guid="4BA5BA24-4F65-4BDF-99EB-CB4B947F31A9" DiskId="1" KeyPath="yes"> <RegistryKey Id="RegKeyOdt" Root="HKCR" Action="create" Key=".odt"> <RegistryValue Type="string" Value="...

How to store a user-related information in .net apps?

What is the preferred way to store user-level information for .NET application. I could have used registry or config files - but some users don't have enough permissions to save/load from these. I have heard something about assembly private storage or smth like that, is it a way to go? My main concern is to make sure that even users w...

Double backslash not work?

Hi, does anybody have idea why some windows XP installation would not evaluate path with double backslash in them? Error is found on some XP (same build, patches, unknown more details). In most everything works, on some PCs following doesn't work: Querying path (registry or folder) with functions like RegEnumKeyEx, fopen fails if path ...

Is there an official Windows XP registry reference?

Is there an official Windows XP registry reference online somewehere? I see there's a reference for Win 2000 and Win 2003 servers on MS technet, but I can't seem to find one for XP. Yes, I know that Win 2000 reference would be good enough (most things will be the same in XP anyway), but if there's an explicit reference for XP, I'd like t...

Batch File Querying Registry in 64-Bit Vista

Hi guys me again :) I have a problem with a batch file I wrote. It works fine on 32-bit, but apparently it doesn't work on 64-bit systems, and I don't know why because I do not have access to a 64-bit system. This is the code that works on Vista 32-bit system @echo off Set Reg.Key=HKLM\SOFTWARE\Malwarebytes' Anti-Malware Set Reg....

Simplest way of localizing InstallShield Registry keys

Which is the simplest way to localize the registry keys based on the selected language of an InstallShield setup? I am thinking about writing an VBS which sets some properties based on the selected language. These properties could be used from within the registry key dialog of InstallShield. But isn't there a simpler way? ...

Adding an item to Internet Explorer's right-click context menu

I'm trying to add a new entry into Internet Explorer's right-click context menu. I understand that this can be achieved by creating an HTML file containing JavaScript, and then linking to this from a location in the registry. I have also read that you can also add the HTML to a resource file and compile it into a DLL (see the Microsoft...

internet explorer -> Tools -> proxy settings: How to add menu item, create window when clicked, n perform opreations on registry

Hi I want to add menu item to Internet Explorer-> tools. For example: Exactly like Intrnet explorer-> Tools -> Delete browsing history I want to add proxy related actions For example: tools -> Enable proxy tools -> Disable proxy Also to have proxy cache, i would like to display window exactly like what is displayed when we click o...

Unique identifier for user profiles in Windows

For a client/server application I need to centrally store parts of the configuration information that usually goes into the users profile directory. The client application would on first use write a file or registry entry with a GUID into the current profile. This GUID would subsequently be used as a key in the configuration database on...

How can I install a file to a directory pointed to by a registry key/value in an Installshield Installscript-MSI project?

One of the files in my installation needs to get copied into a location pointed to by a registry key/value pair on the user's destination machine. Right now, I have a kind of kludgy solution where I have the files set to copy to [TempFolder] in the Components view, and then some custom InstallScript code in my OnFirstUIBefore() function...

What happens if I don't call RegCloseKey on an opened key?

In Windows, what happens to an open HKEY variable if you don't call RegCloseKey before the HKEY goes out of scope? I don't see any errors or warnings, nor any memory leaks when the application closes. MSDN doesn't offer much help, but makes it sound like it somehow uses up resources. Does anyone know what actually happens? ...

How do I set a registry value in Windows Vista using C#?

try { RegistryKey rkApp = Registry.CurrentUser.OpenSubKey( "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run", true); if (rkApp.GetValue("AdobeBitmapViewer") == null) { rkApp.SetValue("AdobeBitmapViewer", Application.ExecutablePath.ToString()); } rkApp.Close(); } catch (Exception) { } This code wo...