windows-registry

registry script - can you assign a decimal value without the dword keyword

Which of the following registry scripts is syntactically correct? Will both work? Is one preferred? Sample A: REGEDIT4 [HKEY_LOCAL_MACHINE\software\microsoft\windows\currentversion\policies\explorer] "nodrivetypeautorun"=255 Sample B: REGEDIT4 [HKEY_LOCAL_MACHINE\software\microsoft\windows\currentversion\policies\explorer] "nodr...

Windows RegKey - Default Browser Application Path

What RegKey can you get the default browser application's path from? Best way to get to it from C#/.NET? ...

How to get server-side registry access from COM object instanciated by php?

On the server I would like to call into a dll from php. Using a COM object. This wasn't a problem, until I tried to use some WPF features. I get the following error: PHP Fatal error: Uncaught exception 'com_exception' with message 'Source: mscorlib Description: Requested registry access is not allowed.' Thru the ProcMon uti...

How to create a windows registry watcher?

How to create a windows registry watcher application using .Net, I want this application to watch all the registry hocks and fire an event when a value change, this event will tell the old and new value for that value. Thats possible? how? need just the idea or where to start ...

C# Issue creating method to delete a registry key

I confess I’m new to C#. I am struggling with creating a method to delete a registry key using .NET. The method takes one string parameter which contains the complete key to be removed. Here’s a sample of what I’m trying to do that doesn’t work (obviously): namespace NameHere { class Program { static void Main(string...

Launch app on startup for all users, but also allow per-user setting (Windows)

I need my application installer set the program to auto-startup for all users. Then each individual user should be able to modify this option without affecting others. Currently I write to HKLM/../Run with installer, which acomplishes the first task. But then I can't disable autorun for current user, because deleting th HKLM/../Run entr...

How to have a program option set by an admistrator that the user can't change?

My application needs to read an option on startup to check if it should start in read-only mode. The option should not be allowed to be changed by the user. I usually do this now using a value set in the HKLM\Software section of the system registry. The administrator sets the value and the users can't change it (they don't have writ...

Put Some Folder as PATH in Windows CE

Hello, Someone can help me!, how to put some folder as PATH in the Windows CE, more specifically an HPC 2000(Jornada 720), put in the PATH like in Windows XP or 2000 or Vista, that you only run like javac or ruby in the cmd and the program runs. Remember that if it have to use the Registry Editor i have one installed. Thanks! ...

Adding an application to OpenWithList with Inno Setup

I'm trying to write an installer for an app I created. I found a suggestion elsewhere that I was trying to follow and it mostly worked. My app is now in the "Open With" list. However, the app won't run at all. Could it be that it's because the app is not being started in its directory, so it can't find the dlls? Root: HKCR; Subkey: ...

Delphi: Writing to Registry Not Working on FormDestroy

procedure TMainForm.FormDestroy(Sender: TObject); var Registry: TRegistry; begin Registry := TRegistry.Create; try Registry.RootKey := HKEY_CURRENT_USER; if Registry.OpenKey('...', True) then begin Registry.WriteInteger('MainLeft', Self.Left); Registry.CloseKey; end; finally Registry.Free; end; e...

WinAPI replacement for reg.exe

Are there WinAPI functions that do the same what can do standard Windows utility reg.exe with import/export flags? I'm know that there are RegSaveKey and RegRestoreKey functions, but the calling process must have additional privileges SE_RESTORE_NAME and SE_BACKUP_NAME. This means that it is necessary to ask user to elevate process (sho...

How do I use a 32-bit ODBC driver on 64-bit Server 2008 when the installer doesn't create a standard DSN?

I ran into an issue with some third party software that we use to track software license usage in our computer labs. We recently migrated the app to 64-bit Server 2008 after receiving assurances from the company that it was compatible and running some preliminary tests that showed that the app worked in the 64-bit environment. Unfortun...

How to safely remove orphaned values in the Windows registry?

I had an application installed on my windows machine which I removed, but it has left an orphaned drive icon under "My Computer". Having dug through the registry, to find it by name, it seems to be associated with a GUID that occurs in other parts of the registry. I'd like to write a quick C program to do the job, once I understand wha...

Reliably detecting OS architecture in a Windows Desktop Gadget

I have some Javascript code that will programmatically register an COM interop assembly by writing all the necessary keys and values to the registry. An older version of this COM object was written in VB6 and didn't work correctly on x64 versions of Windows unless the user manually ran the x86 sidebar.exe, so some of our users would hav...

How to set proxy with python

How can I get the current Windows' browser proxy setting, as well as set them to a value? I knnow I can do this by looking in the registry at Software\Microsoft\Windows\CurrentVersion\Internet Settings\ProxyServer, but I'm looking, if it is possible, to do this without directly messing with the registry. ...

Read and write to the registry with VB .Net

Hello, I made a game and I would like to store the high score and other values in the windows registry. It's made in vb .net. Could someone give me a sample code example of simple reading and writing to the registry. Thanks ...

Registry.LocalMachine.OpenSubKey() returns null

I get a null back from this attempt to access the Windows Registry: using (RegistryKey registry = Registry.LocalMachine.OpenSubKey(keyPath)) keyPath is SOFTWARE\\TestKey The key is in the registry, so I do not know why it's not finding it under Local Machine hive. ...

ASP.Net page accessing wrong registry???

I'm trying to read values from the registry but somehow I seem to be getting the wrong registry. I can't read from any keys that I create and changing the values of keys that I am able to get seems to have no effect. I'm using Registry.GetValue to get the values and it is returning either null for my keys or the original value for the ...

Check Java is present before installing

I'm creating an InnoSetup installer for a jar app. What I want to do right now is to check if java is present before proceeding with the install. So I only need to be sure the users will be able to run: java -jar my-app.jar What I'm doing right now is: [Code] function InitializeSetup(): Boolean; var ErrorCode: Integer; JavaInsta...

Getting the Local AppData folder in Haskell

Hi, I'm trying to get the location of Window's Local AppData folder in a version-agnostic manner using Haskell, and I'm having a bit of trouble doing so. I've tried using the System.Win32.Registry library, and I was able to get the code below (after some trial and error), but I wasn't able to figure out how to use the regQueryValueEx or ...