registry

Rewrite Registry File in Windows

孤街醉人 提交于 2019-12-30 10:05:20
问题 I have been trying to find a way to "defragment" the registry on my Windows machine. Firstly, does this make sense? Any benefits in doing this? (Not much love on superuser.com) Secondly, I am looking for a way to rewrite the registry using C/C++ with Windows API. Is there a way to read the registry and write it to a new file getting rid of unused bytes along the way? (I might have to write the new file and then boot into another OS/disk before I can overwrite the original... but I am willing

What's wrong with Registry.GetValue?

回眸只為那壹抹淺笑 提交于 2019-12-30 08:22:11
问题 I trying to get a registry value: var value = Registry.GetValue(@"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Cryptography", "MachineGuid", 0); In Windows XP all ok, but in Windows 7 returns 0. In HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Cryptography using regedit I see MachineGuid , but if I run var keys = Registry.LocalMachine.OpenSubKey("SOFTWARE").OpenSubKey("Microsoft").OpenSubKey("Cryptography", RegistryKeyPermissionCheck.ReadSubTree).GetValueNames(); keys.Length is 0. What do I do wrong? With

Where is a reliable registry key to find install location of Excel 2007?

混江龙づ霸主 提交于 2019-12-30 07:27:32
问题 Where is a reliable registry key to find install location of Excel 2007? 回答1: How about: [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\X.0\Common\InstallRoot] which contains a key named 'Path' with the installation directory of that version of Office. This is consistent for Excel 8.0 through 12.0. If you want to look for a specific product, use Excel, Word, Access, etc., in place of Common. Jon ------- Jon Peltier, Microsoft Excel MVP From: http://www.developersdex.com/vb/message.asp?p=2677&r

WiX will not add HKLM registry setting during Windows 7 install

走远了吗. 提交于 2019-12-30 00:15:10
问题 I have written a WiX installer that works perfectly with Windows XP, but when installing to a Windows 7 box I am running into difficulty with registry entries. I need to add an HKLM entry as well as the registry entry for the program to show in the start menu. Here is the code I am using for both types of entry: <!-- Create the registry entries for the program --> <DirectoryRef Id="TARGETDIR"> <Component Id="RegistryEntriesInst" Guid="..."> <RegistryKey Root="HKLM" Key="Software\$(var

Check if SQL Server Client Is Installed

血红的双手。 提交于 2019-12-29 06:43:06
问题 How can one check to see if the SQL Server Client driver is installed? And is it also possible to determine the version? 回答1: Go to->Run->cmd->type regedit.exe and you see the registry under the ODBC folder: HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI\ ODBC Drivers\SQL Server I also find a complete answer about this issue, (based on MySQL, but basically is the same thing). Edit later: according to your comment you have installed the 2005 version of SQL Server: HKEY_LOCAL_MACHINE\SOFTWARE

“Object Library invalid or contains references…” in Excel VBA with DatePicker

前提是你 提交于 2019-12-29 06:32:32
问题 I have been working on a Excel workbook with lots of VBA code for a while and now I have send this file to some colleagues for testing and it does NOT work in their computer. We all work in the same company and have Windows XP SP2 with Office 2003. The workbook has a form that opens when clicking over a shape and it contains some controls. When they click over the shape for the form to show the following error appears: "Object Library invalid or contains references to object defintions that

“Object Library invalid or contains references…” in Excel VBA with DatePicker

和自甴很熟 提交于 2019-12-29 06:32:23
问题 I have been working on a Excel workbook with lots of VBA code for a while and now I have send this file to some colleagues for testing and it does NOT work in their computer. We all work in the same company and have Windows XP SP2 with Office 2003. The workbook has a form that opens when clicking over a shape and it contains some controls. When they click over the shape for the form to show the following error appears: "Object Library invalid or contains references to object defintions that

Setting Registry key write permissions using .NET

不想你离开。 提交于 2019-12-29 05:10:07
问题 I'm trying to grant Write access to my application's registry settings to everyone or all users of a machine during the install process. My application does not have the appropriate permissions directly after install without requiring an administrator to grant them even though the keys and values exists, they cannot be updated? I've the snippet below, but the installer is failing due to Unauthorized access / access denied. I think I'm on the right track... How can I resolve the permissions

GetProcAddress returning NULL for RegDeleteKeyEx

别来无恙 提交于 2019-12-29 01:51:12
问题 I am trying to implement recursive deletion of Registry Keys for both 32-bit and 64-bit OS. As RegDeleteKeyEx is not defined for OSes lesser than XP x64 Professional, I am trying to use the function indirectly. Problem :: Even on x64, the GetProcAddress() is returning NULL. //Global Declarations typedef LONG (WINAPI * PFN_RegDeleteKeyEx)(HKEY hKey , LPCTSTR lpSubKey , REGSAM samDesired , DWORD Reserved ); PFN_RegDeleteKeyEx _RegDeleteKeyEx ; //The code inside function hAdvAPI32 = LoadLibrary

c++ get registry key returns only one char

南笙酒味 提交于 2019-12-29 01:43:26
问题 I'm trying to retrieve a value of a key but i'm only getting the first char of the value.. can anyone help? my code: void dealWithRegistry() { HKEY regkey1; char data[100]; DWORD datasize = sizeof (data) / sizeof (char); LONG rc = RegOpenKeyEx(HKEY_LOCAL_MACHINE, L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run", 0, KEY_READ, &regkey1); if (rc != ERROR_SUCCESS) { cout << "there was a problem openning" << endl; } else { rc = RegGetValue (regkey1, NULL, L"AppData", RRF_RT_REG_SZ, NULL, (void