356 questions
0
votes
1
answer
92
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 ...
-1
votes
2
answers
150
views
Convert ASCII string to integer for registry key (WmiMonitorID.UserFriendlyName)
im trying to get a powershell script to query display EDID info and put it into a reg key. when trying to add the key, it says its not found, but the reg key tree exists. it turns out that all the ...
0
votes
1
answer
123
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 ...
0
votes
0
answers
48
views
Classic ASP User Login in Windows 2003 server [duplicate]
I have a Classic ASP application running from Windows 2003 server which I am moving to Windows 2022 server. I have configured the application and the login page is loading. But post submitting it is ...
2
votes
2
answers
93
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
1
answer
673
views
How to edit NTUSER.DAT files it insert a new registry key for that user to prevent Microsoft Teams reinstallation?
I am creating a script to insert a registry key PreventInstallationFromMsi in HKEY_CURRENT_USER\SOFTWARE\Microsoft\Office\Teams. I am doing this because my environment doesn’t want teams to install on ...
1
vote
0
answers
149
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
186
views
Is there a good way using Powershell to filter from a multi-string value on a Windows 2019 Server?
I've been working on remediation of some known security issues on some servers. This is one of the first times I've attempted this in a registry, so please excuse the sloppiness of the attempt.
One of ...
0
votes
0
answers
511
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
0
answers
1k
views
Edit SQLmanager options script by user regedit script, to deploy that to all users?
I am trying to find out how one can enforce settings of the SQL Server Management Studio globally via the registry. We have a small query in place which should in theory do that, however it only does ...
1
vote
1
answer
386
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
0
answers
40
views
Hide registry entry from application
Is there a way to prevent an application from detecting a registry entry when it launches, but still make it visible to other applications?
The situation is, my company is migrating to M365 and we are ...
0
votes
1
answer
125
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 ...
1
vote
0
answers
1k
views
How to get the file link from a SharePoint/OneDrive Sync location
I am currently using Registry Editor to obtain the cloud OneDrive URL of a local OneDrive folder, through:
HKEY_CURRENT_USER\SOFTWARE\SyncEngines\Providers\OneDrive\ -> UrlNameSpace.
However, for ...
0
votes
1
answer
201
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("...
0
votes
1
answer
3k
views
How do I fix - A parameter cannot be found that matches parameter name 'RegSetting'
I am trying to detect the specific regkeys in the array ($WUSettingsArray) in the path specified with $WURegKey, then display the total $RegValue of both the key and path together. I keep getting the ...
-1
votes
1
answer
379
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
votes
1
answer
243
views
how do i run the script to modify registry changes, not sure if the script is not working or the command to call the file is incorrect
i am trying to create a package in Tanium to add registry key and values. below is the code that i am using and this is all saved as ms11-124.py
import winreg as rg
createnewkey = rg.CreateKeyEx(rg....
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 ...
1
vote
1
answer
583
views
Powershell - Accessing data within Properties from Get-ChildItems [duplicate]
I'm new to powershell and thought I'd start practicing.
I've created a new key in Registry Editor. Now, I'm trying to access this data from the Get-ChildItems commands.
I specifically want the Email ...
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
1
answer
266
views
How to run 2 .exe files using registry keys
The idea here is to make 2 .exe files run when I open only 1 of them.
I have 2 files:
F:\Gry\Riot Games\League of Legends\LeagueClient.exe
C:\Program Files (x86)\Overwolf\OverwolfLauncher.exe
When I ...
1
vote
0
answers
384
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 ...
-1
votes
1
answer
571
views
Return value from ProwerShell to Registry HKLM: Access Denied
Old Issue: I'm trying to write a script in cmd where PS script sets the system format date as current date.....
::::::::::Edit
New Issue:
I made a bit of advancement. Now that I've more on completely ...
0
votes
2
answers
442
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
167
views
How to import ZwDeleteKey in C#: "External component has thrown an exception"
I am trying to use ZwDeleteKey to delete a registry symbolic link.
I imported it like that:
[DllImport("NtosKrnl.exe", CharSet = CharSet.Ansi, EntryPoint = "ZwDeleteKey", ...
1
vote
1
answer
810
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 ...
0
votes
1
answer
220
views
How to initialize RegistryKey variable
I have a function (OpenSubKeySymLink) that receives this kind of variable: this RegistryKey key.
I don't know how to initialize it and pass it to the function.
public static RegistryKey ...
2
votes
1
answer
487
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
1
answer
461
views
How to delete registry symbolic link key from C#: "An error is preventing this key from being opened. Details: Access is denied"
I created a symbolic registry key by using the NtObjectManager library like that:
using NtApiDotNet;
using System;
namespace poc
{
class Program
{
const string SrcKey = @"...
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 ...
0
votes
0
answers
237
views
PowerShell Querying Registry and Looking at Null Permissions
I'm working with a local machine as an Administrator. After I remove a program with Windows or a 3rd party tool, there are always registry remnants. I want to query the HKCU and HKLM hives for any ...
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
800
views
OpenSubKey() 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"
...
0
votes
1
answer
191
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
1k
views
Custom URL Protocol for Chrome as workaround for file:
I want to create a workaround for the URL protocol file: in Chrome, as it's security doesn't allow you to open certain files or locations. This would be for a small app of mine that I designed.
I ...
0
votes
1
answer
890
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 ...
2
votes
0
answers
411
views
RegistryKey.OpenBaseKey or Registry.LocalMachine.OpenSubKey always return null in my VS2019 application
I am trying to validate the registry keys my WinForms app with VS2019(.Net 4.7.2).
I have tried all the solutions out there(but nothing worked) for the same issue such as,
(a). Setting the Application ...
0
votes
0
answers
585
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\...
-1
votes
1
answer
597
views
How to find registry folder by match in it`s value
I am writing a batch file to search the registry.
I need to find the folder inside HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Installer\Products which ProductName key equals to "MyProduct".
I need ...
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
1
answer
2k
views
Will GPO setting registry keys be reapplied on reboot?
Most GPO settings are either enforced/user can't change the setting/ or applied only one time /software install/. My question is - if I set a specific registry key using a GPO and the registry key is ...
0
votes
0
answers
152
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
0
answers
440
views
AWS detect file and registry changes on EC2
Are there any native AWS tools to detect key file changes and registry changes for EC2 (linux and widnows)?
0
votes
1
answer
165
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"
...
0
votes
0
answers
181
views
Issue with storing and retrieving registry key stored in HKLM
I store a credential in HKLM:/Software/test path and then consume it later for authorization.
I am facing an issue here where sometimes it returns the exact value that I have set, and sometimes it ...
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\"
$...
0
votes
1
answer
225
views
Added my program to startup, now can't access the files of my program
I added my program to the startup using RegistryKey like this :
private async void baslatKontrol_CheckedChanged(object sender, EventArgs e)
{
RegistryKey rk = Registry.CurrentUser....
1
vote
1
answer
453
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,...
0
votes
1
answer
178
views
How can i delete a SubKey in the Registry with a Bachslash(\) in the name?
I want to delete a SubKey named "TESTPC02\HANDWERK".
Every time I save this in a string and try to delete it, the debugger takes two Slashes (\).
I've also tried many different variations of ...