registry

C# Registry SetValue throws UnauthorizedAccessException

折月煮酒 提交于 2019-12-19 17:40:09
问题 Before you try to answer this with, "Do a quick Google search." I'd like to point out that I have already. Here is the situation, I have the following method that attempts to modify a registry key value. The problem I'm getting is that when executed, it throws an UnauthorizedAccessException even though I've opened the key as writeable . I'm running Visual Studio as administrator and even tried to make a small .exe with a manifest file forcing it to run as admin that will execute the code with

Loop through values or registry key.. _winreg Python

▼魔方 西西 提交于 2019-12-19 15:06:07
问题 How would I loop through all the values of a Windows Registry Key using the Python module _winreg. I have code that will do what I want, but it is for the subkeys of the specified registry key. Here Is The Code: from _winreg import * t = OpenKey(HKEY_CURRENT_USER, r"PATH TO KEY", 0, KEY_ALL_ACCESS) try: i = 0 while True: subkey = EnumValue(t, i) print subkey i += 1 except WindowsError: # WindowsError: [Errno 259] No more data is available pass Oh, figured it out. But, if anyone knows of

How to get path of installation of target game/application from registry when installing mod/plugin using Inno Setup?

廉价感情. 提交于 2019-12-19 10:57:25
问题 I would like to create installer for mod of the game. And I need to detect where is installed the game. I know where is path of the game in registry. But the game can be in another launchers - Steam, GOG. How to detect in order? For example: If I have steam version need to detect path of installation from registry for steam If I have GOG version need to detect path of installation from registry for GOG If I have both versions (Steam and GOG) then default path of installation will be for steam

Writing 32/64-bit specific registry key at the end of the installation in Inno Setup

吃可爱长大的小学妹 提交于 2019-12-19 10:29:55
问题 I want to create an installer with Inno Setup, my first time using this tool. What I’m trying to do is wrapping an existing installer of an existing software with a more detailed self-made installer (meaning a Setup.exe inside a Setup.exe). What works for me after researching so far is asking the installer (Inno Setup *.exe) to run the included installer (actual software setup). Why do I need another installer wrapped around? Because I want to give it some extra functions. On particular thing

How do I check if wscript/cscript runs on x64 host OS?

自古美人都是妖i 提交于 2019-12-19 07:38:11
问题 I'm running a VBScript that may run under x64 Windows. I need to read a registry key from the 32-bit part of the registry. For that I use path HKLM\Software\Wow6432Node\xyz instead of HKLM\Software\xyz . How can I check if the script is executed under x64? 回答1: I'm not sure you need to check if the script is executing under x64. Try to read from HKLM\Software\Wow6432Node\xyz , if that fails, try to read from HKLM\Software\xyz , if that fails, your registry key doesn't exist, take whatever

Access CurrentUser Registry Key for Impersonated User - Compatibility with .NET 3.5

对着背影说爱祢 提交于 2019-12-19 04:12:47
问题 I've recently written an application that impersonate user account, get a handle to CURRENT_USER registry key (using PInvoke "LoadUserProfile" to retrieve ProfileInfo.hProfile object) and create registry key using RegistryKey.FromHandle. Reference code: using (WindowsImpersonationContext impersonatedUser = WindowsIdentity.Impersonate(hToken)) { using (SafeRegistryHandle safeHandle = new SafeRegistryHandle(hProfile, true)) { using (RegistryKey impersonatedUserHkcu = RegistryKey.FromHandle

ShellIconOverlayIdentifiers and windows10

青春壹個敷衍的年華 提交于 2019-12-19 02:37:14
问题 Icon overlays are becoming an annoying problem for me. On windows10 it seems like you can have 11 (or is it 10?) overlay icons set, others are ignored. This is very low number that is easily used even by one service. So windows just takes first N settings as by alphabetical order which started the following petty trend. This is my registry: As you can see, companies started adding spaces to get to the front of the order. In recent update dropbox added third space already! Question: 1) Is

How to determine if the 32-bit Visual Studio 2013 redistributable is installed on a user's machine reliably via the Registry?

故事扮演 提交于 2019-12-18 21:19:38
问题 I am using DeployMaster to build an installer for a 32-bit Windows application written in C++ using Qt. The executable depends on the Visual Studio 2013 redistributable - i.e., the 32-bit Visual Studio 2013 redistributable must be installed by the end user, prior to running this application. I have googled, and looked at other StackOverflow questions. In particular, this link provides the exact Registry key to check, but for the case of VS 2008. I need VS 2013, not VS 2008. However, ideally

Batch File: If registry key's data is equal to

社会主义新天地 提交于 2019-12-18 17:37:14
问题 I'm trying to make a .bat toggler for certain Explorer settings. To do this I need the batch file to query the Registry key's data and then set the key accordingly. For example, in ActionScript 3 or JavaScript it would be something along the lines of this: if (HideFileExt == "00000000"){ HideFileExt = 00000001; else { HideFileExt = 00000000; } This way, every time it runs it will set the key's data to be the opposite of what it currently is - a toggler. I have Google-d this extensively and

C++ program needs an file association

徘徊边缘 提交于 2019-12-18 17:33:09
问题 I'm distributing a freeware product that reads and writes text files with a unique extension. I hoped that double-clicking such a file would automatically start the app. While developing on Windows 7 Professional, I set up an association to open my files upon double-click, by right-clicking the file->Open With...->Choose Default Program...->Browse... followed by "Always use the selected program to open this type of file." Good. It did just what it needed to. I was going to ship my program