registry

reading from registry fails in vista enterprise

I try to read registry key from registry . I start with Admin privilage .Read fails only in vista enterprise ...

x64 wix installer on XP doesn't write the registry values under Wow6432Node

In case of installation on x64 I need to write two registry values: 1) <RegistryValue Root="HKLM" Key="SOFTWARE\Microsoft\Exchange" Name="Info" Type="string" Action="write" Value="8"> 2) <RegistryValue Root="HKLM" Key="SOFTWARE\Wow6432Node\Microsoft\Exchange" Name="Info" Type="string" Action="write" Value="9"/> I'm using <?if $(var.Pl...

Edit Windows 7 Registry in Python?

I have run into another problem with my current project. The program needs to values and keys periodically while running. Each time I attempt to edit the value, I get a code 5, Access Denied. How would I go about doing this so the values can be editied, but the user doesn't have to enter admin credentials to run the application? I am us...

Script/Batch file to add HKCU key

Hi! We have an application which creates an HKCU entry when first run by each user. As the registry is locked down, this causes an error and requires our Tech Support to grant then remove access each time. We have 300 users and can rollout the application's installation remotely via a LANDesk batch file package. I need to be able to add ...

Set Win XP environment variable using script

I have a script that sets an environment variable in Windows XP by creating a value in the registry under HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment. The variable shows up when I view the env var GUI under Control Panel, but if I type SET in the command window it isn't listed. If I try to echo it in t...

Adding a custom button to Windows Explorer toolbar in Windows 7

Hi, I am trying to add programmatically a custom button to windows explorer toolbar in windows 7. I know how to add it manually but I need to do it in an installation process. Manually adding it involves changing windows registry. Also if someone knows how to take ownership of a key in windows registry (even beeing an administrator) and...

Which is better: Dependency Injection+Registry or Dependency Injection or Global Registry?

Firstly, I want to restrict this question to web development only. So this is language agnostic as long as the language is being used for web development. Personally, I am coming at this from a background in PHP. Often we need to use an object from multiple scopes. For example, we might need to use a database class in the normal scope b...

Setting program to be autorun through registry

Hi! I have the following code: http://privatepaste.com/8364a2a7b8/12345 But it only writes "c" (supposedly, conversion to LPBYTE leaves one byte only). What's the proper way to handle GetModuleFileName and registry edit? ...

C# program that dumps the entire HKLM registry tree to the console?

I'm trying to write a simple console app that dumps the contents of HKLM to the console. The output should look something like: HKEY_LOCAL_MACHINE HKEY_LOCAL_MACHINE\BCD00000000 HKEY_LOCAL_MACHINE\BCD00000000\Description KeyName: BCD00000000 System: 1 TreatAsSystem: 1 GuidCache: System.Byte[] HKEY_LOCAL_MACHINE\BCD...

.inf file AddRegistry section flag meaning (HKR,,"UpperFilters",0x00010008,"upperfilt" ) what does 0x00010008 stand for ?

At MSDN Installing a Filter Driver there is a sample file given (reproduced lower). In the [upperfilter_addreg] section there is the registry line HKR,,"UpperFilters",0x00010008,"upperfilt". What is the meaning of the 0x00010008 flag ? Note that this file is meant to install an Upper Filter Driver. Thank you microsoft for your great...

Registry security settings

I’m trying to access a certain bit of the registry however it keeps returning null when i try to open it. However i know the location is correct because i can navigate to it in reedit. here’s my line of code for trying to access it. Microsoft.Win32.RegistryKey RK = Microsoft.Win32.Registry.LocalMachine.OpenSubK("Software\\Microsoft\\W...

Disable Registry Virtualisation for Visual Studio 2008 on Server 2008

I have a problem with a web service I'm trying to debug. There is a problem with the web service, but I don't seem to be able to get a handle on it, because when I run the same project in the Visual Studio Debugger, it can't find any relevant registry keys. They are just coming up null. When I tried listing all the available keys in HKLM...

RegOpenKeyEx returns 1

I can't catch this problem on my own comp, but "test users" keep informing about this. What is it? (HKEY_CURRENT_USER, handle is got by RegOpenCurrentUser) 1 = ERROR_INVALID_FUNCTION ...

Need Help with InstallShield

Hello friends, I'm using to Install Shield 2010 limited edition to create a installer of my application. I have never used it before. But now I need to create a installer and verify it by using Windows 7 client software logo toolkit. I have tested a .msi file using the toolkit and found some warnings. Among them 1 is Applications are ...

Registry problem - deleting key/values with C++

The following piece of code seems to unreliably execute and after and undeterministic time it will fail with error code 234 at the RegEnumValue function. I have not written this code, I am merely trying to debug it. I know there is an issue with doing RegEnumValue and then deleting keys in the while loop. I am trying to figure out f...

How does regedit.exe create empty binary values

I opened up regedit and made an empty binary value monitoring it using ProcessMonitor.exe. I set up a filter so that it included anything mentioning the registry path of the empty binary value's key and excluded everything else. When making a new binary value, it creates the unnamed one, then when I rename it to something else it deletes...

How Can I Get My File Association to Open Multiple Files in a Single Program Instance?

I have set up a file extension in the Registry for my program as Windows requires. In the Registry, under shell/open/command, I've got: "C:\MyProgramPath\MyProgram.exe" "%1" This works fine for me. When someone clicks on one or more files associated with my application, my application correctly opens the file(s) but each one is ope...

How do I get IDropTarget to work with my Drop Handler in Delphi?

I have associated a file extension with my Delphi 2009 program. I have been using the command line call method to pass the filename to my Delphi program so it can be opened. However, I found that when selecting multiple files, and clicking on them all at once, it opens each file in a separate instance of my program. I asked about this...

WIX - RegistrySearch returns a wrong Installlocation

Hi all, My WIX-installer shall check for a previously installed version of the software. If there is an older installation it shall be installed in the same path. I'm using RegistrySearch to perform this check. <Property Id="TARGETDIR"> <RegistrySearch Id="InstallLocation" Root="HKLM" Key="SOFTWARE\Microsoft\Windows\CurrentVersion\...

Convert REG_BINARY data to REG_TZI_FORMAT

I'm trying to pull time zone information out of the registry so I can perform a time conversion. The registry data type is REG_BINARY which holds information about a REG_TZI_FORMAT structure. The key is stored at: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows \CurrentVersion\Time Zones\(time_zone_name) How do I get the REG_BINARY infor...