registry

Visual Studio Setup Project - Per User Registry Settings

I'm trying to maintain a Setup Project in Visual Studio 2003 (yes, it's a legacy application). The problem we have at the moment is that we need to write registry entries to HKCU for every user on the computer. They need to be in the HKCU rather than HKLM because they are the default user settings, and do change per user. My feeling is t...

Is this a good way to determine OS Architecture?

Since the WMI class Win32_OperatingSystem only includes OSArchitecture in Windows Vista, I quickly wrote up a method using the registry to try and determine whether or not the current system is a 32 or 64bit system. private Boolean is64BitOperatingSystem(){ RegistryKey localEnvironment = Registry.LocalMachine.OpenSubKey("SYSTEM\\Curr...

Registry vs. INI file for storing user configurable application settings

I'm a new Windows programmer and I'm not sure where I should store user configurable application settings. I understand the need to provide a user friendly means for the user to change application settings, like an Edit | Settings form or similar. But where should I store the values after the user hits the Apply button on that form? ...

How to register COM from VS Setup project?

I have marked my DLL as vsdraCOM, and I can see it in the registry after installing, but my application does not see the COM interface until I call RegAsm on it manually. Why could this be? The COM registration does not work on Vista (confirmed myself) and on XP (confirmed by a colleague). Using Visual Studio 2005 on XP. ...

Best Way To Determine If .NET 3.5 Is Installed

I need to programatically determine whether .NET 3.5 is installed. I thought it would be easy: <% Response.Write(Environment.Version.ToString()); %> Which returns "2.0.50727.1434" so no such luck... In my research I have that there are some rather obscure registry keys I can look at but I'm not sure if that is the route to go. Does a...

Windows: List and Launch applications associated with an extension

How to determine the applications associated with a particular extension (e.g. .JPG) and then determine where the executable to that application is located so that it can be launched via a call to say System.Diagnostics.Process.Start(...). I already know how to read and write to the registry. It is the layout of the registry that makes...

(IIS/Win2000Pro) Granting Registry read rights to IIS user?

Okay, so I'm running a small test webserver on my private network. I've got a machine running Windows 2000 Pro, and I'm trying to run an ASP.NET app through IIS. I wrote it so that the webpage would use the registry to store certain settings (connection strings, potentially volatile locations of other web services, paths in the local f...

How to read a value from the Windows registry

Given the key for some registry value (e.g. HKEY_LOCAL_MACHINE\blah\blah\blah\foo) how can I: Safely determine that such a key exists. Programmatically (i.e. with code) get its value. I have absolutely no intention of writing anything back to the registry (for the duration of my career if I can help it). So we can skip the lecture ab...

programmatically merge .reg file into win32 registry

What's the best way to programmatically merge a .reg file into the registry? This is for unit testing; the .reg file is a test artifact which will be added then removed at the start and end of testing. Or, if there's a better way to unit test against the registry... thanks. ...

Cannot create an environment variable in the registry

I have a custom installer action that updates the PATH environment, and creates an additional environment variable. Appending a directory to the existing path variable is working fine, but for some reason my attempts to create a new environment variable have been unsuccessful. The code I am using is: using (RegistryKey reg = Reg...

How to print css applied background images with the winforms webbrowser control

I am using the webbrowser control in winforms and discovered now that background images which I apply with css are not included in the printouts. Is there a way to make the webbrowser print the background of the displayed document too? Edit: Since I wanted to do this programatically, I opted for this solution: using Microsoft.Win32; ...

Does having a registry full of old stuff slow down Windows?

I know this isn't strictly speaking a programming question but something I always hear from pseudo-techies is that having a lot of entries in your registry slows down your Windows-based PC. I think this notion comes from people who are trying to troubleshoot their PC and why it's running so slow and they open up the registry at some poin...

What registry access can you get without Administrator privleges?

I know that we shouldn't being using the registry to store Application Data anymore, but in updating a Legacy application (and wanting to do the fewest changes), what Registry Hives are non-administrators allowed to use? Can I access all of HKEY_CURRENT_USER (the application currently access HKEY_LOCAL_MACHINE) without Administrator pri...

Save registry values in WinCE using a C# app

Hey all, I'm working on a WinCE 6.0 system with a touchscreen that stores its calibration data (x-y location, offset, etc.) in the system registry (HKLM\HARDWARE\TOUCH). Right now, I'm placing the cal values into registry keys that get put into the OS image at build time. That works fine for the monitor that I get the original cal va...

Registry key that contains the folder for the local user's Programs folder on Vista

I'm troubleshooting a problem with creating Vista shortcuts. I want to make sure that our Installer is reading the Programs folder from the right Registry entry. It's reading it fromK HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders\Programs And it's showing this directory for Programs: C:\Users\NonAd...

Is there a Windows Registry "dictionary" that explains the whole (or most of) the Windows Registry?

I'd like to be able to see what registry keys are used for. A book on the registry would be fine as well. Info on Windows Vista changes would be great! ...

read/write to Windows Registry using Java

Is it possible to read/write to windows registry using java? ...

Folder with Extension

I'm looking to have windows recognize that certain folders are associated to my application - maybe by naming the folder 'folder.myExt'. Can this be done via the registry? A bit more info - This is for a x-platform app ( that's why I suggested the folder with an extension - mac can handle that ) - The RAD I'm using doesn't read write ...

Windows wallpaper: not just BMPs?

I've read in a couple of places that the desktop wallpaper can be set to an HTML document. Has anyone had any success changing it programmatically? The following snippet of VB6 helps me set things up for BMPs but when I try to use it for HTML, I get a nice blue background and nothing else. Dim reg As New StdRegistry Public Function C...

How do you clear your MRU list in Visual Studio?

I want to clear the list of projects on the start page...how do I do this? I know I can track it down in the registry, but is there an approved route to go? ...