Hot answers tagged

304 votes

Typing “python” on Windows 10 (version 1903) command prompt opens Microsoft store

Fixed it by removing it automatically on the settings page. Under Apps and Features, there are an application execution aliases. I am running the latest 1903 update.
  • 3,141
232 votes

How to open Windows CMD so that it starts in the current folder?

Enter cmd in explorer's address bar & press enter
  • 6,203
210 votes

Why is DNS apparently involved in issuing "dir" on Windows 10?

The second cmd.exe fails to locate and subsequently load the localized strings from the cmd.exe.mui satellite resource library. Here is what it really attempts to say, taken from a 10.0.18362.1 (...
  • 1,021
134 votes
Accepted

How to open Windows CMD so that it starts in the current folder?

You can also shift-right-click in a folder, and notice a new entry in the context menu (Open command window here):
  • 1,718
112 votes

Is typing %^ into cmd.exe a Windows easter egg?

No. Microsoft formally stopped including Easter eggs in its programs as part of its Trustworthy Computing Initiative in 2002. http://en.wikipedia.org/wiki/Easter_eggs_in_Microsoft_products ...
  • 27.2k
112 votes

Why is DNS apparently involved in issuing "dir" on Windows 10?

I have managed to duplicate the problem: (I agree that the messages are not very informative.) The problem is that starting from Vista all the text messages are compiled into a separate file, so ...
  • 431k
104 votes
Accepted

run powershell command from cmd

powershell -command "get-process | ? {$_.Description -eq 'Sysinter Process Explorer'} | select processname | out-file $env:APPDATA\example.txt" basically you have a powershell command and paste it in ...
  • 8,472
89 votes

How to run multiple commands one after another in cmd

Run multiple commands one after another in cmd Try using the conditional execution & or the && between each command either with a copy and paste into the cmd.exe window or in a batch file....
77 votes
Accepted

Why does a file get opened when I write its name, without extensions, in the command line?

Because %PATHEXT% is set to .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC by default. Note how it contains .js. That means if you type a name, CMD will look for files with these extensions ...
  • 57k
75 votes
Accepted

How to decode contents of a batch file with chinese characters

The file actually has regular ASCII text (or Windows-125x). It only looks a little like UTF-16 containing some Chinese characters, due to some carefully chosen bytes at the very beginning that are ...
  • 401k
67 votes
Accepted

How to show full command line of all processes in Windows

In cmd, run the following: wmic process get processid,commandline To filter for a particular program: wmic process where "name like '%chrome%'" get processid,commandline The other properties that ...
  • 2,414
63 votes

Running .exe in command prompt

This will leave the console window open even after MyApp.exe terminates: cmd /K "C:\SomeFolder\MyApp.exe" You can create a shortcut with the above. This solution works with all console programs and ...
  • 11.2k
63 votes
Accepted

Windows 10 Powershell tree command, how to show files

Simply use tree /F on any powershell instance to have the same behavior the normal tree on UNIX has. The tree alone on Powershell shows only folders but not files in them.
62 votes
Accepted

Open CMD as admin with Windows+R shortcut

The easiest and quickest solution that follows your method, is by starting the command prompt as follows: Press win to open the start menu. Type in cmd to search for Command Prompt. Press ctrl+shift+...
  • 57.5k
61 votes
Accepted

What is the command to reset a Windows installation without deleting any files

After searching for a whole hour I found the solution: sysprep. Enter this is in the command line and it will shutdown your PC after confirming. The next time you start your PC it will look like a ...
54 votes

How to crop an image using ImageMagick from the command line?

Assuming that you always know the size of your image you can do it like this: convert original.jpg -crop 640x620+0+0 cropped.jpg With the -crop operator you specify the size of the cut out image and ...
53 votes
Accepted

Is typing %^ into cmd.exe a Windows easter egg?

CMD is line based. It only reads and executes one line at a time. When you are typing and you haven't finished a line it prompts with More?. Your specific thing is there is no line ending so it's ...
  • 631
52 votes

How to get the ACTUAL version number for Windows 10 from command line? (NOT build number!)

How do I get the version, such as 1903, instead of the "build number"? The following PowerShell command will provide the information you are seeking: (Source: How to get Windows version ...
  • 40.3k
52 votes

How can I restore Cmd.exe (Command Prompt) if it doesn't exist?

You can run the System File Checker tool (SFC.exe) which will repair missing or corrupted system files: Open PowerShell as administrator. Enter sfc /scannow. From Microsoft: The sfc /scannow ...
  • 909
51 votes
Accepted

How to save ipconfig output to text file when `tee` isn't available on Windows?

Try redirection. Instead of | tee, use > output.txt e.g. ipconfig /all > output.txt
  • 1,123
51 votes

How to open the Windows Terminal (Preview) in File Explorer

You can try this command in the folder path: wt -d . source EDIT: Microsoft mentions the previous command in one of their videos alongside with many interesting features of Windows Terminal 1.0
  • 610
46 votes

How to open the Windows Terminal (Preview) in File Explorer

To fix this: Open Windows Terminal Click the down arrow in the toolbar to get the menu and select "Settings" Update your profiles.json defaults so that all shells starting directory is the current ...
  • 469
45 votes

Pinging different IP address than what I entered

On Windows CMD if you put leading zeros on the IP address means octal. It is interpreting 016 as 16 octal and converts it to 14 decimal. You can use octal, decimal or hexadecimal notation as in the ...
  • 16.9k
45 votes

Switching default audio device with a batch file

I appreciate you don't wish to use any third party software, but as an option for if you don't mind using a ~100kb exe, you can use Nircmd with the commands: nircmd setdefaultsounddevice "Speakers" 1 ...
  • 20.8k
45 votes
Accepted

CMD prompt window pops up and instantly disappears periodically

Check the task scheduler, see if anything added in there could be triggering it.
43 votes
Accepted

Change working directory to network share

The Windows command prompt cmd does not support UNC paths as current directories. C:\Users\User1>cd \\myServer\myShare CMD does not support UNC paths as current directories. Solution: Use pushd. ...
  • 27.2k
41 votes

How to open Windows CMD so that it starts in the current folder?

How do I open Windows CMD in explorer from the current folder? Enter cmd in the explorer address bar and press Enter
  • 149k
40 votes
Accepted

Tasklist shows process but taskkill is unable to kill it, even as admin

I had a similar problem with multiple instances of conhost.exe that I could not terminate with taskkill, even giving the exact pid. I always got the same error, saying that there are no instances of ...
  • 532
40 votes

Typing “python” on Windows 10 (version 1903) command prompt opens Microsoft store

Deleting "C:\Users\Username\AppData\Local\Microsoft\WindowsApps\" from the system environment variable, PATH, prevented the Microsoft Store application from launching when I typed python.exe and ...
40 votes

CMD prompt window pops up and instantly disappears periodically

I think it's fixed! I checked the Task Scheduler, like NetServOps said, and found one line item that was scheduled to run every 10 minutes. "Firefox Default Browser Agent A99BB431EF49E2C3". ...
  • 571

Only top scored, non community-wiki answers of a minimum length are eligible