Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [cmd.exe]

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

7
votes
0answers
32k views

Open settings of X network adapter from CMD/BAT

How to open setting of the specific network adapter via commandline in Windows 7 Enterprise? I'm under domain user but also have access to local administator user. Under domain user I have no rights ...
4
votes
0answers
565 views

How can I set a dynamically evaluated environment variable for Windows' Command Processor (cmd.exe)?

The Windows command processor (cmd.exe) supports environment variables like USERNAME and USEPROFILE. The value of these variable is always the same after they have been set. But if I execute echo %...
4
votes
0answers
2k views

Display only the current directory name (not the full path) in Windows Batch Prompt

Is it possible to get the batch equivalent of this: Show only current directory name (not full path) on bash prompt I have a prompt like this C:\folder\inner> Is there a way to make it like this:...
3
votes
0answers
56 views

How to run exe with output via cmd like Linux

Running a program in Windows by inputting this in cmd.exe. ./myapp.exe Then the program looks like running in another thread, the different thread from cmd. How to make the program run via cmd ...
3
votes
0answers
115 views

How I get my command prompt to show just the name of the folder I'm in (not the whole path))

In a command prompt window (terminal), how can I get my prompt to be just the current folder? e.g. prompt $p $g gives: C:\Users\Robin > But I want it to just show: Robin > UPDATE: As @...
3
votes
0answers
668 views

How to add left side padding for windows cmd?

Is there any way to add left padding for windows cmd (Windows 10)? The output comes right after the windows border and sometimes it is hard to see the output clearly.
3
votes
0answers
405 views

How do I change the blinking cursor color in Command Prompt?

In command prompt i need to know how to change the color of the white blinking cursor that stays in front of the letters.... aka the keyboard cursor and im on windows 10
3
votes
0answers
808 views

Symbolic link doesn't work across drives

I'm on Windows 10. Running the command: mklink /D "G:\test" "C:\test" ...Is successful. However, in explorer when I double click the folder on G:\ and try to access any file in there, it says "...
3
votes
0answers
3k views

command line remove read only flag on all subfolder entries or overwrite read only files with robocopy

I need one of two things to work: I use robocopy to copy all sub-files and sub-folders from one folder to another, and the destination contains older files + files not in the source, and I need the ...
2
votes
0answers
63 views

Terminating a Process from CMD: Softest to Hardest

I was wondering if anyone had experience using command line to terminate processes using taskkill and WIMC. I was wondering if anyone knew the order of how "hard" of a close/terminate these commands ...
2
votes
0answers
25 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 ...
2
votes
0answers
35 views

Command Prompt settings won't save

I've tried running as admin and setting both Defaults' and Properties' window sizes. upon re-opening cmd the window is small again even though Default settings are still set right. Also tried ...
2
votes
0answers
175 views

How to open windows window from gnuplot cmd

I'm trying to force GNUplot plot in windows terminal when I invoke it from CLI. What exactly I want: WIN + R gnuplot set term windows (gnuplot when invoked from windows CMD doesn't know this type of ...
2
votes
0answers
417 views

run program at startup without entering administrator password

I am trying to run programs, which require administator password on accout without administrator rights, without entering password everytime they launch for each program. https://www.howtogeek.com/...
2
votes
0answers
187 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 ...
2
votes
0answers
30 views

After I moved files from my hard disk to my new folder from help of geek squad, my administator's folder name is changed, how do I changed it back?

So my old laptop crashed, and I was lucky enough to get a new laptop with no cost. With help from geek squad, they were able to moved all the files from my old laptop to my new laptop. The username ...
2
votes
0answers
137 views

how can display arabic characters in cmd?

i found answers to use active codes like 1256 or 16001 but the characters appeared in different form, Anyone can help me display arabic characters in cmd? Wrong characters example:
2
votes
0answers
141 views

Unset environment variable starting with =

I have this stange environment variables in my windows (discussed here and here): C:\Users\******\Desktop>set "" =::=::\ =C:=C:\Users\******\Desktop Unfortunately, I have to run a software that ...
2
votes
0answers
348 views

How to count total pages of multipile word files using dir command?

I have folder with about 1,000 MS-word files. Apart from Name, Size and Type column, I have "Pages", which is show me how many pages each file contains. How do I count how many pages I have in my ...
2
votes
0answers
288 views

Why does youtube-dl raise the bitrates of M4A files when it transcodes them?

I'm trying to download videos from a YouTube playlist using youtube-dl. When downloading a sample of 25 videos from the playlist with: youtube-dl -x -i --playlist-items 1-25 -f bestaudio <playlist ...
2
votes
0answers
394 views

Stay at changed directory after using cd command in bat file

Context: I have a .BAT file with the following code: cd C:\folder1\folder2 subl . When executing that .BAT file in dir "C:/folder3", I want to stay at the navigated directory "C:\folder1\folder2" ...
2
votes
0answers
3k views

How to get window title information from cmd in wmic?

I know that you can get window title with: tasklist /v or tasklist /v /fi "WINDOWTITLE eq Untitled - Notepad" Can I get something like that in wmic? I can't find any information about that.
2
votes
0answers
822 views

Missing network protocols? (Windows 10)

Not sure where else to turn for this one. Recently, after updating my OS, I frequently run into an issue that is preventing me from using WiFi at all. When I run the Network Toubleshooter, I get two ...
2
votes
0answers
416 views

PsExec to open a program that interacts via the Desktop and reports messages to CMD

I want to run a script on a remote machine. The script needs to be aware of the desktop, so cannot be run as a background process. To do this, I've been using the following command: psexec \\...
2
votes
0answers
234 views

Opening command prompt since Windows Explorer: why are environment variables not updated?

I often open the command prompt from a folder in Windows Explorer by typing cmd + ENTER: I noticed that by doing so, if I have changed something in my environment variables (e.g. PATH, through ...
2
votes
0answers
4k views

Windows 10 : how to share internet?

Since yesterday i started using Windows 10, after that i cant share my laptop's internet :( i need to share my laptop internet(internet dongle) to my tablet and phone, had used "virtualrouterplus" and ...
2
votes
0answers
62 views

Change Default Naming Behavior When Copying Files - Making Revision Versions

In Windows 7, when I copy/paste a file named "project.ext" I want the result to be "project Rev.1.ext". (That part is solved by tweaking the code in this post.) In addition to that, however, I want ...
2
votes
0answers
4k views

Ctrl-C not killing process in CMD.EXE

I've had this issue for a while even after reinstalling. Issue happens after I reinstall all my programs and not in a fresh Windows install (obviously). Might have to spin up a VM and install each ...
2
votes
0answers
315 views

Disappearing characters between youtube-dl, ffmpeg, and cmd

so what happens is that if the video title has a symbol that isn't supported by your current locale then ffmpeg won't be able to get to that file properly. Here's one example ►2 HOURS BEST MELODIC ...
2
votes
0answers
2k views

Windows: ping's timestamp option

The Windows "Shell" (cmd) provides the following option for ping: -s Count : Specifies that the Internet Timestamp option in the IP header is used to record the time of arrival for the Echo ...
2
votes
0answers
1k views

Why does CTRL-C on “Terminate batch job” prompt means “carry on”?

Our application uses 3 databases, one with client data, and two with configuration data. To prevent destroying client data, the batch file that deletes the client database has first a warning message, ...
1
vote
0answers
18 views

tasklist.exe gives incorrect errors

Running tasklist.exe to check the running processes on a remote system. I sometimes get spurious errors (listed below). Command: tasklist.exe /nh /s \\RemotePcName /fi "memusage gt 200000" ERROR: ...
1
vote
0answers
23 views

Why Windows 7 display an error message when I double click on file named as INIT.BCP.BAT

I have created a BAT script file named INIT.BCP.BAT on my desktop that contains (to be simple) only following lines echo Hello pause When I doubleclick on it, Windows 7 displays following message. ...
1
vote
0answers
85 views

Running Aria2 commands from a bat file

I'm currently using Aria2, a downloading software that you use via cmd, to download a list of content. It requires you to CD to the directory where you have a parameter file that outlines your ...
1
vote
0answers
61 views

How to launch default browser (e.g. Chrome) through bat script

I have a Chrome (default browser). I also have a bat script where I launch chrome with some flags. chrome.exe --disable-web-security --user-data-dir=c:\dev\chrome-data --disable-features=...
1
vote
0answers
35 views

How to redirect the output of a running process to a log file?

When running a long running task in a command prompt, it's possible to redirect the output to a log file (fe for storage or later analysis). However, I started a few long running tasks this evening ...
1
vote
0answers
252 views

Disable Port from command line (CMD) (Devcon it can not disable a port when there is nothing plug in; I need to do this 100+ PC)

How do I disable this port from command line? Is it possible to disable Port#0005 and only Port#0005?
1
vote
0answers
51 views

script to enable ICS service

I try to build script to select private network and enable part of ICS services. I select the private network with these code: { # Constants $public = 0 $private = 1 Write-Host "Creating netshare ...
1
vote
0answers
26 views

How to open launched executables as new tabs of command line tool?

It might be a simple question, but so far I haven't seen whether this is possible and how to do this. The batch of automatic tests I am running is launching a lot of command prompt windows which are ...
1
vote
0answers
39 views

Wget Specify Sub directories to Download (-I)

I have just started using wget and am able to download and specify location to save files in, but I am having issues when I try to limit my download to portions of the main directory. If I do not ...
1
vote
0answers
368 views

Font not in Windows 10 console properties list

I've been trying to customize my WSL lately (Windows 10 Pro N version 1709). However, the font I'm trying to use (the Windows compatible nerd-fonts version of FiraCode Regular) does not show up in the ...
1
vote
0answers
24 views

cmd.exe doesn't keep preferences when pinning to start menu

Normally, I launch cmd.exe by typing cmd in the Start menu and hitting Enter. I have changed the preferences of cmd such as font and color. I searched for cmd.exe and pinned it to the Start menu (...
1
vote
0answers
94 views

How to refresh a folder via command prompt?

I shared a directory via samba in Linux. In Win10 I mounted that directory as a network drive. I edit one script in Linux in that directory and I need to run it in Win10 via command prompt. However, ...
1
vote
0answers
183 views

Find out the real path of a file from a SUBST drive

Is it possible to find the real location of a file, knowing its location on a drive created with subst? Example: > subst d: c:\dir\ > real_path "c:\file" c:\file > real_path "d:\file" c:\dir\...
1
vote
0answers
507 views

Change the wallpaper without delaying using batch file

Using the code down below, either I'll have to open the file a few times or wait for a moment till the wallpaper change @echo off reg add "HKEY_CURRENT_USER\Control Panel\Desktop" /v Wallpaper /t ...
1
vote
0answers
1k views

How to make a batch script paste from clipboard into CMD?

I want to automate the process of opening a certain file with a batch script. The idea is that the folder with the batch script and the file will be distributed to other computers and It the script is ...
1
vote
0answers
127 views

Disable windows dpi scaling through command line parameters?

I'm trying to run the original quake through steam, but I need to disable window scaling. There are like 5 executable, and I'm too lazy to do it manually. How would I disable scaling by passing ...
1
vote
0answers
42 views

Apply changes for disable\enable proxy

I copyed\pasted and compiled from posts of internet the new batch-file: @echo off for /f "tokens=*" %%i in ('ipconfig ^| find "192.168.122.1"') do set VAR=%%i if %VAR:~33% EQU 192.168.122.1 ( reg add ...
1
vote
0answers
466 views

youtube-dl set playlist quality

Running on Windows, latest version of youtube-dl.exe I would like to download a playlist at the best possible quality (1080) My issue is that -f command has varied results depending on what I use: [...
1
vote
0answers
69 views

Turning off NLA (Network Level Authentication) locally with CMD?

Is it possible to turn off the NLA using a batch file or through an elevated CMD?