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 ...
-1
votes
2
answers
141
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 ...
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
1
answer
657
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 ...
2
votes
3
answers
11k
views
Powershell script to report account lockout policy settings?
I have a few computers outside the network, not allowed to have the PS AD module installed.
All I want to do is use Powershell to report some of the account lockout settings, specifically the lockout ...
22
votes
4
answers
40k
views
Adding "Open Anaconda Prompt here" to context menu (Windows)
I'd like to add an option on my context menu (Windows 7 and 10) to open an Anaconda Prompt into the file location when I right-click the folder, but I can't figure out the right registry key.
Here's ...
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 ...
14
votes
8
answers
60k
views
Launch Internet Explorer from a link in Chrome
I want to have a link in Chrome, e.g.,
Open Link
that when you click on it in the Chrome browser that it launches the link in an Internet Explorer (IE) window.
How can I do this? I believe it is ...
4
votes
1
answer
12k
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 ...
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
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 ...
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
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
569
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 ...
-1
votes
1
answer
233
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
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 ...
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 ...
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 ...
0
votes
1
answer
797
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"
...
5
votes
2
answers
10k
views
How to access registry key in a UWP app?
I would like to access windows10 registry key by a UWP app.
key as: \HKEY_LOCAL_MACHINE\SOFTWARE\MyCompanyName\MyName
I can not find any function call to accomplish it.
Please indicate me How to do it?...
3
votes
2
answers
3k
views
Python script to import registry key
I have a registry key that contains information for a program that I am running. I have registry key exported to a directory and I can easily import using the regedit Import function. I am having ...
15
votes
4
answers
49k
views
Adding a registry key in windows with quotes needed in the data using a batch script
Little Willis here. I am trying to using a batch script to edit an existing registry key that is used when double clicking a .jar file. The issue is that the data that I'm trying to enter contains ...
11
votes
7
answers
22k
views
C# Registry SetValue throws UnauthorizedAccessException
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 ...
11
votes
1
answer
49k
views
How to get Data from a registry key value via command line
I am trying to get the Data from a registry key value via command line
I can retrieve the value of a registry key using the following code
reg query HKCU\Software\[PATH_TO_MY_DIR] /v [KEY_NAME]
This ...