Questions tagged [registrykey]
The registrykey tag has no usage guidance.
354
questions
0
votes
0
answers
12
views
Procedurally solve winreg access denied error
I want to create a new key with a script, but no matter what I do, I get windows error 5 (access denied)
I know people have solved this error by manually adding permissions inside regedit, but I would ...
1
vote
1
answer
66
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
23
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
40
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
282
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
112
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
2k
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
118
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
65
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
491
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
128
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
1
answer
480
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
132
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
237
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
396
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
336
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
101
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
365
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
136
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
294
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
289
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
8k
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
169
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 ...
0
votes
2
answers
1k
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
538
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
134
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
546
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
506
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 ...
1
vote
0
answers
275
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
288
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
291
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
807
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
912
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
143
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
252
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
0
answers
69
views
Why isn't my Batch file opening when windows start?
The batch I created is intended to start a Python file, and for reasons of dependency with Python and Geckodriver, I have no way to work with the Batch file directly in the Startup folder, for this ...
0
votes
1
answer
120
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
124
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
1k
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
158
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
260
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
104
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 ...
0
votes
2
answers
497
views
Outlook ignoring HKEY_LOCAL_MACHINE entry for add-in on startup
I have a C# Add-In for Outlook 2013 64 bit on Win10 64 bit developed using VS 2017 and .Net 4.6.
I have the required registry entries under
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\Outlook\Addins\...
0
votes
1
answer
219
views
RegistryKey in c#
can somebody help me convert this code to an another c# code ?:
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\csgo....
0
votes
1
answer
69
views
Get Uninstall Command For a Certain Program in C#
so I am working on this code that returns an uninstall command string to uninstall a certain program.
I have seen this code in other questions, but no one seems to have the same problem as me.
This is ...
0
votes
0
answers
220
views
Validate both the registry key value, and if the key exists
I made this batch script to validate multiple reg keys listed inside a .txt file, and within in multiple SID's.
ECHO on
cd %~dp0
if not exist "REPORTS" mkdir REPORTS
echo.
setlocal ...
0
votes
0
answers
224
views
Why is My.Computer.Registry.LocalMachine.OpenSubKey suddenly returning null when Microsoft.Win32.Registry.LocalMachine.OpenSubKey works as expected?
I have some old code written in VB.NET that uses My.Computer.Registry.LocalMachine.OpenSubKey to open a registry key under "HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\", but it's returning null (Nothing) ...
0
votes
2
answers
1k
views
disable auto windows update for windows server 2016 using powershell to change registry key
I am trying to disable windows auto update by changing the registry key value for a VM. I have modified the 'NoAutoUpdate' key to 1 using below statement.
set-ItemProperty -Path HKLM:\SOFTWARE\...
4
votes
1
answer
9k
views
Registry Key Exist True of False Output
I have what I would consider a simple power shell script that I am trying to run. The script will basically check for the existence of the RegKey and return a value with an output of 0 or 1.
The ...
-1
votes
1
answer
310
views
Registry.LocalMachine.CreateSubKey: Parameter Invalid
Is it possible to create directly under HKEY_LOCAL_MACHINE aside from HARDWARE, SAM, SECURITY, SOFTWARE, etc.. using C#? I've tried the following code, but I'm getting an error:
RegistryKey key = ...