All Questions
Tagged with powershell windows-registry
111
questions
1
vote
1
answer
1k
views
How to set default app per filetype programmatically?
I want to get independent of installed apps and share most of my apps as portable versions in a cloud drive. So my idea is whenever I sit on a new device I just sync my cloud drive and start some kind ...
1
vote
2
answers
295
views
How to run a poweshell script from the context menu (on audio file)?
I did try this test.reg
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\SystemFileAssociations\audio\shell\ChunkAudio]@="chunk audio (5 min)""Icon"="%SystemRoot%\\System32\\...
1
vote
2
answers
15k
views
How to replace the Desktop background image with a solid color, using PowerShell and registry?
I would like to replace the default Desktop background image with a darker solid color, on an unregistered Windows 10 Pro (Insider Preview) edition. I am testing various terminal coloring schemes, and ...
0
votes
1
answer
7k
views
Exporting keys in .reg file using Powershell
I need to change several key values in Windows 7 registry, to add a parameter to a command launching VLC.
Fortunately all keys are children of keys starting with VLC.:
The command for Open and ...
0
votes
1
answer
421
views
Is it possible to shut off the microphone and camera via regedit?
I'm attempting to shut down the microphone and camera on Windows 10. I'm trying to automate this process after loading the OS. I attempt to use Disable-PnpDevice in powershell but that does nothing. ...
1
vote
1
answer
1k
views
PowerShell Script Context Menu Entry to Run Script as Administrator Without Exiting
I'm really close on this one. Basically, I want to create a context menu entry for .ps1 files that run the script as administrator without exiting the console window after running. So I can create ...
2
votes
1
answer
998
views
Check if registry contains data from .reg file
I have .reg file which was exported on another PC and contains some keys, values and data from different parts of registry.
How to check if this keys, values and data are already present on my PC ?
...
1
vote
1
answer
2k
views
How do I modify an Expandable String Value in the registry with PowerShell or a batch file?
I would like to use a PowerShell or batch script to modify an existing expandable string value to another. Specifically, I want to change the default value at
HKEY_CLASSES_ROOT\...
3
votes
2
answers
18k
views
Script to add Regkey Exception to Windows Defender
If I want some kind of script to add an exclusion to Windows file defender, I can do something along these lines by saving the following text as a .bat file and running it:
powershell -inputformat ...
0
votes
1
answer
5k
views
How to export a registry key to a CSV?
I'm currently looking to find out all SolidWorks license information on the network.
I need help writing a script for PowerShell to look at a list of hosts that are on a CSV/TXT file then execute the ...
7
votes
1
answer
7k
views
Issue with my roaming profile powershell producing - Attempting to perform the InitializeDefaultDrives operation on the 'FileSystem' provider failed
This is really annoying error - Attempting to perform the InitializeDefaultDrives operation on the 'FileSystem' provider failed., which I get every time I start powershell when outside company's ...
30
votes
3
answers
57k
views
Why use "Cmd /c Powershell" instead of just "Powershell"?
I've added my first context menu using the registry as per instructions given in this question (yay me).
I originally used this as the command that it executes, i.e. the value of the "command" key:
...
0
votes
0
answers
1k
views
Debugging a run-once registry command
I'm having trouble getting my runonce command to actually run on login after I promote my server to AD. I've gotten my autologin to work just fine but my registry command won't run on reboot, code ...
0
votes
0
answers
1k
views
How does the runonce registry key run commands?
Out of curiosity, and to assist in testing the run-once key, I was wondering what program runs the string placed in runonce or just the run keys in general.
Is it powershell or cmd.exe or what? I'd ...
0
votes
1
answer
2k
views
My commands in runonce are not running
I'm writing a script that is intended to automate the process of promoting a new domain controller where no domain previously existed.
I've been consistently caught up on how to get the program to ...
24
votes
4
answers
21k
views
Configure Windows Creators Update Night Light via Registry
How can the new Night Light feature in Windows 10 (Pro) Creators Update be configured via the registry?
I'd like to auto configure new/updated installations when using my configuration management ...
1
vote
0
answers
113
views
How do I update my my accessibility registry without needing a reboot?
I am currently modifying some values in the Mousekeys registry under HKCU:\Control Panel\Accessibility using PowerShell.
How can I have my changes take effect without a necessary reboot?
If I go ...
3
votes
5
answers
31k
views
using REG ADD in PowerShell to add registry key with double quotes
I am trying to add registry keys to Windows 10 using a PowerShell script. The key in the registry must have double quotes included in the data field so I understand I must escape the double quote with ...
2
votes
7
answers
67k
views
How to detect Microsoft Office version name?
Programmatically, what method can get the name of the installed Microsoft Office version? I have tried every Powershell command, VBScript, and WMI query I could find. I have pored through the registry ...
0
votes
1
answer
107
views
portable exe to modify certain user registry entries on public computers
Apologies if this is in the wrong forum, but stackexchange is overboard on that issue so...again, apologies.
I log on to public Windows computers all the time. These computers do not allow admin ...
4
votes
1
answer
3k
views
Is it safe to call Regsvr32 concurrently?
I have about 100 dll's I need to register with regsvr32 /s some.dll, do I need to wait for each call to regsvr32 to finish before I do the next call or can I just run them all at the same time.
...
9
votes
3
answers
79k
views
How do I read values of registry keys?
Does anyone know how to read out registry key values in PowerShell?
The equivalent request in CMD can be seen on the picture.
8
votes
1
answer
8k
views
Block a registry key to prevent rewriting or deleting accidentally or intentionally using the command line
I see the post in superuser and I have a similar case, but with a small difference.
I created a reg key.
"HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\wscript.exe"
...
1
vote
2
answers
19k
views
Start Microsoft Edge maximized on first run
I'm developing an image for Windows 10 to deploy, and one of the requirements is that when Edge is started for the first time it should be maximized (not fullscreen, but maximized - the same result as ...
2
votes
1
answer
3k
views
Is there a way to open regedit to the current path in powershell?
I'm using the Set-Location commandlet to move into the desired path in the registry. Is it possible to run regedit to that it opens in that path? Sort of like if you go into cmd, cd to the path you ...
0
votes
2
answers
508
views
Add Show/Hide hidden folders to Windows 7 context menu
Recently I've been bugged by the fact that it is so difficult to turn on "Show Hidden Files" in Windows as compared to other OS (ie. Ubuntu). I've been searching for a way to add an option to "Toggle ...
2
votes
2
answers
28k
views
Powershell script to run a .reg file on remote computers
I have tried creating a batch file using PsExec to update registry settings on remote computers without success so I am now trying to use Powershell. I have compiled the following script by using ...
41
votes
8
answers
115k
views
Switching default audio device with a batch file
I'm trying to write a batch file on Windows 10 that allows me to switch between my headset and my speakers as default audio device when I run it. I don't want to use any third-party software.
I tried ...
0
votes
1
answer
1k
views
Is there any way to add an HTTP Header to every IE request on a computer?
I would like to add a custom HTTP Header to every Internet Explorer request on a computer (or every browser request). I don't know if this is possible whatsoever, if you have heard of anyway to ...
1
vote
1
answer
2k
views
Import Registry Hive
I have a set of "Registry Hive Files (.)" that am attempting to import via PowerShell. The goal is to have the script run across many machines in the environment and not have to manually do it via ...