The MSDN documentation:
http://msdn.microsoft.com/en-us/library/ms724897(VS.85).aspx
Is strangely silent on what errors this function might return.
I'm particularly interested in what error code is returned if the key doesn't exist, but more comprehensive information would be nice too.
...
can you read an icon's location from windows xp registry and once it get identified then set it anywhere on desktop programmatically?
...
My default outlook settings in the Mail Format tab has everything (check boxes and the combo for format) disabled for the Message Format section.
Need some help on registry tweaks to enable them.
Alternatively, a vb script to directly set the registry for these settings will also do.
...
I have a C++ MFC app that stores all of its system wide configuration settings to the registry. Previously, we used .INI files, and changed over to using the registry some years back using
SetRegistryKey("MyCompanyName");
We now get regular support calls from users having difficulty migrating from PC and Windows version to another, ...
Hello everyone,
I'm having some problems of getting the following simple code to run correctly:
#include <process.h>
int main( void )
{
system("foo.reg"); //why does this NOT WORK?!
//system("reg import foo.reg"); //why does this NOT WORK?!
//system("regedit \"foo.reg\""); //why does this NOT WORK?!
return 0;
}
...
Hey guys,
Very simple question that I've been having trouble answering.
In Windows XP and Server 2003, I have occasionally come across a problem when trying to write to the event log.
"The source was not found, but some or all event logs could not be searched. Inaccessible logs: Security."
The solution to this that has worked in th...
I am writing an application that allows Syncing to USB storage devices and I would like to display the FriendlyName for the devices that can be found in the registry at HKLM\SYSTEM\CurrentControlSet\Enum\USBSTOR\
I am using GetLogicalDrives to get the list of available devices, GetDriveType to filter by DRIVE_REMOVABLE and GetVolumeInfo...
Hey, I am simply trying to merge a .reg file into my registry using a very basic c++ program.
The code is as follows:
#include <iostream>
#include <iomanip>
#include <string>
#include <fstream>
#include <stdlib.h>
#include <cstdlib>
#include <stdio.h>
#include <windows.h>
using namespace std;
int main()
{
string file = "regedit.e...
I'm trying to set a registry key in my C# code, but it doesn't work all the time. Sometimes it does work, sometimes it doesn't. I'm starting to get crazy...
In previous projects I had no problems writing and reading to the registry, but I do now.
Here's the code I'm using:
string newVersion = "10A";
RegistryKey key = null;
try
{
ke...
I've migrated an ASP.NET web application from Server 2003(x86) to a Windows 7(x64) machine. The web application cannot find registry values that were stored under:
SOFTWARE\SomeApplicationName\SubLocation\SubLocation2
being accesed through the Registry.LocalMachine.OpenSubKey api located in the Microsoft.Win32 namespace.
My question...
How is the simpler way to verify if the value is already created or create Windows registry values ?
...
I would like to know from Java code if the machine that I'm on is running active directory or that it has active directory installed (e.g. service may be stopped). Is there a reliable registry key to inspect? This is specifically for Windows 2008.
I found info on the web that mentions HKLM\SOFTWARE\Microsoft\MSDTC\Security\DomainControl...
I'm writing a script using SOTI Package Manager and I'm trying to find the particular key I can use to retrieve what the current Windows Mobile Regional Setting is for Language.
If it's French (Canada) I want to display post-install script messages in French, otherwise I want them in English.
I've got the ability to check a registry va...
From within a windows service I want to check some user preferences that are stored within each users' HKCU registry area. How can I do this?
I see that HKEY_USERS has subkeys of each user that has logged in to the machine (or something like that?), and within these are the HKCU areas for each user. However, these subkeys are the SIDs o...
When my software is installed, via an MSI, it creates some registry keys within HKLM. When people are using the software their individual preferences are saved to HKCU. When the software is uninstalled the HKLM and HKCU registry keys are deleted, but I'm thinking that it's only the HKCU keys for the user who is running the uninstall that...
I store serialized data in the registry. I want to use a foreach loop to iterate through that data. On each iteration I would like to add that data to a dictionary. As follows:
// Create dictionary
myDictionary = new Dictionary();
// iterate through previously stored data and add it to Dictionary
foreach (object x in Application.User...
Take the Winlogon registry section, I would like PowerShell to display the Data value for
DefaultUserName.
This is as far as I have got:
Stage 1
get-itemproperty -path "hklm:\Software\Microsoft\Windows NT\CurrentVersion\Winlogon\"
Stage 2
I can append:
-Name DefaultUserName
But this won't return a value.
Also other Names, despite...
How can I execute an external program like an exe file? I want to get a list of installed programs, and then execute them on selection. If you are wondering why I need this, I am updating a scheduler application to provide a feature so that users can open a program on notification. For example, the notification would say, "... starts in ...
I'm trying to create a key like this
_winreg.CreateKey(_winreg.HKEY_LOCAL_MACHINE, 'Software\\Microsoft\\Shared Tools\\MSCONFIG\\startupreg\\test\\')
and the key is beeing created here
HKLM\Software\Wow6432Node\Microsoft\Shared Tools\MSCONFIG\startupreg\test\
why?
Yes, Windows 7 64x here
...
My program is trying to create an key on the
HKLM\Software\Microsoft\Shared Tools\MSCONFIG\startupreg\test\
but instead the key is created on the
HKLM\Wow6432node\Software\Microsoft\Shared Tools\MSCONFIG\startupreg\test\
and don't work properly... Why? How can I solve it?
...