registry

What is an effective way to grant permissions to a registry key using an NSIS installer?

烂漫一生 提交于 2020-01-02 06:17:56
问题 I am attempting to use the AccessControl plugin in NSIS to set the permissions on a registry key. It is not working. After the installer runs, the All Users group does not have Full Control. I've created a sample below. Is there anything wrong here? Is there another mechanism to accomplish the same thing? I've also attempted to use the numeric form of the Everyone group S-1-1-0 I have not tried using "Everyone" yet. ; Create the key for local machine settings (could be a 32 bit or 64 bit

What is an effective way to grant permissions to a registry key using an NSIS installer?

与世无争的帅哥 提交于 2020-01-02 06:17:25
问题 I am attempting to use the AccessControl plugin in NSIS to set the permissions on a registry key. It is not working. After the installer runs, the All Users group does not have Full Control. I've created a sample below. Is there anything wrong here? Is there another mechanism to accomplish the same thing? I've also attempted to use the numeric form of the Everyone group S-1-1-0 I have not tried using "Everyone" yet. ; Create the key for local machine settings (could be a 32 bit or 64 bit

App is unable to write to the registry, even though the user has administrative privileges

拜拜、爱过 提交于 2020-01-02 04:39:10
问题 I am using Visual Studio 2010, and I'm writing a program that needs to set (and read) new registry values under HKLM\Software\myapp The program is .NET 2.0-based and as for now it runs on Windows 7 64-bit. Here is my ocde: RegistryKey softwareKey = Registry.LocalMachine.OpenSubKey("Software", true); RegistryKey MyKey = softwareKey.CreateSubKey("MyApp"); RegistryKey = MyKey.CreateSubKey("MyKey"); selfPlacingWindowKey.SetValue("instaldateperson", datestr + usrname); The problem I have when

ATL COM class registration .rgs file defaults

旧巷老猫 提交于 2020-01-02 03:11:07
问题 I'm creating a COM server executable, and have run into a problem with class registration. When I created my class object, the automatically generated .rgs file looked like this: HKCR { NoRemove CLSID { ForceRemove {4C6DAD45-64B4-4C55-81C6-4CE125226421} = s 'Test Class' { ForceRemove Programmable LocalServer32 = s '%MODULE%' { val ServerExecutable = s '%MODULE_RAW%' } TypeLib = s '{EAA173CA-BDBC-463A-8B7A-B010EFA467BC}' Version = s '1.0' } } } This created the registry entries correctly for

ATL COM class registration .rgs file defaults

落花浮王杯 提交于 2020-01-02 03:11:01
问题 I'm creating a COM server executable, and have run into a problem with class registration. When I created my class object, the automatically generated .rgs file looked like this: HKCR { NoRemove CLSID { ForceRemove {4C6DAD45-64B4-4C55-81C6-4CE125226421} = s 'Test Class' { ForceRemove Programmable LocalServer32 = s '%MODULE%' { val ServerExecutable = s '%MODULE_RAW%' } TypeLib = s '{EAA173CA-BDBC-463A-8B7A-B010EFA467BC}' Version = s '1.0' } } } This created the registry entries correctly for

How to store variables/preferences in Python for later use

混江龙づ霸主 提交于 2020-01-02 02:00:29
问题 I'm working on a program in Python for Windows, and would like to save variables and user preferences so that I can recall them even after the program has been terminated and restarted. Is there an ideal way to do this on Windows machines? Would _winreg and the Windows registry be suited for this task? Or do I need to create some sort of database of my own? 回答1: You're usually going to want to store it in a configuration folder in the "home" folder. That's easy on *nix systems, more difficult

Registry pattern and lazy instantiation of registered objects

故事扮演 提交于 2020-01-01 12:37:07
问题 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) { return ($this->objects[$key]) ? $this->objects[$key] : null; } protected function _set($key, $val) { $this->objects[$key] = $val; } public static function get($key) { return self::getInstance()->

Writing 32/64-bit specific registry key in Inno Setup

北战南征 提交于 2020-01-01 11:49:35
问题 I want when I install program, the setup will create the registry in: SOFTWARE\Wow6432Node\Publisher\App with {app} main location on 64-bit systems. And I want do same for 32bit in "32 bit" location but i don't know where it is. The setup will check version of Windows and create registry depending on the system. 回答1: You want to write to: on 64-bit systems: SOFTWARE\Wow6432Node on 32-bit systems: SOFTWARE For that, you do not need to do anything special. Windows registry redirector handles

Read GUID value stored in registry

时光总嘲笑我的痴心妄想 提交于 2020-01-01 11:34:07
问题 I try to read a GUID value stored as a binary value in registry in Delphi. When I read it with BintoHex, but the result is in reverse order. It seems that I have to swap bytes but I thought BinToHex would do it. I refered to this thread but I can't find the right solution : how to convert byte array to its hex representation in Delphi It seems that it is due to little Eendian. Below, you can see the GUID stored in registry Here is my code : var s : string; buffer : pointer; ... begin getmem

Cannot Write to the Registry under HKEY_LOCAL_MACHINE\Software

雨燕双飞 提交于 2020-01-01 09:33:08
问题 I'm writing an application that needs to create a special user account hidden from login screens and the Control Panel users applet. By writing a DWORD value of 0 with the user name to the registry key below, I'm able to accomplish this goal: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\SpecialAccounts\UserList The problem is that under Windows 7 with UAC on, no matter what I try, I cannot programmatically write a value to the key above. It is my understanding that