Questions tagged [windows-command-prompt]

Refers to the default CLI that ships with all versions of Windows, often shortened to just "command prompt" or cmd (after the file name of the executable).

Refers to the default CLI that ships with all versions of Windows, often shortened to just "command prompt" or cmd (after the file name of the executable).

383 questions
3
votes
3 answers

Get folder and file names and store it in a variable in windows?

I have a folder folder1 contain 3 files file1, file2 and file3, etc. I need command line to do the following task. Store the name of the files in a variable because I want to write a dynamic batch.
3
votes
1 answer

print exit code in cmd in windows os

print exit code in cmd in windows os ....some command return exit code ...where this code store...and i want to print this exit code and assign it to variable
3
votes
3 answers

Executing a long command at the windows xp command prompt

Im using WindowsXP and i want to run the following command: tomcat6 //IS//AlfrescoTomcat --DisplayName="Alfresco Community Edition" \ --Description="Alfresco Tomcat Bundle - Repository and Share"…
Jim
3
votes
4 answers

windows-server-2003, windows server, download utility from command line , http or ftp or any other protocol , from one command only

I need to know if there is a utility built-in to Windows Server 2003 that I can use from the command line to download a file using only one command. Basically I know that I can download from ftp using the ftp utility but in order to do that I need…
3
votes
1 answer

echo %time% duplicate outputs

I have a command that adds the timestamp at the beginning and the end (echo %time% & #other command# & echo %time%). However, the %time% will be the same, regardless of how long the command took to execute. example output: Time start:…
JessaCrow
  • 31
  • 1
3
votes
3 answers

How to get all processes under a session of a particular process that is using a port in Windows cmd

I want to list and kill all processes belonging to a session of a particular process that is using a port. This should happen through a windows batch command that would accept a port number as input. For example: Let us say a process PA is currently…
3
votes
1 answer

Get error code of last shell command

Using bash, the exit code of the last thing that executed is stored in the $? shell variable: foo bar echo $? # prints exit code of `bar` baz echo $? # prints exit code of `baz` Is there an equivalent way to get this value if I'm running a…
Kyle Kaitan
2
votes
3 answers

Windows Server "Core" Reopen CMD Window In Nested RDC

This question is very like this other: Open a new cmd console on Windows 2012 Server core after closing the last one? With one key difference that is not addressed in the other and which I have not been able to figure out through web searching. The…
2
votes
0 answers

Strange character inside dates in "net user" command output

When running the net user username /domain command in cmd, all the dates (Password last set, Password expires, Password changeable and Last logon) have a strange character before the individual dates numbers, like: Password last set …
Goozak
  • 121
  • 4
2
votes
2 answers

Change Registry Key Permissions Access Control List using only Command Prompt

I am trying to change the Access Control permissions on a specific registry key i'm generating using a batch file. I try using regini.exe to pull the configuration from a .ini file and run into issues. I keep getting this error: …
2
votes
1 answer

mklink folders from Windows server to AIX

We need to make a softlink to other server on AIX and when doing accordingly to guide in cmd occurs an error mklink /D \\10.0.0.10\folder C:\folder and it returns - The request is not supported But vice versa mklink /D C:\folder…
2
votes
0 answers

Autocomplete in CMD.exe from psexec

I am not sure if this is the best place to ask. But I am just wondering if it is possible to have autocomplete in cmd.exe / powershell.exe spawned by psexec.exe? For example: psexec \\127.0.0.1 -u user -p pass cmd.exe Will spawn a cmd.exe on remote…
2
votes
1 answer

Disabling a CMD command for a User

Let's say there are two accounts on Windows, Admin and User. Im running a program which shutdowns system in some ammount of time (using shutdown /s /t). Is there any way to disable shutdown -a for a User? (Except situation where i disable cmd for…
2
votes
2 answers

How can I join a Windows Server 2016 Datacenter Core to a domain?

I want to join a Windows Server 2016 Datacenter Core (Command-Only) to a domain (Which is also using Windows Server 2016 Datacenter). Domain name: rsft.net Username (Both servers): Administrator Password (Both servers): Aa1234 I tried some "netdom"…
2
votes
1 answer

Run a batch file from network shared folder depending on MS outlook bit version

Hello I'm trying to figure out on how to Run a file from network, basically it's located from \10.18.xx.xx\installers\install.bat, so yeah It's gonna prompt a username and password when I locate it manually. What are the codes the I should use in…