Questions tagged [cmd]

Command Prompt (executable name cmd.exe) is the Microsoft supplied command line interpreter on OS/2, Windows CE, and all Microsoft Windows operating systems. Use this tag for questions regarding programming scripts or on commands available to run from the Command Prompt. Add tags for which version of Windows, and tags describing the task or issue.

Command Prompt (executable name cmd.exe) is the Microsoft-supplied command-line interpreter on Windows NT-based operating systems (including Windows 2000, XP, Vista, 7, 8, 10, Server 2003, Server 2008, Server 2012 and Server 2016), OS/2 and Windows CE. It is the analog of COMMAND.COM in MS-DOS and Windows 9x (where it is called MS-DOS Prompt) systems, or of the Unix shells used on Unix-like systems.

Include additional tags to identify the version of Windows such as , , , etc.

Resources:

See also:

26386 questions
6
votes
2 answers

How to run a command from a batch file and immediately return?

When I am on the command line and do this: "C:\Program Files\TortoiseGit\bin\TortoiseGitProc.exe" /command:log a GUI dialog of TortoiseGit is opened and cmd.exe immediately returns, meaning that I can immediately run other commands like dir…
Borek Bernard
  • 50,745
  • 59
  • 165
  • 240
6
votes
4 answers

CMD set /a, modulus, and negative numbers

Is CMD unable to evaluate the modulus of negative numbers using set /a? 90 % 7 correctly equates to 6 in batch, however -90 % 7 gives -6 instead of 1. I thought that it might have been evaluating -(90 % 7), but this doesn't seem to be the case as…
unclemeat
  • 5,029
  • 5
  • 28
  • 52
6
votes
3 answers

What is the Windows/cmd.exe equivalent of Linux/bash's $? -- the program exit/return code?

Possible Duplicate: How do I get the application exit code from a Windows command line? In Unix/bash, I can simply say: $ echo $? to find out the return/exit code of a program, both from interactive and non-interactive shells. Now, how can I do…
user10955
  • 161
  • 2
  • 8
6
votes
2 answers

MinGW + GCC on Windows and UTF-8 characters

I'm having a trouble with GCC compiler and Windows CMD because I can't see the UTF-8 characters correctly. I've the following code: #include #include int main() { char caractere; int inteiro; float Float; double…
Henrique Dias
  • 182
  • 4
  • 13
6
votes
1 answer

Skip an upcoming scheduled task just once using cmd

I'm in the process of automating the daily shutdown of the computers in my school's network. So far I have a batch file which works nicely and I would like to schedule it to run every day at a specific time, however occasionally I may want to skip…
Bets
  • 506
  • 2
  • 12
6
votes
6 answers

Start and run CANoe from Command Prompt

Is it possible to start and run Vector CANoe from the Command Prompt and/or by using any other external script?
6
votes
5 answers

How to use mkdir and rmdir commands in a java program

I want to use system commands like mkdir and rmdir while running a java program. How can I do that?
Andersson Melo
  • 764
  • 1
  • 13
  • 32
6
votes
1 answer

SQL localdb shared instance login failed for user

Edit: Solution I have figured out a solution by creating a login. Now each user can access that same shared instance. C:\Windows\system32>sqlcmd -S (localdb)\v11.0 1> use master 2> go Changed database context to 'master'. 1> create login [NT…
usman0x0
  • 61
  • 3
6
votes
1 answer

run 2 or more cmd command using system() in C++

I want to do two steps in my c++ program using system(). open the folder system("cd /d ...") run another program.exe However, it seems like when I run step2, the folder opened in step1 is already closed. What can I do to make sure that the…
user4029119
  • 145
  • 1
  • 4
  • 10
6
votes
5 answers

Not able to capture output by runas command

I have to automate test cases. Tasks:- Step:-Open administrative command prompt from powershell. Step:-Execute a batch file on the administrative command prompt. Step:-Batch file includes some set of commands, including a execution of an exe. For…
AJ-
  • 109
  • 1
  • 2
  • 10
6
votes
1 answer

Getting Java VisualVM data from the command line

I'll start off with saying that I have just about no experience with Java VisualVM. However, it contains the information that some developers would like to see. When I open it up for my application, it contains a graph for CPU, Memory, Classes,…
user2869231
  • 1,431
  • 5
  • 24
  • 53
6
votes
2 answers

Getting XCOPY to concatenate (append)

It it actually possible to get XCOPY to append, as per http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/xcopy.mspx?mfr=true To append files, specify a single file for destination, but multiple files for source (that is,…
ChrisJJ
  • 2,191
  • 1
  • 25
  • 38
6
votes
2 answers

How to add a REG_NONE empty value using Batch?

This registry script writes a REG_NONE empty value in the reg editor (which is represented as binary data): Windows Registry Editor Version 5.00 [HKEY_CURRENT_USER\keyname] "valuename"=hex(0): (the english translation of the data-description in…
ElektroStudios
  • 19,105
  • 33
  • 200
  • 417
6
votes
1 answer

How to release automatically your artifact to GitHub

I built a batch file to make Github releases from my CI server on AppVeyor. Everything works fine except when I try to upload my asset to Github. My skills don't help me very much. Is there a method to get my release id from cURL commands to use it…
Marocco2
  • 71
  • 7
6
votes
3 answers

How to correct variable overwriting misbehavior when parsing output?

I am checking for baseboard information in a batch file with the following code. BaseboardCheck.cmd: @echo off setlocal EnableDelayedExpansion for /f "tokens=1,2* delims==" %%a in ('wmic baseboard get /format:list') do ( if ["%%a"] EQU…
Thumper
  • 525
  • 1
  • 6
  • 21