registry

Having trouble registering assembly for COM

I have created a simple class library project in visual studio 2008 that has one class as shown below. I am trying to get this class to register for COM interop so that I can use in via unmanaged scripts like vbscript or jscript. In my project build properties I have checked the box that says "Register for COM Interop". In the Assembly...

RegistryTreeChangeEvent via C# & WMI

I'm getting this error: Unhandled Exception: System.Runtime.InteropServices.COMException (0x80042001): Exception from HRESULT: 0x80042001 at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo) at System.Management.ManagementEventWatcher.Start() at MyNamespace.Program.Main(String...

How to properly add file associations to the Windows Registry?

What data and where, should I add to the Windows registry to properly create a file association? I ask this question primarily because of some old applications that I wrote years ago, which used Visual Studio .NET's Windows Installer packager to create the file associations. The extensions I installed were .whr and .encxml. Now, on the...

Useing Registry value to launch a application? whats wrong with it? .net 2.0 ONLY please

I am trying to write a little piece of code that retrieves the install path of an application, and uses it + the applications name to start the application on click. This is what I have so far but I keep getting the error "Object reference not set to an instance of an object". This is the code I'm trying to use, whats wrong? RegistryKey...

Best place to hide a key in the Windows Registry?

Hello All! My Delphi program has a built-in protection mechanism to check for banned license keys on the Internet and displays a message to the user if a blacklisted key is found. I'd like to store the blacklisted key in the registry, so if the user tries to re-enter it (and he/she is not connected to the Internet), it's not accepted. ...

Building an COM-interop enabled project without registering it during build

Hi, In Visual Studio 2010, I'm trying to build an COM-interop enabled C# project without registering it during build, but I DO require the assembly's typelibrary (.tlb) file, so I can import it from another C++ project in the solution. I haven't found a way of doing this - there once upon a time was a tlbexp.exe tool, but it was depreca...

Registry Association Problem

Hi Guys, I have a my own file type .Has and a program HasEditor which i want to be Default program for my file type. but when i right click on the has file select open with and browse to HasEditor.exe it just attaches internet explorer insteat of HasEditor.exe. What exactly happens is strange when i double click HasEditor.exe its icon ...

Registry and file system change identification

Is there a Coding way in C++ to find out the changes happened in Registry and file system. I need to find the changes happened to file system and registry after a software installion. There is filesystemwatcher in c# to identify filesystem changes. However, I need that to implement in C++ for both registry and files. ...

Problem with JNIRegistry

I am using JNI Registry API to access Windows registry. Here is my code: import com.ice.jni.registry.Registry; import com.ice.jni.registry.RegistryException; import com.ice.jni.registry.RegistryKey; import com.ice.jni.registry.RegistryValue; public class JNIRegistryExample { public static void main(String[] args) { Registr...

how to read registry key for certain condition only?

i have create 5 dynamic buttons in 1 row and store the button info (caption, isActive, etc) in registry. It shows the button in form when the IsActive = TRUE from registry. The result is as below (each button indicate by a * symbol): ***** When i set the IsActive = FALSE for button2 and button4, the button being remove and left the sp...

c++ reading and writing windows registry properly

So I have been stuck on this for a while... thought I got it to work, but it breaks sometimes and I am not sure of the exact reasons... I am not sure if this matters but I am writing this inside Browser Helper Object (BHO)... Is IE always 32 bit process, no matter whether it is running on 64 and 32 bit OS? so I want to be able to read ...

Is there any way to gather all files and registry entries associated with an already installed app?

I need to create a package with all files associated with an install, so that I can migrate this install to another computer. I cannot download the installer / setup program, and so I need to do this instead. Does anyone have any experience with this? Thank you!!!! :-D ...

Registry pattern and lazy instantiation of registered objects

Hello, Let's imagine that we have Registry pattern... <?php class Registry { private static $objects = array(); private static $instance = null; public static function getInstance() { if (self::$instance == null) { self::$instance = new Registry(); } return self::$instance; } protected function _get($key)...

RegQueryValueEx and REG_BINARY

Hi all, I tried to read a REG_BINARY value of the Windows registry, but I don't know how... I'm really new to the c++ world and I hope that you'll be cool and help me with that problem. I found that code on this website, I know this is not doing the job, but just for let you know what I'm trying to do. #include <iostream> #include <win...

a required privilege is not held by the client while uploading a temporary registry (C#)

While I am trying to upload a registry in my registries using the C# code , the application is throwing the error "a required privilege is not held by the client". If I am using the same code on some other machine it is working fine but not particularly on my machine I am using below mentioned code to upload the registry files Process ...

Creating registry entries in Windows 2008 64bit

I wrote a bunch of unit tests to cover the windows registry reading/writing. They use the CRegKey ATL api. These worked fine on my desktop machine of XP Pro, but when the tests came to run on the build machine - a Windows 2008 x64 Server - the tests fail with ERROR_ACCESS_DENIED when trying to create a key via Create. The user who is ...

Adding a start up value for safe mode? C# .Net Framework 2.0 ONLY please.

I'm trying to write a application for fun, and to learn more about the registry and start up items. Its a Windows log on replacement, the way i see it is that the typical windows log on user name/password is stored in the registry... there for crackable BUT! By making a application that starts immediately after the welcome screen that pr...

Storing and encrypting SMTP credentials in the registry

I have a username and a password for an smtp server. Currently they are hardcoded in my code: string userName = "username"; string password = "password"; Currently, anyone who disassembles my dll could see these strings, correct? I wish to store these securely in the registry, in case of future changes to the smtp server, and/or the ...

Custom Right Click Menu on multiple files

I added a command to the right click context menu for sql files in windows explorer, but it only works if I select a single file. How can I make it work for multiple files. I added the command to: HKEY_CLASSES_ROOT/sqlwb.sql.9.0/Shell/ExecSql/Command I'm on Windows 2008. Ideas? Thanks Edit: This does work. I suppose last night I must ...

Problem setting up custom URL Protocol on Windows CE

Hi, I am trying to setup a custom URL Protocol (testProtocol) on a Windows CE device. When the user clicks a link with testProtocol it will launch an application (ParamTest.exe). I have done the following: Created a Windows Smart Device Project -> Device Application. I altered the Main() method to take in a string[] of arguments whi...