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
1
vote
0 answers

Open url with parameters with cmd

I changed default program for .docx and set to myopenwith.bat So when I clicked to any docx, it will open with myopenwith.bat myopenwith.bat has this code: start firefox…
Aleksandar
  • 11
  • 1
1
vote
2 answers

Check if Second Level Address Translation (SLAT) is installed

There are different instructions online to show that you have Second Level Address Translation (SLAT) enabled as a dependency to install WSL 2 and Docker. The simplest way is to run "systeminfo.exe" in various Windows OS versions. How can I run…
JustBeingHelpful
  • 1,964
  • 7
  • 37
  • 53
1
vote
0 answers

using start /wait for a headless process in a batch file - any way to show the process is running?

So I have a large batch file, and in the middle it hits a start /wait command to run a silent install of an MSI. I'd like to have some animation or something to indicate that the batch file is in fact doing something, as it can take some minutes. Is…
1
vote
2 answers

how to stop, start and delete a windows service in cmd with a reference to the service name

how to stop/start a windows service in cmd with just a fragment of the service name. Example: NET STOP *part_of_name_of_service* NET START *part_of_name_of_service* For example. mysql has many versions of "the name of service".…
acgbox
  • 376
  • 1
  • 5
  • 21
1
vote
1 answer

language-neutral recursive takeown

In .bat files for Windows's cmd.exe, recursively taking ownership of a folder's content goes takeown /f foldername /r /d Y >nul: 2>&1 Problem is, it works only if in the current locale the word for Yes starts with the letter Y. E.g. it fails in…
fgrieu
  • 365
  • 4
  • 17
0
votes
1 answer

Re-Posting this - Terminal Server - Group Policy prevent command line [2]

The actual post was here but it was an old thread and I couldn't find an answer online or with the infrastructure guys from my company as most of them already left. I have a Windows 2008 Terminal Server. Terminal Server Configuration(licence server,…
0
votes
1 answer

How to get login username using task scheduler?

I have search similar article but don't have the correct answer. I have a schedule task using gpo which using %USERNAME% to get the current logged username but it returns the username which the task is running under, which is always the same user -…
K C Chin
  • 41
  • 2
0
votes
0 answers

scheduled task not running

i have a problem, created a scheduled task, to run a bat file. it's programmed to run with administrator credential, works in other tasks. the file is a normal bat file. the code inside the file is the following: @ECHO OFF REM …
0
votes
1 answer

can you sum within a function or use '!' within '!' in cmd?

Having some difficulty with the delayedexpansion in cmd. This might be a stupid question but is there any way of summing within a function (ie without 'set') or using ! within ! (or something to the same effect); for example could ~%%n+%y% in the…
0
votes
0 answers

How to delete all files and subfolders older than 5 days by cmd call

I use Windows. I want to delete all files and subfolders older than 5 days by system call. I have this command, but i want to delete all files and subfolders older than 5 days. FOR /D %i IN (C:\mydir*) DO RD /S /Q "%i" DEL /Q C:\mydir*.* Do you…
0
votes
1 answer

Move one file in a folder to another folder and rename?? Cmd?

I am hoping to get some help with this, I am thinking of using Command Line to do the following: Move ONE file in a folder (that has hundreds of files) to a new folder (new folder is the folder this folder is IN, so up one directory) Rename the…
0
votes
2 answers

Compter Management & Shared Folders

I'm trying to get a list of all "Volume Paths" for all shares on a remote NetApp server through PowerShell. WMI, CIM, WMIC, NET VIEW, NET SHARE, NET USE. I haven't been able to use any of those to get the path. When looking at Computer Management >…
0
votes
0 answers

CMD LDAP error Cannot connect to the LDAP server but connect success by c# code

I tried to search and use command line to test connection to LDAP server but it throw error "Cannot connect to the LDAP server" even at my local computer I use visual studio to debug code at my local computer and it connect successfully? So How to…
Pham X. Bach
  • 101
  • 1
  • 5
0
votes
1 answer

Command line argument to change security settings for running IE-instance only

Just curious to know: How to Enable ->Access data sources across domain<- in IE, using CMD only and NOT by changing the registry or group-policy. I know that the following command works for the Google-Chrome-Browser: chrome.exe…
0
votes
1 answer

Add a user to a domain group and set the user privileges to certain folder Win10

I have a user in my workplace domain, I want to add him to a specific domain group then assign him some privileges on a specific folder. I wonder how this can be done using command line or a more automated process than doing it step by step as I do…