registry

Why is registry value not installing?

I am using the Visual Studio 2008 Installer. I am trying to set a registry value and it is included in the Setup project. After I install the application using the setup that I created, the registry value doesn't show. I have followed all the steps listed here. Why could this be happening? ...

Access remote registry key with C# in .Net MVC2

I'm using the following code private static string GetLogonFromMachine(string machine) { //1. To read the registry key that stores this value. //HKEY_Local_Machine\Software\Microsoft\Windows NT\CurrentVersion\WinLogon\DefaultUserName var rHive = RegistryKey.OpenRemoteBaseKey(RegistryHive.LocalMachine, machine); var rK...

Adding an option to the windows right-click menu

I want to add some compile options to the right click menu. For instance, when I right-click a Haskell (.hs) file, I want to have an option "Compile with GHC". Following some instructions I found online, I went into regedit, and under HKEY_CLASSES_ROOT\.hs, I added shell\Compile with GHC\command, giving the compile command as the (Defaul...

OpenSubKey under HKLM\Software returning null

Here's my code: Microsoft.Win32.RegistryKey key = Microsoft.Win32.Registry.LocalMachine.OpenSubKey(@"SOFTWARE\ADM"); The registry entry exists on the machine. key is always null. I don't think that this is a security issue. I'm running as Administrator. (I've even explicitly ran the assembly under Administrator mode). I'm using Visu...

Create custom right-click context menu item with C# for all desktop shortcuts (windows explorer)

The problem is easy: I've a lot of desktop shortcuts which points to a lot of file, BUT I also have a lot of shortcuts which points to directories pointed by those shortcuts. I want to remove this redundance by simply adding another rightclick menu options for all shortcuts (.lnk files) that allows you to open explorer.exe to the directo...

Inno Setup - How to keep registry keys after uninstall.

Hello, I am have an installer running for a shareware program that has a time limit. The installer saves an obscure key in the windows registry with the install date, and I do not want this key to be removed when uninstalling, so that the user cannot simply uninstall and reinstall the program in order to circumvent the time limit. I ha...

Set icon for custom right-click context menu item for all desktop shortcuts (windows explorer)

I learned how to add an item to the right-click context menu, but I would like to add an icon too. I tested adding a value Icon to the key (imagine that the key is HKCL\lnkfile\shell\MY COMMAND\command, I added the icon value to HKCL\lnkfile\shell\MY COMMAND) but it doesn't work, I put the path to the icon inside it but it's 32x32, maybe...

Accessing Windows registry with PHP and DOTNET class

Hi, This is a simple question: How do I access Windows' registry with PHP and the DOTNET class? What I want to do is to read a value that another program wrote. Googling did not reveal much. I appreciate any answer! ...

Explorer ContextMenu Entry Problems

I'm using the MVVM Light Toolkit in my App. Though I don't know if my problem is related to it. I have added a ContextMenu Entry for the Windows Explorer on Win7 32bit. It looks like this: [HKEY_CLASSES_ROOT\*\shell\MyEntry] [HKEY_CLASSES_ROOT\*\shell\MyEntry\command] "MyPath+MyExe" "%1" Now if I open a file from the Folder where my...

Creating a good registry class in PHP for important classes

I have a webapplication where I use a registry class. The registry class holds important classes that I need troughout my application. I have made the registry class a Singleton class and this class is static. The content of the registry class is here: <?php class registry { private static $objects = array(); private static $i...

Problem when writing to registry on Windows Server 2003

Hi all, I have the following code to add/edit one entry to the registry. The code runs fine on three different Windows Servers 2003. However it just crashes the application on our fourth server. No exception is thrown/caught no nothing. The app just dies without any traces. Nothing in the event log either. Just disappears. I believe thi...

CF - Information about device, platform etc...

Hi! I would like to get some information about the device, os etc. from the device running my app. I need to log this data so i can run some diagnostics later. Now i think that this data is located in Microsoft.Win32.Registry but that means i need to know all the keys to access values. Any idea? ...

Where does windows Service status stored?

I could see from MSDN documentations that a new windows service will be stored in the registry HKLM\System\CurrentControlSet\Services However the services registry key does not hold a value for the "service running status" Can anyone let me know where the service running status will be stored? ...

How can my application register itself as a browser in Windows 7?

I've written an application that launches browsers based on the provided URL -- the idea is, that I've got certain sites that I'd like to automatically open in IE, while the rest should open in my default browser. The thing works beautifully, so now I'm trying to register it as a browser so I can set it as my default. I'm trying to do it...

Query the Windows registry through batch syntax

I'm trying to query a particular registry folder (or whatever you want to call it) to obtain some information. Particularly the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall folder contains a list of installed software. The issue is that each software is identified through a random key value like {0001B4FD-9EA...

Is there some lightweight user preference support in CPAN?

I want to have my Perl program support both Win32 Registry and the similar feature in Linux. GConf maybe a good idea, but it's too heavy. Is there some lightweight user preference support in CPAN? ...

C# - Changing Windows Folder Option Setting

I need to be able to have access to a hidden file and if I try to access it without the appropriate setting set, I will get an access error. Is there a way to change this option: http://img213.imageshack.us/img213/658/captureplz.png through C# code? I am guessing the Registry, but I'm not sure where this would be. ...

How can I run the regedit.exe from a Perl script on Windows 2008 Server?

I have yet another subtle problem on Windows :( The following one-line perl script doesn't work: perl -e "system('regedit.exe /s C:\my.reg');" It really runs regedit.exe tool (I'm sure since I tried to run it w/o "/s" and saw confirmation dialogs), but it doesn't create a key in the registry. I tried to run regedit.exe /s C:\my.r...

Inno setup ask user to restart system once installation is finished, to make system apply changes in HKLM

Im using inno setup 5.3 latest to package my vb.net application. Im setting Environment variables during installation to the windows system. It needs a reboot of the system to implement the changes made in the Environment variables. How do i prompt the user to reboot the system so as to implement changes ( as done in many applications). ...

Accessing the registry from a web service

I've been having difficulties accessing some (but not all) registry keys from my web service. I therefore assumed (and confirmed with some research) that there are some security restrictions on accessing the registry. Is there some code or change in the configuration I need to do specifically in my C#.Net application? Specifically, I ...