Questions tagged [cmd.exe]

cmd.exe, or the Command Prompt, is the default command-line interpreter for many Microsoft-created operating systems.

928 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
1 vote
1 answer
1k views

Run multiple commands using CMD and Start PowerShell.exe

I am trying to update my .bat script to restart a service on many machines by putting the name of each machine in a notepad. For this I am trying to run a powershell script from cmd, but I can't get ...
Jaime Pons Garcia's user avatar
1 vote
1 answer
62 views

How to get the "encryption method" string for a mounted drive in VeraCrypt from the command line?

I am trying to determine which encryption method each of my mounted VeraCrypt drives use, from PHP CLI, which means "from the command line". I find no such feature in the VeraCrypt manual ...
Alecsander's user avatar
1 vote
0 answers
101 views

Set up a new PC with Windows 10 - More efficient/quick with cmd or powershell

Sometimes i have to set-up a few new pc's with windows 10 professional x64. The system is already installed. When i turn on the PC i get to the first-time-login screen and have to set various options ...
NoErrorNoCry's user avatar
1 vote
0 answers
2k views

how to run cmd as administrator with psexec

i tried to open cmd as administrator manually and run this command reg add "HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp" /v UserAuthentication /d 0x00000000 /f ...
crownight's user avatar
1 vote
1 answer
613 views

How do i format multiple USB drives at once in CMD?

i work at a school. And when we have examns, we provide the students with USB sticks. After the examns we need to format all the drives. So far we've been using the following CMD script How ever, i ...
Tqunal's user avatar
  • 11
1 vote
1 answer
2k views

Win32:trojan-gen virus exe installed

I ran fake exe as i thought it was another program. After deep scanning with AVG, it located a win32:trojan-gen exe, moved it to quarantine and deleted. After scaning again, shows no malware. I am ...
Elo Elo's user avatar
  • 11
1 vote
0 answers
149 views

doskey fails to set listsize in CMD

DOSKEY /LISTSIZE=xxx should change the command history buffer in CMD, but unfortunately it seems to have no effect on my machine. No matter what value I set, the buffer size is not updated. I know ...
Alex O's user avatar
  • 635
1 vote
0 answers
210 views

How to add Virtual Machines to Log on as a service Properties in command line?

Following this question, I have found this page instructing to add "Virtual Machines" in Computer Configuration > Windows Settings > Security Settings > Local Policies > User ...
Foad's user avatar
  • 626
1 vote
1 answer
1k views

How to launch new instance of Explorer with start command in Windows?

I want to start a new instance of explorer.exe every time I run start \\path even if the same path is already launched in a window. Currently it works like this: start C:\Users It launches a window ...
K0SS4's user avatar
  • 11
1 vote
1 answer
1k views

How do I incorporate specified path in batch file for ffmpeg for each?

If I use this using CMD within the directory where all the movies are, it works fine: for %i in (*.mp4) do ffmpeg -i "E:\%i" -map 0 -c copy -metadata:s:a:0 language=eng "E:\converted\%~...
Mr. Dorian's user avatar
1 vote
0 answers
665 views

Remote desktop settings not working (Local Resources --> Keyboard --> Apply Windows Key Combinations --> On the remote computer)

I have received a new work laptop and the setting below is not working any longer. I use the Windows key + r key to open Powershell and the cmd prompt hundreds of times a day and my ability to do that ...
Bbb's user avatar
  • 111
1 vote
0 answers
984 views

Purpose of xcopy over robocopy

From what I've found online, robocopy seems to be xcopy with more features; are there any scenarios where someone would want to use xcopy over robocopy?
Meester Moo's user avatar
1 vote
0 answers
2k views

Make startup script which automatically Runs in Administrator Mode for deployment purposes - Windows 11

I am deploying Windows 11 via the Network. The process is the following: Load the image via winpe on the SSD of every machine with the dism tool. Load a startup script on the C:\ProgramData\Microsoft\...
Andy McRae's user avatar
1 vote
0 answers
98 views

Windows CMD interprets "y" as immediate command execution

Every input containing the character "y" in the command prompt ends in a new line respectively the command is executed immediately. Because of that it's for example not possible to start a ...
Mladen's user avatar
  • 11
1 vote
1 answer
1k views

How to execute WMI call from command line?

I've been using the following instructions to successfully turn my fans to silent mode: Fan Overboost stuck on Balanced mode in Rog Gaming Center The relevant parts are: Download and extract WMI ...
George Tian's user avatar
1 vote
1 answer
522 views

Disable double click on .py files

I have a bunch a python scripts inside a folder with other files. I'm running them from batch file in order. Problem is that those are all .py files that you can run just by double click and if I ...
IGRACH's user avatar
  • 489
1 vote
0 answers
269 views

How do I know which Command Prompt is related to a specific PID?

I have multiple Python programs running in separate Command Prompt windows in order to find a memory leak (the specifics are irrelevant). While watching the processes on Task Manager > Resource ...
ihavenoidea's user avatar
1 vote
0 answers
1k views

Command output to notepad

Trying to get command output to Notepad. I need way to get command output and place in newly opened Notepad window. How to achieve that? I do dir>>notepad but get nothing.
vico's user avatar
  • 2,543
1 vote
0 answers
165 views

Why does opening an admin command prompt from an unelevated command prompt not allow output redirection of the command prompt itself?

If you copy cmd.exe and set it to open as administrator and rename it to admin.exe and then do admin > file.txt, it does not redirect the stdout of the command prompt itself, but it works if you ...
Lewis Kelsey's user avatar
1 vote
0 answers
26 views

Why doesn't cmd show my d?

Put this into a .cmd (or .bat) file and run it from inside a cmd.exe window: for /d %%x in (a) do @echo %%x Because I did not put @echo off on top as usual, this line is logged (before echoing the a):...
Michel de Ruiter's user avatar
1 vote
0 answers
796 views

How do I set a system-wide proxy for windows using command line?

I know I can manually set the proxy via windows settings under 'Manual Proxy Setup'. But is there a way to do this via the command line? I've tried netsh winhttp set proxy <proxy>:<port> ...
abg's user avatar
  • 111
1 vote
0 answers
87 views

How to fix accentuation encoding with cmd.exe running inside bash?

I installed https://www.msys2.org/ and setup an ssh server for it. With this I can connect to my machine and work remotely. The problem is that some application as Visual Studio tools or windows ...
user's user avatar
  • 448
1 vote
1 answer
272 views

Command doesn't work from a .cmd file

This command works in a terminal, but if I save it in a .cmd, it doesn't show size in Mb : For %%_ in ("C:\ProgramData\Microsoft\Search\Data\Applications\Windows\Windows.edb") DO @(Set /a ...
cojocariv's user avatar
1 vote
0 answers
528 views

What is the difference between running a from cmd line vs. double click?

I have a miner program and if i double click and run it, it works fine, but if i run it from the cmd line using executable name it doesnt run, it crashes. I tried to run with CreateProcess function ...
C.Unbay's user avatar
  • 95
1 vote
0 answers
523 views

Close specific file in Acrobat Reader via the command line

I am working on something questionably useful (because better executions exist) which is a Sublime Text 3 PDFLaTeX build system with preview. I want to open files in Acrobat Reader, and so far all is ...
Maurycyt's user avatar
  • 111
1 vote
1 answer
113 views

The arguments "/S" and "/L" of the command ATTRIB won't work

I'm creating a program where I need to make all folders and files, in a given directory, invisible. For that, I'm using the CMD's command ATTRIB, with the arguments /S /D, as well as in the code below:...
JeanExtreme002's user avatar
1 vote
0 answers
129 views

List all installed software on PC with program data path

I'm trying to do the same thing as this thread but want the path of the program data file path. I noticed that an app that I installed isn't appearing in the apps section of the settings app.
SamGreenwood's user avatar
1 vote
0 answers
562 views

CMD echo working with PLINK>exe

good day, I tried to use the format below for my plink and when I went to login with the username I changed the password on it didn't accept the new password. so my question is, when using "(...
Thomas Bonar's user avatar
1 vote
1 answer
2k views

How do I find who shut down a computer remotely?

Recently, someone at my high school used the command prompt trick where you type: shutdown -i and enter the computers you want to remotely turn off. Is there a way I could/could have found the ...
Natty's user avatar
  • 11
1 vote
2 answers
2k views

How to rename files in all subdirectories

I need to rename all files in subdirectories. The names of the subdirectories are different, the file names are different, but they are always JPG files. I need a BAT script that will change the names ...
Robs's user avatar
  • 11
1 vote
0 answers
467 views

Tab Autocomplete does not work in windows CMD when remoting into machine using WINRS - WINRM

When inside a basic windows cmd prompt doing something like cd <TAB> will start auto-completion; However, when I connect to a remote machine using winrs the <TAB> key simply inserts a tab ...
Cynapse's user avatar
  • 150
1 vote
0 answers
459 views

updating a software in Microsoft Store using cmd

I want to automate my Microsoft store Updates or Xbox software for pc updates (Microsoft Gaming App called Xbox). SO I want to know how to do that via a command in cmd so I can give it to task ...
TEGNO's user avatar
  • 11
1 vote
2 answers
2k views

Delete files in downloads folder that haven't been accessed for more than 30 days

I am looking for a command in notepad (cmd) to delete all files in downloads folder that haven't been accessed for 30 days I have looked about 10+ codes and all were the same, that only delete files ...
Tautuxs's user avatar
  • 11
1 vote
0 answers
688 views

How do I undor/redo edits in Windows 10 CMD?

I see that CMD got a some changes for 10. Including ctrl+C/V. And for some reason they ruined drag&drop which now ovewrites text instead of inserting it... But so far I didn't find undo which is ...
mzso's user avatar
  • 21
1 vote
2 answers
147 views

Sending param to bash from cmd

I want to be able to invoke the file command from within cmd. This works, but is a pain to type: bash -c "file filename.ext" This is much easier, and works as expected... DOSKEY file=bash -...
user1215114's user avatar
1 vote
2 answers
602 views

Bat file to exit an application delete files and folders from %temp% and Cisco jabber folders , flush dns cache

I need help with code for .bat file should do following operations: Exit Cisco Jabber application. Delete files and folders from following locations: %userprofile%\AppData\Roaming\Cisco\Unified ...
Lashely Innovations's user avatar
1 vote
1 answer
648 views

PID in CMD.EXE is not showing in Task Manager

So I was looking at my cmd.exe > netstat -ano and I noticed that there were two PID's (4472)(9032) that had the same IP address that was showing as established. When I went to compare the PIDs to ...
Joe's user avatar
  • 11
1 vote
0 answers
498 views

Hibernation without an elevated command prompt

In this question you can see how to put the Windows in a half-hibernated situation but not only does it not fully hibernate but also it requires an elevated command prompt but if you even login as ...
arash's user avatar
  • 11
1 vote
0 answers
1k views

Open cmd and run command from RDP ( BAT FILE RDP )

i am using bat file to connect multiple PC's , here is my code for example @echo off cmdkey /generic:10.38.19.79 /user:administrator /pass:testpass cls mstsc.exe /v:10.38.19.79 echo Done exit With ...
Giorgi Shonia's user avatar
1 vote
0 answers
241 views

How to change (not reset) password via CMD in Windows

On Windows 10 Pro, non-domain I use: net user <username> <password> But it removes all stored credentials - I lose access to all my encrypted things, for example, personal certificates ...
Grzegorz B's user avatar
1 vote
1 answer
987 views

Error "The User Profile Service service failed the sign-in. User profile cannot be loaded"

I have a trouble when run win 10 "The User Profile Service service failed the sign-in. User profile cannot be loaded" I tried the way, but not working And now, My PC just working in command promt ...
Lê Cường's user avatar
1 vote
1 answer
2k views

How to stop a unstoppable Kernel Driver windows 10?

I am looking to stop a kernel-level service. I would like to stop the service called BadlionAnticheat (not going to cheat in online games don't worry). When I sc query BadlionAnticheat, I get the ...
Pseudonym Patel's user avatar
1 vote
0 answers
55 views

How to display sub processes with window titles in windows cmd?

Tasklist in cmd seems to display only the window titles main processes. Is there any command to get the window titles of sub processes as well?
Nikhil Tom's user avatar
1 vote
0 answers
63 views

How do you reopen an active process?

I have an executable file for starting up a game server and I use the command line to start the process. I'm not very knowledgeable with the command line so I don't know what it's called, but ...
user avatar
1 vote
1 answer
568 views

How to prevent the CMD pause to stop the script after opening a program

So, I am very bad at using the CMD program and I'm just trying to do something for fun. In my mind, it is very basic. I want to open a .bat file, that prompt an "echo" question so when I press any key ...
Dissolvant's user avatar
1 vote
0 answers
359 views

Mirror a folder and extract all zip files in their respective subfolders using powershell

I need to maintain a mirror of a unix server folder on a Windows Server for which I am using WinSCP and the following code: option batch abort option confirm off open sftp://username:password@hostname ...
PREM KUMAR's user avatar
1 vote
0 answers
23 views

Odd behavior for NTFS symlinks? Can use "TYPE" but not "MORE"

I've created a symlink to a file on an NTFS file system (Windows 7). If I use the more command to view the file, it doesn't display anything. If I use the type command, it works as expected. Here's ...
pbarney's user avatar
  • 727
1 vote
1 answer
67 views

Can I run an unpriviledged command prompt from an administrative account on Windows 7?

I have a Windows 7 VM where the user is an administrator. Every time I try to run cmd it opens with administrative access (as visible on the titlebar). Is it possible to run cmd from this account ...
Zhro's user avatar
  • 877
1 vote
0 answers
174 views

Folder became File during copy

I wanted to copy the contents of the desktop folder to my usb during windows setup in the cmd prompt. I used the command "copy desktop D:\desktop" and it listed out the files in the folder as it ...
Brandon's user avatar
  • 11
1 vote
0 answers
128 views

is it possible to enable WPS to connect to WiFi in Windows 10 using a script?

Is there any way to connect to WiFi by enabling the WPS method, for example, from the cmd in Windows 10? I'd like to automate it in a script.
Natiya's user avatar
  • 259

1 2 3
4
5
19