registry

c# Registry System.Byte[] to string

I am currently writing a program that will read part of the windows system registry however some of the values of these keys are of type System.Byte[] when i try and decode these values I can produce a string that has some readable characters that makes but mostly the string is jiberish. I have tried several encoding types but none seem ...

how to reuse ie remembered proxy username password

I am writing .Net application, which should connect to a webservice through a proxy (proxy with username password). My (All) .net application automatically uses the internet explorer's proxy server settings, but not proxy username password settings. Can't i store proxy username password in internet options ? Today i used Teamviewer and ...

How do i get the true path to a reg key?

If you are running a 32 bit app on a 64 bit machine (I am using windows 7) and you write this code RegistryKey key = Registry.LocalMachine.OpenSubKey(@"Software\XXX") it will actually get the key from HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\XXX and not HKEY_LOCAL_MACHINE\SOFTWARE\XXX Progromatically given a RegistryKey how do...

How to install new filetype associations in registry

Does anyone know how to register any extension into the registry and open it with program X in C#? For instance, when installing Word, it adds the extensions .doc, .docx etc... and then when you double click on the file Word opens up this file. This I want to achieve with my own program. Double clicking file.xxx opens up the contents usi...

Disabling Registry Redirection for a Registry Key on x64 Platform

Hi, On 64-bit platform, installed-check is getting failed for SQL Reporting Services and Add-ins. Installer is checking the registry entries under path "HKEY_LOCAL_MACHINE\Software\Microsoft\Microsoft SQL Server\Instance Names" and registry entry is available out there but since MS SQL Server is a 64-bit application, therefore, the inst...

How to improve the performance of write data into registry?

Hi, I am working on performance optimizing for our legacy application. It use VC++ 2008, OS is WindowsXP or above. In installation, it will parse a file and write some information about the file into registry. With the files count increasing, the installation need very long time. I try to comment the code that write to registry, and i...

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...

Installshield - Update the registry according to a file given at runtime

I'm writing a basic MSI installer using installshield 2010. A different company would supply a .reg file that the installer would read in runtime and would update the registry accordingly. I can't figure out how to accomplish this. I manged to write a script using the Installscript that accomplish this, but when this script is running ...

C# Reading the registry and Wow6432Node key

Hi all, I have come code that reads the registry and looks for a value in HKEY_LOCAL_MACHINE\Software\App\ but when running on 64bit versions of Windows the value is under HKEY_LOCAL_MACHINE\Software\Wow6432Node\App. How should I best approach this? Do I need a 64bit installer or should I rewrite my code to detect both places? Thanks ...

Install Microsoft KB951608 with WIX

Hi, On our server (win 2008 r2) we enabled the setting "force network authentication" to enforce that the client must support the NLA, because the port 3389 is directly reachable from the internet. But on Windows XP SP3 the NLA seems to be disabled per default. As I wrote an installer with WIX to distribute the rdp files, I'd also like ...

All versions SQL Server Registry Key..

Is there any registry value that i could check to see if there is any version of SQL Server installed? I want to check a single value...not a value for 2005 another one for 2008 etc. ...

Registry.LocalMachine.OpenSubKey failing intermittently

I have some code like so ( winforms app .NET 2.0 ) RegistryKey regKey=Registry.LocalMachine.OpenSubKey@"SOFTWARE\cPaperless\TTC\Settings", false); This code is failing every once in a while on Win7 and Vista when UAC is on ( by failing i mean the key is null.) Note that the Key is definitely existing and I can see it in the registr...

Adding performance counters via my ASP.NET code?

Hi folks, I'm trying to add some performance counters to my asp.net website. Now, I know how to increment/decrement some custom counter I make .. but my problem is that if I get my ASP.NET website to create these counters, if they do not exist (eg. i do this check in the global.asax App start method) then add/create them. But, it doesn...

Getting security information for remote registry keys?

According to the documentation for API function GetNamedSecurityInfo, it can get information from the following objects: Local or remote files or directories on an NTFS file system Local or remote printers Local or remote Windows services Network shares Registry keys Semaphores, events, mutexes, and waitable timers File-mapping objects...

GetProfileInt() Not Returning Default Value

I'm using GetProfileInt to get key values from the registry. When the location exists, the code works, but when it does not, it returns 0 (and initializes the registry key to 0). Why doesn't this work? Code: SetRegistryKey(_T("MyKey")); int def = 0x1FFF; def = GetProfileInt(_T("Subkey"), _T("KeyWithVal"), def); ...

Need info about how to associate my applications file extensions with the application using InstallShield 2010

I am using InstallShield 2010 to create an installer for my application but I am having trouble finding any info about how to associate the file extensions my applications uses with the application. Can anyone link me to some docs or give me a quick run down on how to do this? My application is a java application and I am trying to cre...

php registration form - limit emails

i want to restrict certain emails to my website. an example would be that i only want people with gmail accounts to register to my website. { /* Check if valid email address */ $regex = "^[_+a-z0-9-]+(\.[_+a-z0-9-]+)*" ."@[a-z0-9-]+(\.[a-z0-9-]{1,})*" ."\.([a-z]{2,}){1}$"; if(!eregi($regex,$sube...

Is the 'Implemented Categories' key needed when registering a Managed COM Component?

When registering a managed class for COM Interop by hand, certain registry keys are needed. For example HKEY_CLASSES_ROOT CLSID\[My Cls Id] InprocServer32 (Default) = "mscoree.dll" Assembly = [My assembly name] etc. I've noticed that when VS registers a library for COM Interop, it also adds a key HKEY_CLASSES_R...

Using CLASID to identifying software Module

Is there any way of identifying software modules with the help of only knowing CLASID value in the windows registry? ...

.NET Setup Project - Changing Registry Settings

I have a class that modifies the ProxyEnable and ProxyServer registry keys of Internet Settings. If I use this class in a Console App and run it the value are changed and I can see the changes using regedit. Now the part that doesn't work is I am trying to use this class in an Installer class so that the registry keys are changed duri...