registry

C# Windows service needs to make registry changes

I have a service that needs to update the registry every 5 minutes (counteract gpo). The code runs fine in a regular application, but when I put it in a windows service, it doesn't make the changes. I am using the local system account for the service and it is not throwing any exceptions The code below works in a regular console app b...

Does KEY_WOW64_64KEY have any effect on 32 bit Windows?

It appears that specifying the KEY_WOW64_64KEY flag (reference) when accessing a registry key under 32-bit Windows XP has no effect - that is, no error is thrown, and the key is opened as if you hadn't had the flag set. I know Windows 2000 throws an error when it encounters this flag. I want to make sure my app is compatible with as ma...

Modifying a non-local registry hive

I'm writing a program for my workplace and because we work on computers damaged by hard drives we sometimes need to work with their registries before they'll boot. Most notably, we're trying to fix the 0x7b error that stems from the Registry Hive that controls the default Hard disk drivers being damaged and the computer wont boot. Micr...

Converting Byte recieved from the registry to String

Hello, I'm in the process of creating an application which will monitor specific registry key values for changes and write those changes to a text file. At present I can monitor the changes and know when specific values have changed and collect the data held in those values. The problem I'm having at the moment is the return type of the...

ebXml OpenSource java implementation

Hi Stack! In our project we are looking for an OpenSource java implementation of the OASIS ebXml Registry 3.0 Specification (spec). It seems there is not a lot of OpenSource initiative for this standard, actually we only found freebXml Registry which is self-named Reference implementation of the specification. The last release (3.1) i...

How to change the registry value of remote system using C#

Hai every one I am developing an windows application in which i have to block the removable storage devices such as pendrives.I found that its possible by changing the registry value of HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\UsbStor,start value to 4.But the problem is I have to block it on remote systems too.Can any one sug...

Issue with .INF file for registering ActiveX

I have made an INF file, its contents are as follows [version] Signature="$CHICAGO$" AdvancedINF=2.0 [Add.Code] MyControl.dll=MyControl.dll ; Now installing the ActiveX [MyControl.dll] file-win32-x86=thiscab clsid={05B7BC83-FCA1-452d-9D33-193784FEC637} FileVersion=1,0,0,1 RegisterServer=yes but the Control is not registered after I...

How to tell if the file supplied really is a registry hive

I'm doing some work with registry hives, and I need to know if the file the user supplies the program with really is a registry hive. Short of attempting to mount it, how can I tell if the file really is a registry hive? ...

Desktop Namespace Extension in Windows 7: Unable to drag and drop

I have a program which makes use of a desktop Namespace extension. In Windows 2000, Windows XP, and Windows Vista, users can drag icons onto an icon on the desktop and the program is launched. However, in Windows 7 (both Home and Ultimate), all that happens is the icon order is rearranged. I tried using Sysinternals dbgview.exe. It ...

Writing values to the registry with C#

Hello, I'm in the process of creating a C# application which will monitor changes made to the registry and write them back to the registry next time the user logs on. So far I've got it monitoring changes, reporting them, writing the hive, key and value to a text file. I'm now at the point where I need to take them values out of the f...

Access is Denied for registry

I am playing with the registry programmatically for the first time, and it's not working that well (but at least I haven't destroyed my computer). Specifically, I keep getting back Error 5 (Access is Denied) from RegCreateKeyEx and RegSetValueEx. The thing that is strangest to me is that when HKEY_CURRENT_USER\Software\dir1\Sub Directory...

Editing Windows registry, from Python, Under Linux

Hi All, I am looking for a Python API (or a C API as I am willing to bind) for editing Windows registries from XP to 7 from within a Linux system. The Windows target will be a mounted volume under Linux. I would be willing to code a library if none exists. Therefore, any docs or internals on the registry would be handy too. Any help,...

C# not writing values to the registry

Hello all, I'm currently developing a C# application which will record registry changes, save them to a file, then later be able to write the preferences saved to the file back to the registry. So far I can get all the way through the process till I try and write the values back to the file. The code runs through with no errors, but wh...

Read a Registry Key

I have a web application which is importing DLLs from the bin folder. const string dllpath = "Utility.dll"; [DllImport(dllpath)] Now what i want to do is first import the DLLs from a folder not in the current project but at some different location. The path of that folder is stored in a registry key. How should i do this? Than...

Registry access in non-admin mode

I've several long-standing apps written in Delphi that persist their settings in the registry. I've used HKEY_LOCAL_MACHINE for 'hard' settings such as configuration preferences and HKEY_CURRENT_USER for 'soft' info such as window positions, MRU lists etc. Now my users are telling me that in non-admin (standard user) mode the apps dont ...

XML to LINQ Question/s

Hello, Just before I begin heres a small overview of what I'm trying to achieve and then we'll get down to the gory details. At present I'm developing an application which will monitor a users registry for changes to specific keys which relate to user preferences. Were currently using mandatory profiles (not my choice), anyway the whole...

Access all registry keys as Administrator (permission exception)

I'm traversing the registry on Windows 7 from C#. When opening certain subkeys, I get a SecurityException: Requested registry access is not allowed. An example is "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer". I've searched similar questions and found suggestions to run Visual Studio with Administrator privileges. I tried t...

Windows Run regkey and RDP

Is there any difference in behavior of HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run registry key, when an user Logs in via console and/or does a RDP to the Machine. I have a exe listed in Run key to be launched when somebody logs in. If I log in to a Win 2003 machine via console the exe is launched, keeping this sess...

Windows 7 - C# Excel Add-In - Registry.GetValue is always returning null

I don't know what's going on here... but the Microsoft.Win32.Registry class is returning all kinds of strange stuff. When I say GetSubKeys it returns a bunch of things that aren't there in regedit (for example, I call Registry.LocalMachine.OpenSubKey("SOFTWARE").SubKeyCount and it returns "81"... but there are only 30 keys when I view i...

Why might the .NET framework (V2.0) be trying to mess with the Internet Explorer registry?

One of our applications recently got installed in a system that is tightly locked down. On startup, the application tries to modify the registry at HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\AutoDetect. There are no known references to that location in the source code. In fact the application in question sh...