Questions tagged [registrykey]
355 questions
82
votes
9 answers
How do I get the value of a registry key and ONLY the value using powershell
Can anyone help me pull the value of a registry key and place it into a variable in PowerShell? So far I have used Get-ItemProperty and reg query and although both will pull the value, both also add extra text. I need just the string text from the…

Alan Anderson
- 823
- 1
- 6
- 6
21
votes
3 answers
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 what I know how to do:
Add an item to the…

jrinker
- 2,010
- 2
- 14
- 17
14
votes
1 answer
Programmatically turn on/off Action Center
Is there a way to programmatically turn on/off the Action Center? Additionally, I'd like to know if there is a way to programmatically turn on/off specific notifications? In manufacturing we use a base image of Windows 10 that has them turned off,…

sshoots
- 141
- 4
14
votes
8 answers
Launch IE 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 IE window.
Can anyone explain how to do this. I believe it is possible and may involve adding some settings in the…

topcat3
- 2,561
- 6
- 33
- 57
13
votes
4 answers
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 quotes but I also need quotes for it to be…

Trey
- 151
- 1
- 4
- 12
13
votes
2 answers
KEY_WOW64_32KEY and KEY_WOW64_64KEY
Apart from the MSDN reference, I want to know what these keys do? Does KEY_WOW64_32KEY means that a 32-bit app on x64 OS will access the WOW64 Registry Tree ? And does KEY_WOW64_64KEY means that a 32-bit app on x64 OS will access the normal Registry…
user1696837
12
votes
2 answers
How to ignore the certificate warning on remote desktop connection
I am trying to ignore the certificate warning on remote desktop connection - the one in the image:
So far I have found that when I check the "don't ask again" checkbox it is generating registry key over here:
HKCU:\Software\Microsoft\Terminal…

Stoimen
- 649
- 2
- 8
- 20
11
votes
7 answers
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 value. The problem I'm getting is that when…

Middas
- 1,862
- 1
- 29
- 44
10
votes
3 answers
Read and write from/to registry in VBA
I saw this line in C# and I am trying to adapt it to VBA:
Microsoft.Win32.Registry.SetValue(@"HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\USBSTOR", "Start", 4,Microsoft.Win32.RegistryValueKind.DWord);
I'm quite lost here with some…

TCN
- 1,571
- 1
- 26
- 46
10
votes
3 answers
Retrieve (Default) Value in Registry key
How can I get the (Default) registry value?
For this key: HKCR\http\shell\open\command\ the values are below.
I was using:
Get-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\Shell\Associations\UrlAssociations\http\UserChoice\" |%…

Imsa
- 1,105
- 2
- 17
- 39
9
votes
1 answer
Why does the RegQueryValueEx() function return ERROR_FILE_NOT_FOUND while trying to read from a registry key?
System: Windows 7 32bit
Language: C++
I have tried to access register HKEY_LOCAL_MACHINE\\HARDWARE\\DEVICEMAP\\Scsi\\Scsi Port 0, key Driver (type REG_SZ) -- no problem.
The same for reading from…

killdaclick
- 713
- 1
- 10
- 19
8
votes
2 answers
Reading Excel InterMixed DataType Without Modifying Registry Key
I am trying to use C# to read excel file which has intermixed datatype. Below is my connection string
var path = //xls location
var MyConnection = new OleDbConnection("provider=Microsoft.Jet.OLEDB.4.0; Data Source='" + path + "';Extended…

rofans91
- 2,970
- 11
- 45
- 60
8
votes
1 answer
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 works as expected and outputs three…

Demodave
- 6,242
- 6
- 43
- 58
7
votes
1 answer
FORWARD_NULL after derefencing null?
I have this line of code:
this.Path = pathLookUpLocation.GetValue(RegLookupKey, null).ToString();
When I run static analysis tool (Coverity) on my code I get a FORWARD_NULL here, saying that I am dereferencing null here. I am having trouble…

DukeOfMarmalade
- 2,680
- 10
- 41
- 70
7
votes
3 answers
I added a registry key, but I cannot find it programmatically
So I used RegEdit to add the following to the registry on my workstation:
HKLM\Software\Foo\Bar
Bar has a k/v pair of "wtf"/"idk". I verified that these changes "took" by closing regedit and re-opening it. Hey, they're still there! …

peacedog
- 1,415
- 20
- 32