Skip to main content

All Questions

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

Removing User Account through Registry using .BAT [duplicate]

I am not the best at scripting but do know enough to write and modify to do what I want. This is an Enterprise environment and after adding a computer to the domain, we would like to delete the user ...
Corey Jackson's user avatar
2 votes
3 answers
1k views

Batch file running installation through intune

I have created a batch file that will run an installation through intune. it will install the application it will install the configuration file And I need to add a 3rd step, which would then add a ...
Braulio Cirilo'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
382 views

Why does regedit.exe have HKCU permission for importing but reg.exe does not?

I have a .reg file with current user values. If I use reg.exe in a bat file to import it says: ERROR: Error accessing the registry. If I use regedit.exe there are no issues. For regedit.exe I use: ...
subjectivist's user avatar
0 votes
0 answers
302 views

Writing a .bat file that will delete orphaned registry keys in the profile list and it is not working as expected

Need to write a .bat file that will loop through HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList, check if the SID actually has a user folder on the machine and if not, ...
Matthew Malone's user avatar
0 votes
1 answer
2k views

Access denied when adding key to HKEY_LOCAL_MACHINE using bat file, adding to HKEY_CURRENT_USER works fine

I need to add a new registry key to the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WindowsRunTime\AllowedCOMCLSIDs. I tried running a following bat script: @echo off REG ADD "HKEY_LOCAL_MACHINE\...
cooktheprogrammer'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
3 answers
1k views

Using reg.exe in a script with folder containing spaces

At my company we have a tool basically letting an user to choose on which site to log to, tool that will then deploy the correct registry files containing the settings about the site the user chose. ...
Tratosca's user avatar
1 vote
0 answers
108 views

why windows registry batfile shell key overwrites value during bootup [HKEY_CLASSES_ROOT\batfile\shell] [closed]

I am given a new windows10 Enterprise (20H2) HP laptop for my new job. When system boot-up, everytime it sets following registry value: When this key is set to "edit" as shown above, files ...
Sertac TULLUK's user avatar
4 votes
3 answers
3k views

How to convert multiple .reg files for use in a single .bat script?

I have three .reg files and need to use them in one .bat script: Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System] "EnableLUA&...
Ghost_Dz's user avatar
0 votes
1 answer
1k views

Delete folder in registry entry

I have a question regarding the problem of deleting a folder of a registry path with a .bat or cmd shortcut, preferably a .bat. Here is my problem: I want to delete (for example) the folder "...
DilaraT's user avatar
0 votes
2 answers
6k views

How to edit registry with cmd? [duplicate]

I want to edit the start type from a service with command prompt. For example delivery-optimisation-service : Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\InstallService\DoSvc My ...
Surveillance.gov's user avatar
0 votes
1 answer
586 views

How do I convert this batch file to a .REG file?

As the title reads I am trying to convert the following .bat file to a .reg file instead as the application does not support the current file type. reg add "HKCU\Software\Microsoft\Windows\...
Lethal's user avatar
  • 79
1 vote
1 answer
314 views

I want bat file to ask if it can make changes on the computer

(I don't speak English. Hope you understand) Hi, I have a .bat file, which edits the registry. I always must right-click and run it as administrator. Then it will ask, if I want to allow the program ...
Andrew's user avatar
  • 85
0 votes
0 answers
343 views

"Let me set a different input method for each app Windows" script activation

i need to activate the option "Let me set a different input method for each app Windows" on several pcs, but it seems that i can do so only manually... ( "advanced keyboard settings&...
alws34's user avatar
  • 1
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
0 votes
2 answers
2k views

Read value from registry via batch file without showing the source

This batch file works fine: reg query HKEY_LOCAL_MACHINE\SOFTWARE\Lenovo /v DisplayVersion | msg %username% It opens a window with the value, but it also shows the source.  How can write it without ...
2610's user avatar
  • 1
2 votes
1 answer
3k views

How to change Remote Desktop's port number using a .bat file?

I tried reg add but it keeps saying invalid syntax. Does anyone know how to edit the registry using .bat files?
Nguyen Dang Khoa's user avatar
0 votes
1 answer
142 views

What is wrong with these attempts at a batch file to export my Excel 2003 recent file list?

What is wrong with these attempts at a batch file to export my Excel 2003 recent file list? I keep getting either syntax errors or an error saying that the specified registry key cannot be found. ...
user122086's user avatar
0 votes
1 answer
43 views

Shortcut to activate/deactivate Outlook new mail notifications

As I'm syncing calendars from/to O365/GSuite, I use a tool called gSyncit which works perfectly fine and lets run Outlook in background mode to do the sync. Normally I want Outlook new mail ...
Andy's user avatar
  • 23
2 votes
1 answer
95 views

How I can delete all keys that cointain ProgramName?

How to delete all folders(path) that contain key with a name that contain "ProgramName1"? CCleaner and programs like that doesn't help. I google for bat,vbs scripts but they scan only ...
user1092194's user avatar
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
3 votes
2 answers
9k views

Batch file will not run - only opens Notepad++

Running Windows 8.1. This worked a few days ago. Really do not know what has changed, nor am I aware of any update that might have stopped this working. When I run a .bat (batch) file (right-click &...
AlainD's user avatar
  • 4,867
1 vote
1 answer
232 views

Why does Wallpaper.reg not do what its supposed to when added to a batch file? [closed]

Whenever I'm installing Windows on new devices there are a lot of changes to be made which cost a lot of time. So I wanted to make some scripts which do exactly that for me. For the past few days I ...
Rin's user avatar
  • 13
2 votes
1 answer
544 views

Is there an autoexit for cmd.exe like there is an autorun?

In windows when you create a value autorun in registry key HKEY_CURRENT_USER\Software\Microsoft\Command Processor and set it to, say, echo Hello from autorun, invoking cmd.exe will, on invocation, ...
Henrik Jensen's user avatar
4 votes
1 answer
1k views

How to get the data of a registry value in batch

I'm trying to get the value of Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa\everyoneincludeanonymous. I've tried using Reg Query but no matter what I type it says "INVALID KEY NAME"...
Mark Deven's user avatar
  • 1,660
0 votes
4 answers
7k views

How to force update to proxy setting after changing registry values in batch script?

In a batch script, I am updating a registry value with the REG command to disable the manual proxy. REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyEnable /t ...
JayD's user avatar
  • 23
0 votes
1 answer
661 views

how to make registry changed values to take effect without signing out?

If I manually change registry key values using cmd. they failed to take effect/changes until I restart/sign-out my computer. Eg. reg ADD "HKEY_CURRENT_USER\Control Panel\Desktop" /v ...
Aravind .KEN's user avatar
2 votes
2 answers
6k views

Convert .REG to .BAT using the command line

I want to set this reg key in a bat-file: [HKEY_CLASSES_ROOT\Applications\photoviewer.dll\shell\open\command] @=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,74,00,25,\ 00,...
Asaph Cbp's user avatar
2 votes
2 answers
3k views

Change the default program to open .bat files

I want to change the default program to open .bat files to cmder , so in the registry key : HKEY_CLASSES_ROOT\batfile\shell\open\command I did as following : But when I open some .bat file I get the ...
Ichigo Kurosaki's user avatar
0 votes
1 answer
3k views

Delete registry key on certain condition

I have a troublesome problem to solve. Browsed internet for some time now but so far haven't got even close to resolving it. Apologies if this has been answered somewhere else. I look after a call ...
Piotr Zurek's user avatar
0 votes
1 answer
150 views

Is there a possibility to corrupt a Windows Registry for repeated update?

I created a C++ program that runs in start up to call a .bat script that I created during log-in in my pc (Windows 10). Basically what the script does when it detects an internet connection it updates ...
threeFatCat's user avatar
1 vote
0 answers
297 views

How to save current web tab URLs using a batch file (no bookmarks, extensions, etc.)

I have read plenty of solutions pointing to bookmarks, or extensions that copy to the clipboard, etc... I am not interested in these solutions; they are exactly what I am trying to automate around by ...
Benjamin Apprill's user avatar
-1 votes
1 answer
434 views

How can I run a batch file when Firefox starts? [duplicate]

I want to run a .bat file when any .exe file (such as Firefox) is double clicked. I want to run this .bat file when Firefox runs. Is there any way to do this? I tried with this batch code: reg add "...
Muhammad Khaled's user avatar
0 votes
1 answer
7k views

Bat file added to registry not working on windows

I'm trying to make a bat file run at boot by adding it to the system registry; the bat is very easy, it's just: mkdir new Obviously when I normally run it, it works and a folder named "new" spawns ...
Domenico Procopio's user avatar
0 votes
1 answer
342 views

Symantec Version Reg Query

I'd be really grateful for some assistance with this, as it's blowing my mind. All I want to do is pull the Version Number of Symantec, using the below code, which works in part, all except the ...
Toby MacDonnell's user avatar
2 votes
7 answers
66k 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 ...
Beems's user avatar
  • 1,613
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
9k views

Batch File to Set Default Programs Without Administrator Rights

UPDATE 7/15/2016: A couple days ago, all the Group Policies pertaining to our OU stopped applying - meaning that there are no more restrictions. I now have full Command Line and Registry access which ...
InterLinked's user avatar
  • 2,536
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 ...
grizzljt's user avatar
  • 101
19 votes
1 answer
5k views

Can I prevent the change of overlay icons?

Background Several programs modifiy the icons in explorere to indicate a state ("synched" etc.) It is a known fact, that Windows (win7, win8, win10?) can only handle a limited amount of ...
BmyGuest's user avatar
  • 426
-2 votes
1 answer
3k views

Adding a registry key via batch file [duplicate]

could anyone tell me how exactly to do this via a batch file: https://support.microsoft.com/en-us/kb/3123303 The x86 version. Much appreciated.
Al Farseer's user avatar
1 vote
1 answer
2k views

Run batch file AFTER all other programs at Windows initialization

I have a set of programs running at Windows startup, some called from Registry and others called from Start Menu (Initialization). I'm trying to have a batch file loaded and showed its screen AFTER ...
Gabarito007's user avatar
-2 votes
2 answers
4k views

Add registry key via Active startup

I am trying to add a key to all users on a computer, doing this by using Active Startup. But i get Syntax error because my keyname i want to add(FormSuggest Password) have a space between, any tips ? ...
tommynh'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
0 votes
1 answer
422 views

How can I use a batch file to create multiple registry backups in the same folder? [closed]

I have a batch file in the Startup folder that creates a backup of the Windows registry using regedit. The problem is that it overwrites the older .REG file every time the computer restarts. Here's ...
Uttam Chavan's user avatar
4 votes
2 answers
48k views

How can I edit local Group Policy settings using command line? [duplicate]

I'm attempting to throw together a script for work that allows BitLocker without a compatible TPM. The setting is Configuration \ Administrative Templates \ Windows Components \ Bit Locker Drive ...
Sandfrog's user avatar
  • 147
2 votes
2 answers
16k views

Suppressing error in batch command if reg

If I run the following: @ECHO OFF FOR /F "tokens=2* delims= " %%A IN ('REG QUERY "HKLM\SOFTWARE\SomeApp\Server" /v ServerName') DO SET ServerName=%%B ECHO Server: %ServerName% and the registry ...
BondUniverse's user avatar