Instant Download Windows CMD Command Syntax Unknown PDF All Chapter
Instant Download Windows CMD Command Syntax Unknown PDF All Chapter
com
DOWLOAD EBOOK
OR CLICK LINK
http://ebookstep.com/product/windows-cmd-command-
syntax-unknown/
https://ebookstep.com/product/windows-commands-complete-unknown/
https://ebookstep.com/product/windows-command-line-administrator-
s-pocket-consultant-second-edition-ebook-william-stanek/
https://ebookstep.com/product/under-his-command-carmen-
labohemian/
https://ebookstep.com/product/kekasih-di-fiore-christmas-at-the-
tycoon-s-command-jennifer-hayward/
Microsoft Windows Azure ■■■■■■■■■■ ■.■.
https://ebookstep.com/download/ebook-5693548/
https://ebookstep.com/download/ebook-43685728/
https://ebookstep.com/product/yog-vigyan-1st-edition-unknown/
https://ebookstep.com/product/windows-11-3rd-edition-jorg-hahnle/
https://ebookstep.com/product/mechanical-dept-formula-1st-
edition-unknown-2/
Windows CMD Command Syntax | SS64.com
Related:
( SS64 ) Search
Commands marked • are Internal commands only available within the CMD shell.
All other commands (not marked with •) are external commands.
External commands may be used under the CMD shell, PowerShell, or directly from START-RUN.
( SS64 ) CMD
Deployment tools
Windows 10 - ISO download
N edition = No Media Player or IE DRM or Camera.
KN edition = Korean
Windows Assessment and Deployment Kit (Windows ADK) - Customize Windows 10 images for large-scale
deployment.
Microsoft Deployment Toolkit (MDT) 2013 Update 2 [news] - Automate desktop and server OS deployments.
Microsoft Application Compatibility Toolkit - Evaluate and mitigate application compatibility issues for Vista and
Windows 7. Includes the Compatibility Administrator which can be used to set UAC exceptions (Application fix.)
Account Lockout Status (LockoutStatus.exe) - Display lockout information for a particular user account (Aug
2012).
Account Lockout and Management Tools - Includes LockoutStatus, plus tools to troubleshoot account lockouts,
and display password ages(Aug 2012).
Microsoft Baseline Security Analyzer - Scan local and remote systems for missing security updates.
File Checksum Integrity Verifier (FCIV) - Compute and verify cryptographic hash values for files.
Policy Analyzer from Aaron Margosis - Compare sets of Group Policy Objects (GPOs). Highlight redundant
settings or internal inconsistencies.
Group Policy Management Console SP1 & Group Policy Object Settings spreadsheet 2003/2008/2008R2/Win7
Local Administrator Password Solution (LAPS) - Manage local account passwords of domain joined computers
(howto)
Windows Help - Install Windows 7/8 Help, fix for 'Help not supported' errors.
WMI Diagnosis Utility - Diagnose and repair problems with the WMI service.
Recommended Books.
Windows 7 and Vista Guide to Scripting, Automation, and Command Line Tools
By Brian Knittel
A complete guide covering VBScript, traditional batch files, and PowerShell.
Package Managers
Chocolatey - Package manager for Windows
Ninite - Automate software installations and updates.
Utilities - GUI
Agent Ransack - File Search (search all file types)
AIMP3 - Fully featured free music player.
Autohotkey - Automate keystrokes, mouse clicks.
AutoIT - GUI scripting
CamStudio - Record screen and audio activity on your computer.
Clonezilla - Partition and disk imaging/cloning program
CPU-Z - gather information on system devices
Dban - Darik's Boot and Nuke, a boot CD that securely wipes hard disks.
Event Sentry - Event log monitoring
Find And Replace Text - Grep-like utility by Lionello Lunesu (Sourceforge link removed)
Flash uninstall - To allow a full 'clean' reinstall
FlashBlock - Content-filtering extension for Firefox
FileZilla - A cross-platform FTP, FTPS and SFTP client
foobar2000 - freeware audio player
Ghost Solution Suite - Disk / Partition Imaging
Inkscape - Vector Graphics (Illustrator)
imgburn.com - Free CD/DVD/Blu-ray burner
isoRecorder - Burn iso image to bootable CD
Krita - Open Source photo/graphics editor.
Lansweeper - Network Monitoring
Lost NT password
MakeMSI - Build Windows Installer files.
MalwareBytes - Anti Malware, detect and remove worms, Trojans, rootkits, etc.
Metapad - Simple notepad replacement
Notepad++ - Notepad replacement (n.b. the syntax highlighting for parentheses in CMD/BAT files is faulty.)
nLite - pre-installation Windows configuration
Photoshop Elements - Basic photo editing and organisation.
Trinity Rescue Kit - Recovery and repair of Windows machines
Netikus - Password, Ping, FTP, event log alerts.
Panda AntiVirus Free
PhotoRec - Data recovery software - hard disk, CD-ROM & Memory Cards
PuTTY - Free Telnet/SSH Client
Rapid Environment Editor - Edit environment variables
Servers Alive - Network monitoring
SoftPerfect - Search, Scan for open file shares and other utils.
Speccy - System information, hardware and software (serial numbers etc).
Sumatra - PDF viewer
Related
MS Support Q no's
913086 »
“We have prided ourselves on always being the cheapest guy on the block. We have always told our people we're the high volume, low
price guy in the software business" - Steve Ballmer (Partnering for Success)
You can get the value of any argument using a % followed by it's numerical position on the command line. The first item
passed is always %1 the second item is always %2 and so on
Parameter Extensions
When an argument is used to supply a filename then the following extended syntax can be applied:
we are using the variable %1 (but this works for any parameter)
%~p1 Expand %1 to a Path only e.g. \utils\ this includes a trailing \ which will be interpreted as an escape
character by some commands.
%~n1Expand %1 to a file Name without file extension C:\utils\MyFile or if only a path is present (with no trailing
backslash\) - the last folder in that path.
%~s1 Change the meaning of f, n, s and x to reference the Short 8.3 name (if it exists.)
%~$PATH:1 Search the PATH environment variable and expand %1 to the fully qualified name of the first match
found.
These parameter/ argument variables are always denoted with a single leading %
This is unlike regular variables which have both leading and trailing %'s such as %variable% , or FOR command variables
which use a single leading % on the command line or a double leading %% when used in a batch file.
Parameter expansion will treat a Full Stop within a directory name as a file extension, so for a name like "Sample 2.6.4 " the
output of %~n1 will be truncated to "Sample 2.6 " to return the whole folder name use %1 or %~nx1
If the output of DIR, or a filename with no drive letter/path is expanded to display a Full pathname %~f1 the command shell will
assume; often incorrectly; that the file resides in the current directory. The CMD shell does not read file descriptors, or work
with filesystem objects the way that PowerShell does, it is processing a simple list of text strings.
When writing batch scripts it's a good idea to store the values in a named variable SET _LogFile=%~dp1 , the rest of the script
can then refer to the easy-to-read variable name %_LogFile% This will also make life easier if you later need to change around
the order of the parameters.
Tokenization
Tokenization of the command line arguments is not always done by the cmd.exe shell. Most often the tokenization
is done by the newly formed processes' runtime, at the OS level, Windows passes a command line untokenized as
a single string to the new process. You can read more about the low-level details of the batch language/cmd
escaping from the excellent answers by jeb and dbenham on this StackOverflow question.
Passing by Reference
In addition to passing numeric or string values on the command line, it is also possible to pass a variable name
and then use the variable to transfer data between scripts or subroutines. Passing by reference is a slightly more
advanced technique but can be particularly useful when the string contains characters that are CMD delimiters or
quotes.
You can refer to other files in the same folder as the batch script by using this syntax:
CALL %0\..\SecondBatch.cmd
This can even be used in a subroutine, Echo %0 will give the call label but, echo "%~nx0" will give you the filename
of the batch script.
Other NTFS attributes not recognised by %%~aI can be read using FSUTIL usn command:
FILE_ATTRIBUTE_ENCRYPTED
FILE_ATTRIBUTE_NOT_CONTENT_INDEXED
FILE_ATTRIBUTE_SPARSE_FILE
---hs----
In programming terminology:
A parameter represents a value that the procedure expects you to pass when you call it.
An argument represents the actual value that you pass to a procedure.
In practice the phrases argument and parameter tend to be used interchangeably, CMD batch files do not perform
any type checking.
FOR parameters
The FOR command creates parameter variables which are identified with a letter rather than a number (e.g. %%G ).
The Parameter Expansions described above can also be applied to these.
To avoid confusion between the two sets of letters, avoid using the letters (a, d, f, n, p, s, t, x, z) as FOR
parameters or just choose a FOR parameter letter that is UPPER case.
So for example in a reference like %%~fG the %%G is the FOR parameter, and the ~f is the Parameter Expansion.
Examples:
Or as part of a CALL :
CALL MyBatch.cmd SMITH 100
Get the file size of C:\demo\sample.xlsx using the %~z parameter extension:
@Echo off
For %%G in ("C:\demo\sample.xlsx") do set _var=%%~zG
Echo File size is %_var%
“A gift is pure when it is given from the heart to the right person at the right time and at the right place, and when we expect nothing in
return” ~ The Bhagavad Gita
Related:
Calculator calc
dcomcnfg
Component Services or
comexp.msc
CompMgmtLauncher.exe
Computer Management or
compmgmt.msc
hdwwiz
Device Manager or
devmgmt.msc
dfrgui
Disk Defragmenter
defrag
IP Configuration ipconfig
control mouse
Mouse Properties or
main.cpl
control netconnections
Network Connections or
ncpa.cpl
Projector: netproj
Connect to Network Projector
Switch projector display displayswitch
Notepad notepad
Services services.msc
sysdm.cpl SystemProperties
System Properties or
sysdm.cpl DisplaySYSDMCPL
control userpasswords2
User Accounts (Autologon)
C:\Windows\System32\rundll32.exe
User Profiles - Edit/Change type
sysdm.cpl,EditUserProfiles
WordPad write
Unless indicated otherwise, all the commands above work in all versions of Windows from Vista upwards.
Most of these utilities can be found in %systemroot%\System32\
“The Macintosh uses an experimental pointing device called a 'mouse.' There is no evidence that people want to use these things” ~ John
Dvorak
Related
MMC Snap-ins
System Administrator command line shortcuts to popular Microsoft Management Consoles (MMCs).
The commands above can be entered from START > Run, or from the command line.
Availability will vary by OS and by the features installed.
“I don't do anything in order to cause trouble. It just so happens that what I do naturally causes trouble.
I'm proud to be a troublemaker” ~ Sinead O'Connor
Related:
Run Commands
shell:ProgramFilesX86
or the \Program Files folder on 32-bit Windows Explorer
Internet
Display the Control Panel shell:ControlPanelFolder
Explorer
Open the user‘s Start Menu\Administrative Tools Internet
shell:Administrative Tools Y
folder (if any) Explorer
shell:Immersive Application Internet
Display Metro App shortcuts (Windows 8) Shortcuts Explorer
shell:Common Administrative Internet
Open All Users Start Menu\Administrative Tools folder
Tools Explorer
Internet
Launches Internet Explorer Applets and applications shell:InternetFolder
Explorer
Open the Common Files for 32-bit programs stored on
64-bit Windows, Internet
shell:ProgramFilesCommonX86
Or the Program Files\Common Files folder on 32-bit Explorer
Windows
Open the Control Panel "Install a program from the shell:AddNewProgramsFolder
Internet
network" applet Explorer
Open the Control Panel "Uninstall or change a Internet
shell:ChangeRemoveProgramsFolder
program" applet Explorer
Internet
Open the default Sidebar Gadgets folder shell:Default Gadgets
Explorer
Internet
Open the hidden ImplicitAppShortcuts folder shell:ImplicitAppShortcuts Y
Explorer
Internet
Open the Internet Explorer Cookies folder shell:Cookies Y
Explorer
Internet
Open the Internet Explorer Favorites folder shell:Favorites Y
Explorer
Internet
Open the list of Network Connections shell:ConnectionsFolder
Explorer
Open the Program Files folder (same as Internet
shell:ProgramFiles
% PROGRAMFILES%) Explorer
Internet
Open the Program Files\Common Files folder shell:ProgramFilesCommon
Explorer
Internet
Open the Temporary Internet Files folder shell:Cache
Explorer
Internet
Open the user folder of downloaded Sidebar Gadgets shell:Gadgets
Explorer
Internet
Open the Windows Search tool shell:SearchHomeFolder
Explorer
Display public libraries, if any shell:PublicLibraries Library
Display your Music library shell:MusicLibrary Library
Display your Pictures library shell:PicturesLibrary Library
Display your Videos library shell:VideosLibrary Library
Open the Documents library shell:DocumentsLibrary Library
Unless indicated otherwise, all the shortcuts above work in all versions of Windows from Vista upwards.
Shell folder shortcuts can be used directly in the Windows Explorer Address bar: shell:Desktop
The START command does also accept Shell shortcuts with spaces but they have to be quoted like so:
C:\> start "" "shell:my music "
“You go away for a long time and return a different person - you never come all the way back” ~ Paul Theroux
Related
The values above can be found in the registry (as REG_EXPAND_SZ values)
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders
By default these all resolve to subfolders below %USERPROFILE% but they can be redirected to other locations.
The registry locations are always the same, but the files and folders may be in different places.
To provide backwards compatibility, in Windows 7 and above the old locations under C:\Documents and Settings contain
junction points (hidden, protected operating system files) which point to the new user-accessible folders.
* In Windows 10 the Start Menu items are held in a database that is stored under
C:\Users\accountname\AppData\Local\TileDataLayer this is proprietary, non user editable and limited to 500
shortcuts. It is also used for Cortana Search. The entire database can be copied between accounts - all or nothing.
The values above can be found in the registry (as REG_EXPAND_SZ values)
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders
The entries in this subkey can appear in both the Shell Folders subkey and the User Shell Folders and in both
HKLM and HKCU. The entries that appear in User Shell Folders take precedence over those in Shell Folders.
The entries that appear in HKCU take precedence over those in HKLM
Folder Redirection
Although it is possible to redirect any of these folders with Group Policy, not all options are fully supported,
for example redirecting IE favorites/cookies will result in very slow performance.
Examples
Echo %_startmenu%
Related:
Array variables
Unlike PowerShell, which fully supports arrays, there is no built in support for array variables within the CMD shell.
However with some effort you can replicate this functionality using a series of separate variables, named to
represent the array:
Set elem[1]=First element
Set elem[2]=Second one
Set elem[3]=The third one
To perform array indexing operations with these, use EnableDelayedExpansion and a reference like
!elem[%var%]!
this is explained fully in this StackOverflow Q/A.
COMSPEC
C:\Windows\System32\cmd.exe or if running a 32 bit WOW -
C:\Windows\SysWOW64\cmd.exe
DATE Y The current date using same region specific format as DATE.
FPS_BROWSER_APP_PROFILE_STRING
Internet Explorer
Default
FPS_BROWSER_USER_PROFILE_STRING
These are undocumented variables for the Edge browser in Windows
10.
Y
HighestNumaNodeNumber The highest NUMA node number on this computer.
(hidden)
HOMEDRIVE Y C:
HOMEPATH Y \Users\{username}
LOCALAPPDATA C:\Users\{username}\AppData\Local
LOGONSERVER \\{domain_logon_server}
NUMBER_OF_PROCESSORS Y The Number of processors running on the machine.
User
C:\Windows\System32\;C:\Windows\;C:\Windows\System32\Wbem;{plus
PATH and
program paths}
System
.COM; .EXE; .BAT; .CMD; .VBS; .VBE; .JS ; .WSF; .WSH; .MSC
PATHEXT
The syntax is like the PATH variable - semicolon separators.
AMD64/IA64/x86 This doesn't tell you the architecture of the processor
PROCESSOR_ARCHITECTURE Y but only of the current process, so it returns "x86" for a 32 bit WOW
process running on 64 bit Windows. See detecting OS 32/64 bit
PROCESSOR_ARCHITEW6432 = %ProgramFiles% (only available on 64 bit systems)
PROMPT
Code for current command prompt format,usually $P$G
C:>
PSModulePath %SystemRoot%\system32\WindowsPowerShell\v1.0\Modules\
Public C:\Users\Public
RANDOM Y A random integer number, anything from 0 to 32,767 (inclusive).
Terminal servers only - for a terminal server session, SessionName is a
%SessionName% combination of the connection name, followed by #SessionNumber. For
a console session, SessionName returns "Console".
SYSTEMDRIVE C:
By default, Windows is installed to C:\Windows but there's no guarantee
of that, Windows can be installed to a different folder, or a different drive
letter.
SYSTEMROOT
systemroot is a read-only system variable that will resolve to the correct
location.
NT 4.0, Windows 2000 and Windows NT 3.1 default to C:\WINNT
User C:\Users\{Username}\AppData\Local\Temp
TEMP and TMP
Variable Under XP this was \{username}\Local Settings\Temp
TIME Y The current time using same format as TIME.
Y
Set if a user is a logged on to a domain and returns the fully qualified
UserDnsDomain User
DNS domain that the currently logged on user's account belongs to.
Variable
USERDOMAIN {userdomain}
USERDOMAIN_roamingprofile
The user domain for RDS or standard roaming profile paths. Windows
8/10/2012 (or Windows 7/2008 with Q2664408)
USERNAME {username}
USERPROFILE
%SystemDrive%\Users\{username}
This is equivalent to the $HOME environment variable in Unix/Linux
Unless stated otherwise, all the variables above are System variables
By default, files stored under Local Settings do not roam with a roaming profile.
Dynamic environment variables are read-only and are computed each time the variable is expanded. When all variables are
listed with SET, these will not appear in the list. Do not attempt to directly SET a dynamic variable.
A child process by default inherits a copy of all environment variables from its parent, this makes environment
variables unsuitable for storing secret information such as API keys or user passwords, especially in rare
occasions like crashes where a crash log will often include the full OS environment at the time of the crash.
PowerShell/Get-Credential is a more secure approach.
“Men may be convinced, but they cannot be pleased against their will. But though taste is obstinate, it is very variable, and time often
prevails when arguments have failed” ~ Samuel Johnson
Related: