Skip to main content

All Questions

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

Explore Regedit.exe to the specified address from the CommandLine [duplicate]

Generally, when we want to navigate to one of the registry addresses, we open regedit.exe then copy-paste the address into address bar, then press enter. For example Computer\HKEY_CURRENT_USER\Console ...
Mr.Key7's user avatar
  • 823
0 votes
0 answers
23 views

Starting a program from the CLI with some File Properties Options activated

Start a program from the CLI with some File Properties Options activated I want to start from the CLI automatically a graphical application with a File properties flag setted. High DPI scalling ...
freddie_ventura's user avatar
0 votes
1 answer
454 views

How Can I Change File Explorer's Default View to "Details" and Group by Type Using CMD/Batch or PowerShell?

I'm looking to customize the default settings of File Explorer on my Windows 10 system. Specifically, I want to set the default view mode to "Details" and have files always grouped by "...
Foad's user avatar
  • 662
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
2 votes
2 answers
4k views

Change ownership of Registry Key using script

I'm attempting to programmatically change the owner of a registry key but I can't get it to work using a few different methods in CMD or PowerShell. Is this even possible? The key is owned by "...
Patrick Keane's user avatar
1 vote
1 answer
359 views

Can I remap the power-button? [duplicate]

Can I remap the power-button to run a script (CMD, PowerShell, AHK...) e.g. via a registry entry under HKLMiSYSTEMlCurrentControlSetiControNKeyboard LayoutiScancode Map?
Pingui's user avatar
  • 179
0 votes
2 answers
572 views

How can I set the value for each default key in different subdirectories of regedit?

Here is a screenshot what I'm working with: screenshot of regedit directory I wanna run a script that will set every default key in each subdirectory named mplayerc64.*\shell to "enqueue" (...
Kyle D's user avatar
  • 3
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
0 votes
2 answers
838 views

Add REG_EXPAND_SZ with multiple quoted values by REG.EXE only

EDIT: RESOLVED. Needed to escape all special characters and put quotes around all paths containing spaces. Working CMD code below for reference. reg add "HKLM\SYSTEM\ControlSet001\Services\...
Colm Whelan'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
0 answers
28 views

Why is this command not making class files double clickable?

I wanted to make .class files open with java.exe when double clicked. First, I tried to do that using "open with", it did not even take java.exe as a choice. Now I entered the following in ...
Sasidhar's user avatar
0 votes
0 answers
147 views

Windows Explorer.exe crashes when running a cmd command from shell registry

I saw this nice cmd command on this SU answer that removes empty folders in a one liner. I thought this would be very useful to have as a right click context-menu option for folders. So I went over to ...
DFSFOT's user avatar
  • 221
3 votes
2 answers
19k views

Change name of webcam from windows registry programmatically

I want to change the name of a selected web camera in windows 10 so that the given name will be shown to other applications (zoom/meet) instead of the default webcam name. I have seen that I can ...
Rahat Zaman's user avatar
1 vote
2 answers
678 views

Delete all new files and folders besides user default folders

Summary : I would need to delete all files and folders created/copied/moved into user's root profile. If someone creates a file it should automatically be deleted. What I need : User's are not to ...
Newbie's user avatar
  • 145
3 votes
0 answers
2k views

What Group Policy settings can block Command Prompt from executing scripts

I've been struggling with a problem on my computer that apparently has no solution I could find online. I'd very much prefer not to format my hard drive and start over with a new Windows installation. ...
samzoia's user avatar
  • 31
1 vote
0 answers
77 views

Windows 10 command shell not running associated apps

Recently the behaviour of my CMD shell (windows 10) changed, and I have no idea why. Previously , when typing the name of a script xxx.py or blabla.txt would either run the script using python or ...
GJO's user avatar
  • 11
2 votes
0 answers
1k views

Disable playback/recording device programmatically (cmd, c#) Windows

I am trying to disable the microphone from cmd or c#. I tried to use devcon.exe, but it disables the device in Device Manager but not in the sound properties. I tried to write to the registry: reg ...
Chris's user avatar
  • 141
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
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
3 votes
1 answer
12k views

Enable/disable WLAN without admin in Windows

I want to enable/disable WLAN connections using a batch script. The problem is, that I don't want to require admin privileges. It is possible to change this using the GUI: but I didn't find any way ...
dan1st's user avatar
  • 251
0 votes
1 answer
336 views

cannot frind HKCU\Console\%SystemRoot%_system32_cmd.exe

I am trying to permanently change the code page of the cmd.exe. Under HKCU/Console, I can only find the following two keys: %SystemRoot%_System32_WindowsPowerShell_v1.0_powershell.exe %SystemRoot%...
joehua's user avatar
  • 287
-1 votes
1 answer
795 views

Run cmd reg delete commands from a txt

I have a txt file like this: HKLM\SOFTWARE\Classes\CLSID\{03ACC284-B757-4B8F-9951-86E600D2CD06}] HKLM\SOFTWARE\Classes\CLSID\{03ACC284-B757-4B8F-9951-86E600D2CD06}\InprocServer32 HKLM\SOFTWARE\...
Clyde_271's user avatar
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
0 votes
2 answers
271 views

How can I create a new .reg file from the CLI

I'd like to create a new .reg file and add it to the registry, as suggested in this article. REGEDIT4 [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\IniFileMapping\Autorun.inf] @="...
voices's user avatar
  • 2,741
5 votes
1 answer
15k views

Registry: Shell Open Command - Open multiple programs

I'm trying to register a shell open command via the registry and want to open more than one program, so I tried it like this: [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\myFile\Shell\Open\Command] @="cmd /k ...
patpat's user avatar
  • 53
2 votes
0 answers
234 views

Logon script for Citrix Xendesktop to create shared folder based on IP address

This is a bit over my head, but I've been tasked with writing a script to create a shared folder per login, based on the third IP address octet of the client device, ( thin client terminal). It's ...
gwarokk's user avatar
  • 21
2 votes
1 answer
982 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 ? ...
Johan Bernardic's user avatar
4 votes
1 answer
901 views

Is it possible to easily find the Command Prompt equivalent of a context menu item?

For example, Comodo Internet Security has added two items to my right-click menu, "Scan with Comodo" and "Run in Comodo Container." I don't particularly want both of them to be there clogging up my ...
ETL's user avatar
  • 381
2 votes
0 answers
1k views

Registry command for context menu item to copy folder name

I often need to quickly copy the name of a folder in Windows 7, and so am trying to create an equivalent to the Copy as path item that appears in Extended context menus (i.e. when doing Shift+Right ...
Hashim Aziz's user avatar
0 votes
1 answer
203 views

Cmd quits after mbam scan and quarantine

Recently I scanned disk with MalwareBytes Anti-Malware and then accepted quarantine of specific registry key (don't remember which one was that) which seemed to be related to cmd.exe. After this scan ...
pbies's user avatar
  • 2,932
1 vote
1 answer
6k views

EXPLORER.EXE doesn't Autorun upon startup or CMD doesn't work

Upon windows startup, I only see a CMD window where I have to run explorer.exe and from there everything goes "normal". I am pretty sure this has something to do with the AutoRun Registry which can ...
Leon Kagan's user avatar
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 ...
comp.sci.intern's user avatar
0 votes
1 answer
389 views

DIR list files with only one extension

The code below will list all files from the selected directory. How to make it list only files with one extension, like pdf? [HKEY_CLASSES_ROOT\Directory\Shell\4_content-list-pdf\command] @="cmd /c ...
Rayearth's user avatar
  • 355
4 votes
3 answers
20k views

Where are cmd.exe's settings in registry in Windows 10?

In the times of Windows 7, I remember, there was [HKEY_CURRENT_USER\Console\%SystemRoot%_system32_cmd.exe] where all cmd.exe settings were stored. If I deleted this path, all cmd.exe would reset to ...
AntonioK's user avatar
  • 378
0 votes
0 answers
149 views

Set custom browser for http protocol

I'm devlopping a small browser, ans i'm intersting to set it as default browser of windows i know how to set that when a html file is cliked, it will open my browser, bit i can't find out how to set ...
showf's user avatar
  • 21
1 vote
3 answers
12k views

How to re-enable cut/paste in Windows 7 after accidentally deleting a key in registry?

Update: Solved Please see Accepted Answer, comments, updates & other wonderful answers. original Question: The Problem: If I use Ctrl+C on a file/folder, that icon gets fade, (expected), but ...
DavChana's user avatar
  • 259
-2 votes
1 answer
710 views

Regedit deleted and now want to restore it using cmd

I have made a copy of regedit on by desktop (by exporting it), after that I deleted some of registries entries(hkey_local_machine) due to which now my system does not restart. Can you tell me how to ...
vipin kumar singh's user avatar
-1 votes
1 answer
2k views

Missing HKLM\Software\Policies\Microsoft\SystemCertificates--AuthRoot

I cannot find this HKLM\Software\Policies\Microsoft\SystemCertificates--AuthRoot in my Registry. Please help.
LittleBirdy's user avatar
40 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 ...
zerothehero's user avatar
2 votes
1 answer
3k views

start cmd.exe minimized/hidden via contextmenu

I've created a shortcut to the contextmenu by adding a new registryentry with this RE_SZ Key: cmd.exe start /min /c echo %1|clip This allows me to copy the path of the rightclicked file. BUT: It ...
Janik H's user avatar
  • 43
3 votes
4 answers
7k views

Modify "Open command window here" context menu call

I've recently started using cmder instead of Window's default cmd prompt and I'm really loving it. I'm at the point now where I want to replace all instances of cmd.exe being launched with cmder.exe ...
Jazcash's user avatar
  • 165
0 votes
0 answers
1k views

How to add a program in registry using batch file?

I want to add an .exe program to this registry path: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\Shell I tried this code @echo off reg add "HKEY_LOCAL_MACHINE\...
Ari Dey's user avatar
1 vote
1 answer
3k views

Cmd.exe default registry keys

My cmd.exe registry settings are messed up for font, size, etc. Could someone tell me the default values or give a link to .reg file that will restore these settings? I tried looking for this on the ...
builder_247's user avatar
0 votes
1 answer
2k views

Add a batch script to windows right click menu, to run applications with psexec tool

I want to make a batch-script that runs a selected application with PsExec.exe tool. And I want to add this option to the right-click menu. Like the "Run As Administrator" menu on windows 7. Can ...
eviB's user avatar
  • 1
0 votes
1 answer
637 views

If command, importing .reg not working

I am trying to use a if command to change language. But all I am getting is "Syntax error" I really can not find the real syntax. CMD file @echo off echo "1 =Brazilian Portugese" echo: set /...
0x3D's user avatar
  • 3
0 votes
1 answer
3k views

How do I start cmd.exe from a UNC path (to map a network drive)?

While cmd.exe can work with UNC paths by using PUSHD \\UNC\Path, I'm attempting to start cmd or a similar command FROM a UNC path. Here's why: I'm adding a "Map Network Drive Here" to my suite of ...
Ehryk's user avatar
  • 300
2 votes
1 answer
275 views

Use PowerShell to interpret registry values

Consider the following key, as an example HKEY_CLASSES_ROOT\txtfile\shell\open\command and its (Default) value %SystemRoot%\system32\NOTEPAD.EXE %1 This value determines what will happen when you ...
Zombo's user avatar
  • 1
3 votes
2 answers
30k views

How do I set Chrome as the default browser with a .BAT file?

Note: I've already read Batch - Default Browser?, but that's about getting the default browser. I want to set it. I'm making a set of batch files to easily set up computers I use (don't worry; they'...
Ky -'s user avatar
  • 993
3 votes
1 answer
7k views

Add registry entries for all users

I've installed a software on my windows 8 computer which writes entries in my registry. How can I modify this registry entries for all users ? For example what I need to modify is values from this key ...
Tarida George's user avatar