356 questions
0
votes
1
answer
82
views
Is it safe to store a product serial number under the Uninstall registry key where WiX stores bundle metadata?
I’m seeking clarification about storing custom data—specifically a product serial number—under the Windows Uninstall registry key created by WiX Toolset.
When we install a WiX-based bundle or MSI, it ...
0
votes
1
answer
107
views
How do I create a new registry key and add values in PowerShell
I am trying to create a registry key "ABCProxy" for an application say "Pricer"
Then I want add parameters and values to the key Enable x3 and RetryAttempts x5.
Is this the correct ...
2
votes
2
answers
82
views
I am able to access Registry base key object even after I disposed the object. Is this expected?
I'm trying to fetch some values from registry key. After getting the value, I observed that the subkey was getting disposed after calling key.Close(). But the base key was still available after ...
1
vote
0
answers
145
views
Powershell to change Registry Key
I have take ownership previously using this
$key = 'HKLM:\SOFTWARE\MyKEY'
$acct = New-Object System.Security.Principal.NTAccount("Administrators")
$acl = Get-ACL $key
$acl.SetOwner($acct)
...
0
votes
0
answers
496
views
Intune vs Registry key and spaces in path
I am trying to run script that would return me work or school account connected to the device. The script should be distributed over Intune. Everything elser works except this part.
The code works in ...
1
vote
1
answer
377
views
Registry modifications not taking effect when executing PowerShell script with admin rights
PowerShell script with admin rights doesn't modify registry entries when executed through Start-Process
I have a PowerShell script that modifies registry entries related to autologin settings. When I ...
0
votes
1
answer
120
views
How can I identify different Window's Editions in Windows 11 without using the ProductName registry value?
I've been working on detecting Windows 11 machines, which I have successfully done by looking at the CurrentBuild registry value for anything above the build 22000+. However, when it comes to ...
0
votes
1
answer
198
views
Why is the Registry Key showing null in C# even if it is present in Registry Editor?
Here is my c# code:
using (RegistryKey key = Registry.LocalMachine.OpenSubKey(@"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Multimedia\SystemProfile", true))
{
key.CreateSubKey("...
-1
votes
1
answer
369
views
Why does RegOpenKeyEx return "0" value?
I use CodeBlocks version 20.03 (x86) as IDE.
Here are my codes:
#include "iostream"
#include "windows.h"
using namespace std;
int main()
{
HKEY hkRegedit;
long ...
1
vote
1
answer
2k
views
Locate Registry Key and delete value
I am trying to delete a binary value within my registry with this code the code prompts an error stating the value at DefaultConnectionSettings does exist but it's able to find the SID path, but not ...
0
votes
2
answers
3k
views
How do you enable excel add-ins for all users using registry (HKLM)?
I'm trying to enable an excel add-in for all users in a given lab (Office 2019 is installed). The path to the add-in's "OPEN" string in the registry is HKEY_CURRENT_USER\SOFTWARE\Microsoft\...
1
vote
0
answers
377
views
Difference between NoAutoUpdate key and NoWindowsUpdate Registry keys to disable updates
What is the difference between two registry keys NoWindowsUpdate and NoAutoUpdate? Is there a difference in location also?
I don't want the windows update to not get downloaded also but when I used ...
0
votes
2
answers
440
views
SQlite loads database from the wrong folder in c# on windows startup
I get this error when app starts on windows startup but the app runs perfect when i open it while the windows is running .
SQLite error (14): cannot open file at line 47640 of [b0c4230c89]
Exception ...
1
vote
1
answer
803
views
How to delete registry key by using RegistryKey object as handle
I have a function (credit to @Charlieface) that opens a registry symlink and returns a RegistryKey handle:
public static RegistryKey OpenSubKeySymLink(this RegistryKey key, string name, RegistryRights ...
2
votes
1
answer
475
views
How to use REG_OPTION_OPEN_LINK in C# Registry class
I want to open a registry key that is a symbolic link.
According to Microsoft I need to use REG_OPTION_OPEN_LINK to open it.
I searched for an option to add it to the OpenSubKey function but I didn't ...
1
vote
2
answers
13k
views
Check for registry key value using powershell script
I need help to create a PowerShell script that will check for registry key only (not value) and will add registry key in case of absence of Registry key in the computer.
I've been able to add the tag ...
1
vote
2
answers
4k
views
How to disable a Windows registry key without deleting it
I wanted to disable an item in Windows context menus so I found the key relating to it. Deleting this key may solve my problem but is there any other way than deleting it would do the work? Perhaps ...
0
votes
1
answer
190
views
Can't set cbData in RegSetValue
I am trying to create a registry key with type REG_SZ and with a value longer than 4 chars.
But I can't figure out the right way to pass the data as argument :
#include <windows.h>
#include <...
0
votes
1
answer
886
views
How to add entry in the registry without knowing the username?
In Windows I need to create a .reg that modifies the value of a string in the registry. Example:
BEFORE
(Value information)
C:\Users\dave\AppData\Local\myprogram\assets\asset1.png
AFTER
(Value ...
0
votes
0
answers
584
views
Why OpenSubKey() method returns null when I try to access to a registry key in Powershell?
I'm trying to make a script that returns the default printer of a list of remote pc, by reading the registry key Device under the path Computer\HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows NT\...
0
votes
1
answer
1k
views
search an uninstall from registry key C#
I want to uninstall some app programmatically. I'm searching in this path in win registry:
\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\
the code for searching and ...
0
votes
0
answers
147
views
The error occurs when I'm trying to create ADO.NET Entity Data Mods:el. The error say
The preinstalled packages have a reference to a missing Registry value. Could not find a Registry key with name 'EntityFrameworkVisualStudio16Tools' under 'SOFTWARE\NuGet\Repositoty'.
0
votes
1
answer
159
views
What is the syntax of a Registry key's "Absolute Path"?
Using Microsoft.Win32.RegistryKey C# functions which require a registry path, like OpenSubKey(), using a path like
@"SYSTEM\CurrentControlSet\Control\Terminal
Server\WinStations\RDP-Tcp"
...
2
votes
1
answer
2k
views
Change value in registry on multiple servers using credentials
Looking to enable reg key on multiple remote machines.
Attempt 1:
$Servers = Get-Content "C:\PowerShell\TestServers.txt"
$Path = "HKLM:\SYSTEM\CurrentControlSet\Services\"
$...
1
vote
1
answer
450
views
WPF application doesn't work with its own registry key
I'm trying to add the classic "Send with MyApp" in the ContextMenu.
The fact is that my program modifies the windows registry, but it seems that it can't see the update version of it. Indeed,...