Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
0 votes
0 answers
70 views

Batch Enable "Hide HDR Notifications on this device"

I am trying to programmatically hide hdr notifications that recently got added to the xbox game bar in the last year or two. I tried enabling and disabling it through the ui and looking under these ...
OW2 Is Trash's user avatar
0 votes
0 answers
206 views

Getting REG Hive List of an offline Device

I am trying to get an hive list files of an offline windows installation so I can backup the files in WINPE in my script. What I have tried reg load HKLM\Offline D:\Windows\System32\config\SYSTEM ...
OW2 Is Trash's user avatar
4 votes
1 answer
450 views

Batch FOR LOOP with REG QUERY, REG EXPORT, list matching, REG DELETE if it matches, and ECHO any output to CMD and output.log

I have a list of registry keys/values/entries that I would like to delete (basically the list in #3 below without the REG DELETE stuff). It works as is but I'd like to have the batch... I. Write the ...
vav's user avatar
  • 45
0 votes
0 answers
87 views

Run Single Instance of CMD via Registry for Multiple Files?

I have written a script to convert images with DirectXTex. I use %* in the command inside the script to handle however many files I pass to it by directly dragging multiple files onto it directly. It ...
Mr. Mendelli's user avatar
  • 1,269
0 votes
1 answer
153 views

Setting compatibility flags on executables residing on removable media from a batch file

Edit: On further investigation it seems the SIGN.MEDIA=xxxxxxx string changes based on the subfolder on the removable media, so it's not the removable media's device ID at all. I can't seem to find ...
DoTheDonkeyKonga's user avatar
1 vote
1 answer
44 views

Filter informations in regedit (Batch)

I made a script that retransmits values ​​from regedit to a .txt file. I would like to know if it is possible to filter the "Exe History - Store" information that is written in the .txt (the ...
Purp's user avatar
  • 11
1 vote
1 answer
259 views

Issue with reg add command for automating desktop icon selections

I am looking for some help on what is causing my batch file to not execute the following commands. I am trying to change the desktop icons for mass automation for imaging. There is a lot more to the ...
Clayton Seager's user avatar
0 votes
0 answers
214 views

How to make right-click menu wait for each file to be processed?

I have created a right-click menu item based on this answer to run a batch file. This batch file runs a command which does some processing on the file. However, if I select multiple files, I see a ...
Michael's user avatar
  • 2,754
0 votes
2 answers
230 views

Custom Windows right-click command doesn't execute batch file as expected

I'm trying to create a custom right-click command which will move a file to a folder. I have a batch file called C:MyMove.bat with the following code: @echo off cls move %1 "C:/My folder/" ...
Vasilis's user avatar
  • 991
0 votes
1 answer
743 views

How to properly find java home folder with batch?

I'm trying to find the currently installed version and home folder of java JDK. I am trying this code, but I cannot figure out the proper "combination" of delims, tokens such that it ignores ...
zooid's user avatar
  • 3
1 vote
1 answer
278 views

Win 10 shortcut hotkey list location

I am looking for a file or Reg Key that holds current shortcut hotkey combinations, i.e.: Ctrl+Alt+B I have a few batch files with hotkeys assigned, but after each win update I need to reassign the ...
Nawad-sama's user avatar
1 vote
1 answer
2k views

Open up a registry from a remote client

I want to make a Script, that ask me for my input (Client) and opens up the registry editor with the client already connected, so I dont have to click manually add network... Is there a way, in Batch ...
Christian's user avatar
2 votes
1 answer
979 views

How to check if Night Light is enabled on Windows 10 using a batch file and enable/disable it?

How to check if Night Light is enabled on Windows 10 using a batch file? I think it can be accessed from Windows Registry, but I'm unsure about how to do it. I'm trying to get and set/change the value ...
The Amateur Coder's user avatar
1 vote
0 answers
354 views

Windows Registry Query Problems

i trying to query the wifi registry ProfileName under this path HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\NetworkList\Profiles as Wifi_5G i want to change the profilename to ...
Eugene Ng's user avatar
2 votes
1 answer
3k views

Batch script to find and delete a value in multiple registry keys

I have a batch script to find an delete regedit key: @for %%I in ("foo") do reg delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run" /v "%%~I" /f I need to expand ...
acgbox's user avatar
  • 785
3 votes
1 answer
9k views

Is it possible to insert a system command into a runOnce registry key/value?

For context, I have a script that runs a procedure, then reboots the computer, after reboot one directory needs to be recursively removed. Is this possible to do by using a "built-in" ...
CupCakeThief's user avatar
0 votes
0 answers
396 views

Issue writing batch file for a logon script to add registry entry at logon

This is the key I need to add during the login of a user. We have no login scripts currently and I'm just losing it on how to make a batch file to do it. This is extracted from the .reg file. Is it ...
turnerdb001's user avatar
0 votes
0 answers
31 views

I lost the track of my screenshots folder while trying a batch command and I don't know where to look for my screen-shots

I regularly take Screenshots using the Win + PrtScr . My work involved frequent changing of Screen-shot folder, so instead of going to Folder-properties and Moving Location everytime, I decided to ...
batchcoding____s's user avatar
0 votes
1 answer
1k views

Windows 7 64bit- Can't run batch files

I know a lot of people have posted on the internet about not being able to run batch files but I haven't been able to find a solution for myself. I arrived at this problem trying to run a game I just ...
Ashkaan's user avatar
0 votes
0 answers
936 views

Changing desktop wallpaper with a batch script only works some of the time

I'm using a batch script to change the desktop background. I'm using a test script to just do this one component which will later be become a part of a more involved script. The test script has the ...
Kat's user avatar
  • 135
0 votes
0 answers
1k views

reg save -> ERROR: The system was unable to find the specified registry key or value

I would like to save/backup all registry entries that accumulate over a while in a certain part of the registry. So far I have tried in the command window which I opened with admin rights: reg save ...
HJStern's user avatar
  • 21
0 votes
1 answer
888 views

Reg Export Document Location Path

@echo on reg export "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders\Personal" C:\%username%.reg pause I wrote this simple batch to just copy the reg of shell folders. The ...
user1115060's user avatar
0 votes
1 answer
60 views

slightly changing path used inside a batch file

Follow this please using path from registry in a batch file Code: for /f "tokens=2*" %%a in (' REG QUERY "HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Web Start\1.0.1" /v Home') do set JavaPath=%%b ...
yash's user avatar
  • 13
1 vote
1 answer
3k views

using path from registry in a batch file

I am pretty new to registry and batch files editing. I want to replace path C:\PROGRA~2\Java\jre8\bin inside my batch file to a more generic path so that each time I don't have to modify the path and ...
yash's user avatar
  • 13
1 vote
1 answer
548 views

REG ADD REG_SZ where Value contains embedded double quotes (redux)

This is driving me bananas but it must be something very simple. I am trying to modify an ImagePath Value (REG_SZ) for a Service in a Batch script using REG ADD, where the Value Data contains ...
Neil Weicher's user avatar
0 votes
1 answer
3k views

REG ADD REG_SZ where Value contains embedded double quotes

This is driving me bananas but it must be something very simple. I am trying to add an ImagePath Value (REG_SZ) in a Batch script using REG ADD, where the Value Data contains embedded "double quotes"....
Neil Weicher's user avatar
0 votes
1 answer
2k views

How to run a program on startup with admin access from registry, before user logs on

I'm working on a tool that can change the password for an account without having to log in (account recovery). My thought was to put a key that runs a batch file in HKLM\Software\Microsoft\Windows\...
Mark Deven's user avatar
  • 1,660
1 vote
2 answers
840 views

How do I set a registry variable in batch code with SETX?

I am trying to make a custom tool that works with Steam. Because the user may have a different install directory than myself, I want to use the SteamPath registry string value as a variable in my ...
Mr. Mendelli's user avatar
  • 1,269
-1 votes
1 answer
140 views

Batch script doesn't work from contextual menu

I have a batch script that uses Defender Control to toggle (enable and disable) Windows Defender. It works perfectly except when I add it to the right click context menu, it doesn't work. Is there ...
freddie-o's user avatar
0 votes
1 answer
4k views

Checking if a value name for a key is present on the windows registry through batch file

I need help for verifying if the value for a key exist or not. I don't know how to check if my specified value name exist or not in my specified Key path. I have this: reg add "HKLM\SOFTWARE\....." ...
Lia's user avatar
  • 3
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\...
EllipticalInitial's user avatar
0 votes
1 answer
10k views

Import .reg file into the Default user profile via command line

My goal is to import specific registry program settings (e.g. CCleaner) into the Default user profile of an active system to make sure new users get a predefined configuration. I do not want to create ...
Clacers's user avatar
  • 393
3 votes
1 answer
1k views

Query registry value that contains slashes

I am trying to grab the value of the registry key in serialcomm using this command: REG QUERY HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM which gives me: HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\...
rookie's user avatar
  • 97
1 vote
1 answer
395 views

Change Wallpaper according to time

I need to open it on startup to change the wallpaper at day n night Dim objShell str1 = "C:\Users\AnB\Desktop\Texts\Projects\Project WallTime\Day.bat" str2 = "C:\Users\AnB\Desktop\Texts\Projects\...
Anuja Nimesh's user avatar
1 vote
1 answer
6k views

Dynamically search and delete multiple registry entries(both key and value) by batch script

I have uninstalled a recent game called "Wolfenstein 2009", but somehow I had to do it manually. I was able to delete files very easily, but here comes the tricky part. I have following command to ...
Vicky Dev's user avatar
  • 472
7 votes
3 answers
9k views

Create a new "New" submenu in context menu with a custom name

I like to experiment a lot with coding and creating html, css, js etc. files each time I want to try something is tiring. To get around this, I have created template html, css, etc. files and added ...
akinuri's user avatar
  • 449
4 votes
1 answer
3k views

Checking existence of registry key value in for loop batch

I am writing a batch script to check if a registry key value exists and I am having some issues. When I directly specify a key to look for, the %ERRORLEVEL% updates appropriately. The example below ...
Alex's user avatar
  • 143
1 vote
2 answers
5k views

In batch script how to loop through registry sub keys

From windows registry I am able to get the list of java version that are installed on my system using below code. But how to loop through the list and store Java home in an array? @ECHO OFF REG QUERY ...
Amit's user avatar
  • 11
1 vote
0 answers
112 views

Computer immediately turns back on after "Shut Down" or holding power button, after editing registry

I have 4 PCs which I'm 'setting up' ready for a client. I created a batch script to set a load of values which need setting so that I can save time by not having to do it manually. (See batch script ...
Ben Hayward's user avatar
1 vote
0 answers
422 views

Registry search for files in subdirectories in batch file

I want to only search in subfolders in HKLM\Software\Microsoft\Windows NT\CurrentVersion\Print\PRINTERS using a batch file. I want it to search the subfolders for values named "Name" and to output ...
Matt Pielichowski's user avatar
3 votes
2 answers
439 views

Block-unblock or create-uncreate reg keys prevent rewriting or accidental or deliberate deletion, using the command line

I have this method to block registry keys and prevent accidental or deliberate deletion or rewriting, either by a user or by malware example of keys: "HKEY_CLASSES_ROOT\Applications\cmd.exe" "...
BrianC's user avatar
  • 185
1 vote
1 answer
3k views

Batch Loop used to reg query a list of keys from txt file and reuse data value

I need a batch loop that should extract a data value and use it in its next command. All registry keys I want to query has been saved into a *.txt file. Example: The following command will return ...
Heinza's user avatar
  • 31
1 vote
1 answer
2k views

How do I create a batch script creates certain registry entries in all subfolders

I was reading this on the web: Press Windows Key + R, type "regedit" in the box, then press enter. Go to this path: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\Tcpip\Parameters\...
Ice's user avatar
  • 37
17 votes
4 answers
92k views

How to get a registry value and set into a variable in batch

I need to get a value in a registry key and store in a variable using a batch file. I wrote a basic command line to exemplify my logic (using echo instead of setting a variable): for /f "tokens=3 ...
John's user avatar
  • 173
0 votes
1 answer
2k views

Reset Batch File Open Command for Windows 10

Awhile ago I attempted to change the default editor program for batch files to Notepad++ but instead set the default way to open it. I've attempted: https://social.technet.microsoft.com/Forums/office/...
Dacio Romero's user avatar
1 vote
1 answer
1k views

How to edit a registry key for every profile, without knowing their name?

I want to change the registry key HKLM\SOFTWARE\Microsoft\WcmSvc\wifinetworkmanager\features\S-1-5-21-192855608-1092268202-2311440418-1001\FeatureStates in Batch. However, S-1-5-21-192855608-...
Samuel Koch's user avatar
10 votes
1 answer
50k views

Checking if a key is present on the windows registry through batch file

I work as IT Support for public service. Some of the jobs we have to do on a regular basis is to install some software developed by our own developers. We usually do it as procedures, in which in ...
Vinícius Simões's user avatar
0 votes
2 answers
1k views

Script to enable autologon for users on a domain won't work unless I run it twice

So I'm having an issue with a script that enables autologon domain users. For some reason I have to run it twice for the option to be enabled on the computer. The Script: @echo off REM Set variables ...
Youssef Karami's user avatar
1 vote
3 answers
5k views

How to receive a parameter in a batch file

I have asked a question, Use an environment variable to point to an "Open With" program, which received a fantastic answer. To add myapp.exe, residing in %MYAPPSDIR%, to the Open With ...
sancho.s ReinstateMonicaCellio's user avatar
0 votes
2 answers
79 views

Batch check for *.reg but only if = 1 file

I am looking to basically check if a batch file is present by wildcard *.reg, but I would like it to error if there is more than 1 .reg file. This is the code I have been trying to use, but my batch ...
Ctrlaltdenied's user avatar