Professional Documents
Culture Documents
2011
Version 4.0.0 RC (April 2011) [1200+ Commands]
Ebook is updating at least twice per month. Get the latest version: (PDF)
http://bit.ly/wcgpdf / (XPS) http://bit.ly/wcgxps.
Welcome to the “Windows Command Guide”. Here you will get all types of Windows
commands, tips and tricks useful for Microsoft Windows. This ebook is useful for all Windows
st
version from Windows 2000 to Windows 7 or later. The 1 part (550+ commands) of this
nd
ebook is for everyday computer user and the 2 part (700+ commands) is for advance user
and power user. Read this ebook and explore the precious contents inside.
About
As a computer user you may know about some commands. This ebook includes
every possible commands those available on Windows platform. The objective of the ebook is
to do more on Windows with less effort and became an expert. There are many long and
irregular commands, commonly you may not use it frequently – but these exist whether you
know it or not.
Only article (in the World) providing great info on Windows Commands.
Organized for the best use of comman user and advance user.
Every possible command (1200+) with useful connotations ans references.
DEDICATED TO
Teachers, Friends, IT Pro community, valuable Readers and
Contributors.
Acknowlegdements
I would like to thanks to all the readers and IT Pro community the use, technical
reviews and feedbacks. Special complements to Mr. Manas Ranjan Mohaptra (of Hint),
Santosh, Subrat, Biswanath, Sudhansu, Himansu, Soumya and Amarnath, for their excellent
contribution and support. Also thanks to Box.net and Blogger.com for providing web services
for these works.
License
This content is completely free for everyone. This ebook licensed under Creative
Commons Attribution-NonCommercial-ShareAlike 2.5 India license [CC BY-NC-SA]. This
ebook must be shared in “Adobe PDF” or “Microsoft XPS” format. Language: EN-US.
Disclaimer
This ebook is for educational and informational purposes. This ebook is provided as
“as is”. The author assumes that you will use it for productive purposes. All names,
registered trademarks and websites mentioned herein are the properties of their respective
owners.
The Author
bcdalai, (M.Com, MCP, MCSE, MCTS: Vista and MCTS: Windows 7). The author is
an IT Pro, working on Client, Server and Networks (system admin, Tech. Support, security,
troubleshooting and software review). He is available in Microsoft communities and in other
forums. You can find about him on internet (in Google/Yahoo).
Reach Out
Do you have more information or tips? Please contribute here with suggestions / comments
using Adobe Reader X (v10) and email. For any feedback on the ebook, contact author at:
http://bcdalai.blogspot.com, Email: bcdalai2020@gmail.com, Twitter: @bcdalai2020.
No great discovery was ever made without a bold guess. -Isaac Newton
Experience is the name everyone gives to their mistakes. -Oscar Wilde
Persistence and positive thinking to make things happen.
-2-
© 2011, BCDALAI's Free Tech. Support Blog
Windows Command Guide 2011
CONTENTS
PART – 1 (Everyone)
Chapter – 1
Windows RUN Commands
RUN Commands in Windows Vista
RUN Commands in Windows Server 2008 / 2008 R2
RUN Commands in Windows 7
Network RUN Commands
Chapter – 2
RUN Commands for Third-party Applications
Control Panel (applets) Commands
Command-line Tools:
Windows 2000 / XP / Server 2003
Windows Vista / Server 2008 / 2008 R2 /Windows 7
-3-
© 2011, BCDALAI's Free Tech. Support Blog
Windows Command Guide 2011
PART – 1 (Everyone)
[Applies To: Common user, beginners and everyone.]
Chapter – 1
Windows RUN Commands
Table-1: [Applies To: Windows 2000 / XP / Server 2003 / Vista / Server 2008 / Windows 7.]
SL. APPLICATION / TOOL COMMAND Ref
001 Accessibility Controls access.cpl I
002 Accessibility Wizard accwiz X
003 Add Hardware Wizard hdwwiz.cpl
004 Add/Remove Programs appwiz.cpl
005 Administrative Tools control admintools
006 Automatic Updates wuaucpl.cpl I
007 Bluetooth Transfer Wizard fsquirt
008 Calculator calc
009 Certificate Manager Console certmgr.msc
010 Character Map charmap
011 Clipboard Viewer clipbrd X
012 Command Prompt cmd
013 Component Services (DCOM/COM+ settings) dcomcnfg
014 Computer Management Console compmgmt.msc
015 Control Panel control
016 Date and Time Properties control date/time
017 Date and Time Properties timedate.cpl
018 DDE Shares ddeshare X
019 Device Manager Console devmgmt.msc
020 DirectX Diagnostic Tool dxdiag
021 Disk Cleanup Utility (Appendix-A2) cleanmgr
022 Disk Defragment Console dfrg.msc I
023 Disk Management Console diskmgmt.msc
024 Disk Partition Manager diskpart
025 Display Properties control desktop I
026 Display Properties desk.cpl I
027 Display Properties (Appearance tab pre-selected) control color
028 Dr. Watson System Troubleshooting Utility (16-bit) drwatson
029 Dr. Watson System Troubleshooting Utility (32-bit) drwtsn32 X
030 Driver Verifier Utility verifier
031 DVD Placeholder Utility (playing DVD in WMP) dvdplay
032 Event Viewer eventvwr
033 Event Viewer eventvwr.msc
034 File Signature Verification Tool sigverif
035 Files and Setting Transfer Wizard migwiz
036 Folders Properties control folders
037 Fonts Folder control fonts
038 Fonts Folder fonts
039 Game Controllers joy.cpl
040 Game: Free Cell freecell X
041 Game: Hearts Card Game mshearts X
042 Game: Internet Backgammon bckgzm X
043 Game: Internet Checkers chkrzm X
044 Game: Internet Hearts hrtzzm X
045 Game: Internet Reversi rvsezm X
046 Game: Internet Spades shvlzm X
047 Game: Minesweeper winmine X
048 Game: Pinball pinball X
049 Game: Solitaire sol X
050 Game: Spider Solitaire spider X
051 Group Policy Object Editor gpedit.msc
052 Help and Support Center helpctr X
-4-
© 2011, BCDALAI's Free Tech. Support Blog
Windows Command Guide 2011
-5-
© 2011, BCDALAI's Free Tech. Support Blog
Windows Command Guide 2011
-6-
© 2011, BCDALAI's Free Tech. Support Blog
Windows Command Guide 2011
-7-
© 2011, BCDALAI's Free Tech. Support Blog
Windows Command Guide 2011
-8-
© 2011, BCDALAI's Free Tech. Support Blog
Windows Command Guide 2011
-9-
© 2011, BCDALAI's Free Tech. Support Blog
Windows Command Guide 2011
- 10 -
© 2011, BCDALAI's Free Tech. Support Blog
Windows Command Guide 2011
42 WINS winsmgmt.msc
ADDENDA
[IP Configuration (ipconfig.exe) usage see (Appendix-A5]
43 IP Config: display all the DHCP Class ID ipconfig /showclassid
44 IP Config: display all the Ipv6 DHCP Class ID ipconfig /showclassid6
45 IP Config: display DNS resolver cache ipconfig /displaydns
46 IP Config: display full configuration information ipconfig /all
47 IP Config: modifies DHCP Class ID ipconfig /setclassid
48 IP Config: modifies the Ipv6 DHCP Class ID ipconfig /setclassid6
49 IP Config: purges the DNS Resolver cache ipconfig /flushdns
50 IP Config: refreshes DHCP & re-registers DNS ipconfig /registerdns
51 IP Config: release Ipv4 address for the adapter ipconfig /release
52 IP Config: release Ipv6 address for the adapter ipconfig /release6
53 IP Config: renew address for all the adapter ipconfig /allcompartments /renew
54 IP Config: renew Ipv4 address for the adapter ipconfig /renew
55 IP Config: renew Ipv6 address for the adapter ipconfig /renew6
56 IP Config: display all adapter Configuration ipconfig /allcompartments /all
Chapter – 2
RUN Commands for Third-party Applications
Table-6: [Applies To: 3rd party applications. These apps must be installed, to make the
commands to work.]
SL. APPLICATION / UTILITY COMMAND
001 7-Zip 7zfm
002 ABBYY FineReader 10 Professional finereader
003 AC97 Audio Configuration alsndmgr.cpl
004 ACDSee Canvas 11 canvas11
006 ACDSee Canvas 12 with GIS plus canvas12
005 ACDSee FotoSlate v4 fotoslate4
007 ACDSee Photo Manager 2008 v10 acdsee10
008 ACDSee Photo Manager 2009 v11 acdsee11
009 ACDSee Photo Manager v12 (2010) acdsee12
010 ACDSee Picture Frame Manager v1 acdseepfm
011 ACDSee Pro v2 (by ACDSee) acdseepro2
012 ACDSee Pro v2.5 acdseepro25
013 ACDSee Pro v3 acdseepro3
014 ACDSee Pro v4 acdseepro4
015 ACDSee Showroom (slideshow) acdseesr
016 Acrobat Distiller (by Adobe) acrodist
018 Adobe Acrobat acrobat
019 Adobe Bridge CS5 bridge
020 Adobe Captivate 5 adobecaptivate
021 Adobe Contribute CS5 contribute
023 Adobe Dreamweaver CS5 dreamweaver
022 Adobe Fireworks CS5 fireworks
024 Adobe Flash Builder v4.0 flashbuilder
025 Adobe Flash Professional CS5 flash
026 Adobe FlashPaper flashprinter
027 Adobe Illustrator CS5 illustrator
017 Adobe ImageReady CS imageready
028 Adobe InDesign CS5 (formerly PageMaker) indesign
029 Adobe LiveCycle Designer formdesigner
030 Adobe PageMaker 6.5 pm65
031 Adobe PageMaker 7 (now InDesign CS) pm70
032 Adobe Photoshop CS5 Extended photoshop
033 Adobe Reader (both x86 and x86) acrord32
034 Alcohol 120% / Alcohol 50% alcohol
035 Apple iTunes (Media Player) itunes
036 Apple QuickTime (by Apple Inc.) quicktimeplayer
037 Apple QuickTime (Control Panel settings) quicktime.cpl
038 Babylon (Dictionary) babylon
- 11 -
© 2011, BCDALAI's Free Tech. Support Blog
Windows Command Guide 2011
- 12 -
© 2011, BCDALAI's Free Tech. Support Blog
Windows Command Guide 2011
- 13 -
© 2011, BCDALAI's Free Tech. Support Blog
Windows Command Guide 2011
- 14 -
© 2011, BCDALAI's Free Tech. Support Blog
Windows Command Guide 2011
- 15 -
© 2011, BCDALAI's Free Tech. Support Blog
Windows Command Guide 2011
Command-line Tools
Table-8: [Applies To: Windows 2000, XP and Server 2003. Also for Vista, Server 2008, 2008 R2,
Windows 7 and later). To know more about command-line options use /? switch after a command.]
Windows 2000 / XP / Server 2003
SL. COMMANDS COMMAND USAGES
001 append Allows programs to open data files in specified directories as if they were in the
current directory.
002 arp Displays and modifies the IP-to-Physical address translation tables used by
address resolution protocol (ARP).
003 at The AT command schedules commands and programs to run on a computer at
a specified time and date. The Schedule service must be running to use the AT
command.
004 atmadm Windows ATM Call Manager Utility.
005 attrib Attribute Utility. Displays or changes file attributes.
006 auditusr Audit User Program. Sets per user auditing policy.
007 bootcfg Boot Config Tool. Modifies the Boot.ini file for boot configuration and recovery.
This command line tool can be used to configure, query, change or delete the
boot entry settings in the BOOT.INI file.
008 blastcln Microsoft Blaster/Nachi removal tool.
009 cacls Control ACLs Program. Displays or modifies access control lists of files.
010 chkdsk Check Disk Utility. Checks a disk for logical file system error and displays a
status report.
011 chkntfs NTFS Volume Maintenance Utility. Displays or modifies the checking of disk at
boot time.
012 cipher File Encryption Utility. Displays or alters the encryption of directories [files] on
- 16 -
© 2011, BCDALAI's Free Tech. Support Blog
Windows Command Guide 2011
NTFS partitions.
013 cmd Windows Command Processor. Performs text-based (command-line) functions.
014 comp File Compare Utility. Compares the contents of two files or sets of files.
015 compact File Compress Utility. Displays or alters the compression of files on NTFS
partitions.
016 convert File System Conversion Utility. Converts FAT volumes to NTFS.
017 cscript Windows Script Host command line mode.
018 defrag Disk Defragmenter Module. Disk defragmenter commands-line tool.
019 diantz Microsoft Cabinet Maker.
020 diskpart Disk partitioning Application. Manages partitions on hard disk volumes. The
variable device is the device name for a new partition (such as
\device\harddisk0\partition1). The variable size is the size, in megabytes.
021 diskperf Disk Performance Configuration Utility.
022 doskey Keyboard History Utility. Edits command lines, recalls Windows XP commands
and creates macros.
023 driverquery Driver Query. Enables an administrator to enumerate and display the list of
installed device drivers as well as their properties.
024 edlin Edlin. A line-oriented text editor.
025 esentutl Server Database Storage Utilities. Maintenance utilities for Microsoft Windows
databases.
026 eventcreate Event Create. This command line tool enables an administrator to create a
custom event ID and message in a specified event log.
027 eventtriggers Event Triggers. This command-line tool enables an administrator to display and
configure “Event Triggers” on local or remote system.
028 exe2bin Converts .EXE (executable) files to binary format.
029 expand LZ Expansion Utility. Microsoft File Expansion Utility. Expands one or more
compressed files. This command is used to retrieve compressed files from
distribution disks.
030 fc DOS 5 File Compare Utility. Compares two files or sets of files and displays the
differences between them.
031 find Searches for a text string in a file or files. If a path is not specified, FIND
searches the text typed at the prompt or piped from another command.
032 findstr Searches for strings in files.
033 finger TCPIP Finger Command. Displays information about a user on a specified
system running the Finger service. Output varies based on the remote system.
034 fltmc Filter Manager Control Program.
035 forcedos Force DOS Execute Utility.
036 fsutil File system management utility.
037 ftp File Transfer Program. Uploads/downloads files on a network. This command
helps you determine whether Application layer functions can work on the
network.
038 getmac Get MAC Address. This command line tool enables an administrator to display
the MAC address for one or more network adapters on a system.
039 gpresult Query RSOP Data. Group Policy Result tool.
040 gpupdate Microsoft Group Policy Refresh Utility. Refreshes Policy settings.
041 help Command Line Help Utility for Windows XP commands.
042 ipconfig IP Configuration Utility. Shows the IP configuration of network adapters installed
in a computer. From the results of this command, you can determine whether
you have incorrectly addressed the adapter or the default gateway or whether
the adapter was unable to obtain an address from the DHCP server. Use the /all
switch to show all IP configuration information.
043 ipsec6 IPv6 Security Configuration Utility. (Not for Windows 7 or later).
044 ipv6 IPv6 Configuration Utility. (Not for Windows 7 or later).
045 ipxroute NWLink IPX Routing and Source Routing Control Program.
046 label Disk Label Utility. Creates, changes, or deletes the volume label of a disk.
047 lodctr Updates Performance Monitor counter names and explain text for an extensible
counter.
048 logman Logman manages the “Performance Logs and Alerts” service for creating and
managing Event Trace, Session logs and Performance logs.
049 logoff Session Logoff Utility.
050 lpd TCP/IP Lpq Command. Displays the state of a remote lpd queue.
051 lpr TCP/IP Lpr Command. Sends a print job to a network printer. Executes a print
job on a network printer.
052 makecab Microsoft Cabinet Maker.
053 mmcperf MMC Performance Tool.
- 17 -
© 2011, BCDALAI's Free Tech. Support Blog
Windows Command Guide 2011
054 mountvol Mount Volume Utility. Creates, deletes, or lists a volume mount point.
055 mqbkup Windows NT, Microsoft Message Queue (MSMQ) Backup/Restore Utility.
056 mrinfo Multicast Information.
057 msg Message Utility. Send a message to a user.
058 nbtstat TCP/IP NetBIOS Information. Displays protocol statistics and current TCP/IP
connections using NBT (NetBIOS over TCP/IP). Similar to netstat, except that it
resolves NetBIOS names to IP addresses.
059 net Windows net Command.
060 netsh Network Shell Command. Network Services shell Command. (See Chapter-3)
061 netstat TCP/IP Netstat Command. Displays protocol statistics and current TCP/IP
network connections. Displays Transmission Control Protocol/Internet Protocol
(TCP/IP) connections and protocol statistics.
062 nlsfunc Loads country-specific information.
063 nslookup Show and configure DNS information and settings. Checks DNS entries.
064 openfiles Enables an administrator to list or disconnect files and folders that have been
opened on a system.
065 pathping TCP/IP PathPing Command.
066 ping TCP/IP Ping Command. Uses an echo command to establish whether packets
can be routed at the Network layer on a network.
067 ping6 Ipv6 Ping Command. (Not for Windows 7 or later).
068 powercfg Power Settings Command-Line Tool. This command line tool enables an
administrator to control the power settings on a system.
069 print Prints a text file.
070 proxycfg Microsoft WinHTTP Default Proxy Configuration Tool.
071 qappsrv Query Terminal Server Utility. Displays the available application terminal servers
on the network.
072 qprocess Query Process Utility. Displays information about processes.
073 qwinsta Display information about Terminal Sessions.
074 rasdial Remote Access Client Side Command Line Dial UI.
075 rcp Copies files to and from computer running the RCP service.
076 recover Recover Files Utility. Recovers readable information from a bad or defective
disk.
077 reg Registry Console Tool. Console Registry Tool for Windows.
078 regsvr32 Microsoft Register Server. This command-line tool registers .dll files as
command components in the registry.
079 regwiz Windows XP Registration Wizard. Use /r switch to register Windows.
080 relog Relog creates new performance logs from data in existing performance logs by
changing the sampling rate and/or converting the file format. Supports all
performance log formats, including Windows NT 4.0 compressed logs.
081 replace Replace File Utility. Replaces files.
082 reset Terminal Services Reset Utility.
083 rexec TCP/IP Remote Exec Command. Runs commands on remote hosts running the
REXEC service. Rexec authenticates the user name on the remote host before
executing the specified command.
084 route Manipulates network routing tables.
085 rsm Removable Storage Manager Command Line Interface.
086 runas Run As Utility.
087 rwinsta Reset Session Utility. Reset the session subsystem hardware and software to
known initial values.
088 sc A tool to aid in developing services for Windows NT. SC is a command line
program used for communicating with the NT Service Controller and services.
089 schtasks Schedule Tasks. Enables an administrator to create, delete, query, change, run
and end scheduled tasks on a local or remote system. Replaces at.exe.
090 secedit Windows Security Configuration Editor Command Tool.
091 setver Sets the version number that MS-DOS report to a program.
092 sfc Windows XP Windows File Checker. Scans all protected system files and
replaces incorrect versions with correct Microsoft versions.
093 shadow Monitor another Terminal Services session.
094 shutdown Windows Remote Shutdown Tool.
095 sort Sort Utility.
096 subst Associates a path with a drive letter.
097 systeminfo System Information. This command line tool enables an administrator to query
for basic system configuration information.
098 taskkill Kill Process. This command line tool can be used to end one or more processes.
Processes can be killed by the process id or image name.
- 18 -
© 2011, BCDALAI's Free Tech. Support Blog
Windows Command Guide 2011
099 tasklist This command line tool displays a list of application(s) and associated
task(s)/process(es) currently running on either a local or remote system.
100 telnet Microsoft Telnet Client. Establishes a character-based session with a Telnet
server across a network. This command helps you determine whether Session
layer functions can work on a network.
101 tftp Trivial File Transfer Protocol App. Transfers files to and from a remote computer
running the TFTP service.
102 tlntadmn Telnet Administration. Telnet Server Admin Tool.
103 tracerpt Event Trace Report Tool. Tracerpt processes binary Event Trace Session log
files or real-time streams from instrumented Event Trace providers and creates a
report or a text (CSV) file describing the events generated.
104 tracert TCP/IP Traceroute Command. Shows all the routing hops that a packet takes to
reach a destination on a network.
105 tracert6 Ipv6 Traceroute Command. (Not for Windows 7 or later).
106 tscon Session Connection Utility. Attaches a user session to a terminal session.
107 tsdiscon Session Disconnection Utility. Disconnects a terminal session.
108 tskill Terminal Services End Process Utility. Ends a process.
109 tsshutdn System Shutdown Utility. Shut down a server in a controlled manner.
110 typeperf Command line performance monitor. Typeperf writes performance data to the
command window or to a log file. To stop Typeperf, press CTRL+C.
111 tzchange Time zone change tool. A command Line utility to make time zone changes.
112 unlodctr Unload PerfMon Counters. Removes counter names and explain text for the
specified extensible counter.
113 vssadmin Command Line Interface for Microsoft Volume Shadow Copy Service.
114 w32tm Windows Time Service Diagnostic Tool.
115 winmsd System Information. Replaced by msinfo32.exe.
116 winver Windows Version Checking Tool.
117 wscript Windows Script Host GUI mode.
118 xcopy Copies files and directory trees.
Command-line Tools
Table-9: [Applies To: Vista, Windows Server 2008, 2008 R2 and Windows 7. These new are also
additional for table-8.]
Windows Vista /Server 2008 / 2008 R2 /Windows 7
SL. COMMANDS COMMAND USAGES
01 auditpol Configure, create, backup and restore audit policies on any computer in the
organization from the command line with verbose logging. Replaces auditusr.exe.
02 bcdboot Used to initialize the Boot Configuration Data (BCD) store and copy boot
environment files to the system partition.
03 bcdedit Edit the Boot Configuration Data Store.
04 bitsadmin BITS administration utility.
05 change Change terminal server settings for logons, COM port mappings and install mode.
06 chglogon Enable or disable session logons.
07 chgport List or change COM port mappings for DOS application compatibility.
08 chgusr Change install mode.
09 choice Allow users to select one item from a list of choices and return the index of the
selected choice.
10 clip Redirect the output of command-line tools to the Windows Clipboard.
11 cmdkey Create, display, and delete stored user names and passwords.
12 diskpart Expanded to support hard disks with the GUID Partition Table, and a new “shrink”
command has been added which facilitates shrinking a pre-existing NTFS
partition.
13 diskraid Launch the diskraid application.
14 dispdiag Display diagnostics information.
15 forfiles Select a file (or files) and execute a command on that file.
16 icacls Display or modify access control lists (ACLs) of files; an updated version of cacls.
17 iscsicli The Microsoft iSCSI Initiator.
18 isoburn Windows Disc Image Burning Tool.
19 manage-bde Used to manage BitLocker encrypted volumes.
20 mklink Create, modify and delete junctions, hard links, and symbolic links.
21 muiunattend The MUI Unattended Action.
22 netcfg The WinPE Network Installer.
23 ocsetup The Windows Optional Component Setup.
- 19 -
© 2011, BCDALAI's Free Tech. Support Blog
Windows Command Guide 2011
- 20 -
© 2011, BCDALAI's Free Tech. Support Blog
Windows Command Guide 2011
Chapter –3
Advance rundll32 Commands
Table-10: [Notes: Internal Windows commands based on the rundll32.exe file, to run the specific
Option / Action / Feature.]
Windows 2000 / XP / Server 2003
01 Accessibility Options
rundll32 shell32.dll,Control_RunDLL access.cpl
02 Add/Remove Programs: (Change or Remove Programs)
rundll32 shell32.dll,Control_RunDLL appwiz.cpl,,0
03 Add/Remove Programs: (Add New Programs)
rundll32 shell32.dll,Control_RunDLL appwiz.cpl,,1
04 Add/Remove Programs: (Add/Remove Windows Components)
rundll32 shell32.dll,Control_RunDLL appwiz.cpl,,2
05 Add/Remove Programs: (Set Programs Access and Defaults) *
rundll32 shell32.dll,Control_RunDLL appwiz.cpl,,3
06 Desktop Property: Themes Tab
rundll32 shell32.dll,Control_RunDLL desk.cpl
07 Desktop Property: Desktop Tab
rundll32 shell32.dll,Control_RunDLL desk.cpl,,0
08 Desktop Property: Screen Saver Tab
rundll32 shell32.dll,Control_RunDLL desk.cpl,,1
09 Desktop Property: Appearance Tab
rundll32 shell32.dll,Control_RunDLL desk.cpl,,2
10 Desktop Property: Settings Tab
rundll32 shell32.dll,Control_RunDLL desk.cpl,,3
11 Device Manager
rundll32 devmgr.dll DeviceManager_Execute
12 Folder Options
rundll32 shell32.dll,Options_RunDLL
13 Forgotten Password Wizard(Create a password reset disk)
rundll32 keymgr.dll,PRShowSaveWizardExW
14 Game Controller
rundll32 Shell32.dll,Control_RunDLL joy.cpl
15 Hibernate
rundll32 powrprof.dll,SetSuspendState
16 IE –Content Advisor
rundll32 msrating.dll,RatingSetupUI
17 Control Panel
rundll32 shell32.dll,Control_RunDLL
18 IE –Delete All (Browsing History – IE7 or later)
rundll32 InetCpl.cpl,ClearMyTracksByProcess 255
19 IE –Delete Cookies
rundll32 InetCpl.cpl,ClearMyTracksByProcess 2
20 IE –Delete Form Data
rundll32 InetCpl.cpl,ClearMyTracksByProcess 16
21 IE –Delete Files and Settings Stored by Add-Ons
rundll32 InetCpl.cpl,ClearMyTracksByProcess 4351
22 IE –Delete History
rundll32 InetCpl.cpl,ClearMyTracksByProcess 1
23 IE –Delete Passwords
rundll32 InetCpl.cpl,ClearMyTracksByProcess 32
24 IE –Delete Temporary Internet Files
rundll32 InetCpl.cpl,ClearMyTracksByProcess 8
25 Lock Screen (Lock Computer)
rundll32 user32.dll,LockWorkStation
26 Map Network Drives
rundll32 Shell32.dll,SHHelpShortcuts_RunDLL Connect
- 21 -
© 2011, BCDALAI's Free Tech. Support Blog
Windows Command Guide 2011
- 22 -
© 2011, BCDALAI's Free Tech. Support Blog
Windows Command Guide 2011
- 23 -
© 2011, BCDALAI's Free Tech. Support Blog
Windows Command Guide 2011
Netsh Commands
For Administrators: netsh (The Network Services shell) is a command-line scripting utility
that allows you to, either locally or remotely, display or modify the network configuration of a currently
running computer. When you run netsh from the Cmd.exe command prompt, netsh uses the following
syntax. Used without parameters, netsh opens the Netsh.exe command prompt (that is, netsh>).
[Notes: Netsh Syntax - for backward compatibility, you can use netsh interface ip in place of netsh
interface ipv4. For IPv6 Netsh commands, you must specify IPv6. Note also for static settings, the
interface name is simply local area connection. The syntax name="local area connection” is acceptable
but not necessary. For dynamic configuration you need to use name="local area connection”.]
Syntax
netsh [-a AliasFile] [-c Context] [-r RemoteComputer] [{NetshCommand|-f ScriptFile}]
Parameters
-a :Returns you to the netsh prompt after running AliasFile.
AliasFile :Specifies the name of the text file that contains one or more netsh commands.
-c :Changes to the specified netsh context.
Context :Specifies the netsh context. The following table lists the available netsh contexts.
Example commands:
To display all of the adapters in the computer with their current IP addresses:
- 24 -
© 2011, BCDALAI's Free Tech. Support Blog
Windows Command Guide 2011
- 25 -
© 2011, BCDALAI's Free Tech. Support Blog
Windows Command Guide 2011
- 26 -
© 2011, BCDALAI's Free Tech. Support Blog
Windows Command Guide 2011
- 27 -
© 2011, BCDALAI's Free Tech. Support Blog
Windows Command Guide 2011
Environment Variables
Environment variables are strings that contain information such as drive, path, or file name.
They control the behavior of various programs. For example, the TEMP environment variable specifies
the location in which programs place temporary files. Any user can add, modify, or remove a user
environment variable. However, only an administrator can add, modify or remove a system environment
variable.
Using System in Control Panel, you can customize the following variables:
1. User management Environment Variables for logged_on_user_name: The user environment
variables are different for each user of a particular computer. The variables include any that are set
by the user, as well as any variables defined by programs, such as the path to the location of the
program files.
2. System path Environment Variables: Administrators can change or add environment variables
that apply to the system, and thus to all system users. During installation, Windows Setup
configures the default system variables, such as the path to the Windows files.
3. Discrete value Environment Variable: These are generally expanded to discrete values, such as
the current working directory, the current date, or a random number. Some of these are true
environment variable and will be expanded by all functions that handle environment variables.
These variables are not case sensitive.
Table-12: [[Applies To: All versions of Windows. These commands are for admin purposes, advanced
usersand may not launch from command prompt / RUN.]
User management Environment Variables
Sl. Environment Variable USAGES
01 %ALLUSERSPROFILE% In XP: C:\Documents and Settings\All Users
In Vista: C:\ProgramData
02 %APPDATA% Contains the full path to the Application Data folder of the
logged-in user. In XP: C:\Documents and
Settings\{username}\Application Data
In Vista: C:\Users\{username}\AppData\Roaming
03 %HOMEPATH% In XP: C:\Documents and Settings\{username}
In Vista: C:\Users\{username}
04 %LOGONSERVER% This variable Indicates the domain controller or the server
that authenticated the client‟s logon request.
05 %TEMP% In XP: C:\Documents and Settings\{username}\Local
Settings\Temp
- 28 -
© 2011, BCDALAI's Free Tech. Support Blog
Windows Command Guide 2011
In Vista: C:\Users\{username}\AppData\Local\Temp
06 %TMP% In XP: C:\Documents and Settings\{username}\Local
Settings\Temp
In Vista: C:\Users\{username}\AppData\Local\Temp
07 %USERDOMAIN% The variable holds the name of the Workgroup or
Windows Domain to which the current user belongs.
08 %USERNAME% {Username}. This variable is to determine the active user‟s
login identification.
09 %USERPROFILE% In XP: C:\Documents and Settings\{username}
In Vista: C:\Users\{username}
System path Environment Variables
10 %APPDATA% Contains the full path to the Application Data folder of the
logged-in user. In XP: C:\Documents and
Settings\{username}\Application Data
In Vista: C:\Users\{username}\AppData\Roaming
11 %CMDEXTVERSION% This variable shows the version number of the current
Command Processor Extensions. In Windows NT the
value is “1”. In Windows 2000 and XP the value is “2”.
12 %COMMONPROGRAMFILES% Usually: C:\Program Files\Common Files
13 %COMMONPROGRAMFILES(X86)% The default in Vista is: C:\Program Files (x86)\Common
Files
14 %COMPUTERNAME% {Computername} The NetBIOS name of the computer.
15 %COMSPEC% Starts a new instance of the Windows XP command
interpreter. C:\Windows\System32\cmd.exe
16 %HOMEDRIVE% The drive where Windows is installed. Usually it is C:\
17 %HOMEPATH% In XP: C:\Documents and Settings\{username}
In Vista: C:\Users\{username}
18 %HOMESHARE% The network path to the user‟s home directory. Shared
Home Directory (for example “\\server\share”). If the home
directory is a local path, it will return a null value.
19 %NUMBER_OF_PROCESSORS% Quantity of CPUs installed in the system.
20 %OS% For Windows NT „family‟ it is “Windows_NT”
21 %PATH% C:\Windows\system32;C:\Windows;C:\Windows\System32
\Wbem;{plus program paths}
22 %PATHEXT% .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.
MSC
23 %PROCESSOR_ARCHITECTURE% Indicates the chip architecture of the CPU e.g. x86 or x64.
24 %PROGRAMFILES% This variable point to Program Files directory, which stores
the entire installed program within Windows and other
installed apps. The default is C:\Program Files.
25 %PROGRAMFILES(X86)% In 64-bit editions of Windows (XP, 2003, Vista etc.), this is
C:\Program Files (x86)
26 %PROGRAMW6432% In 64-bit editions of Windows (XP, 2003, Vista etc.), this is
C:\Program Files
27 %PROMPT% Code for current command prompt format. Code is usually
$P$G
28 %PUBLIC% Only for Vista or later. The default is: C:\Users\Public
29 %SYSTEMDRIVE% The drive where Windows is installed. Usually it is C:\
30 %SYSTEMROOT% The default is: C:\Windowsand in Windows NT 3.1,
Windows NT 4 and Windows 2000: C:\WINNT
31 %USERDNSDOMAIN% The fully qualified DNS domain (FQDN) that the currently
logged on user‟s account belongs to.
32 %USERDOMAIN% Name of the domain that contains the user‟s account.
33 %WINDIR% The default is: C:\Windowsand in Windows NT 3.1,
Windows NT 4 and Windows 2000: C:\WINNT
Discrete value Environment Variable
34 %CD% Current directory with its full path
35 %DATE% Current date in the format determined by the Date
command
36 %ERRORLEVEL% This variable points to the current error level. If there was
an error in the previous command, this is what you need to
check against to find out about that. Number defining exit
status of a previous command or program.
37 %RANDOM% Random number between 0 and 32767.
38 %TIME% This point to the current time. Current time in the format
- 29 -
© 2011, BCDALAI's Free Tech. Support Blog
Windows Command Guide 2011
Chapter – 4
Recovery Console Commands
Table-14: [Applies To: Windows 2000, XP and Server 2003. Recovery Console is not available on
Vista or higher. Refer Appendix-A]
ATTRIB CHKDSK DIR EXPAND LISTSVC MORE RMDIR
BATCH CLS DISABLE FIXBOOT LOGON NET SYSTEMROOT
- 30 -
© 2011, BCDALAI's Free Tech. Support Blog
Windows Command Guide 2011
COMMAND USAGES:
[Notes: See above table for rest of the command in the above table.]
Batch: executes commands that you specify in the text file, Inputfile. Output file holds the output of the
commands. If you omit the Output file parameter, output appears on the screen.
CD (Chdir): operates only in the system directories of the current Windows installation, removable
media, the root directory of any hard disk partition, or the local installation sources.
Chkdsk: The /p switch runs Chkdsk even if the drive is not flagged as dirty. The /r switch locates bad
sectors and recovers readable information. This switch implies /p. Chkdsk requires Autochk. Chkdsk
automatically looks for Autochk.exe in the startup folder. If Chkdsk cannot find the file in the startup
folder, it looks for the Windows Setup CD-ROM. If Chkdsk cannot find the installation CD-ROM, Chkdsk
prompts the user for the location of Autochk.exe.
Copy: copies one file to a target location. By default, the target cannot be removable media, and you
cannot use wildcard characters. Copying a compressed file from the Windows 2000 Setup CD-ROM
automatically decompresses the file.
Del (Delete): deletes one file. Operates within the system directories of the current Windows installation,
removable media, the root directory of any hard disk partition, or the local installation sources. By
default, you cannot use wildcard characters.
Dir: displays a list of all files, including hidden and system files.
Disable: disables a Windows system service or driver. The variable service_or_driver is the name of the
service or driver that you want to disable. When you use this command to disable a service, the
command displays the service‟s original startup type before it changes the type to
SERVICE_DISABLED. Note the original startup type so that you can use the enable command to
restart the service.
Enable: enables a Windows system service or driver. The variable service_or_driver is the name of the
service or driver that you want to enable, and start_type is the startup type for an enabled service. The
startup type uses one of the following formats:
SERVICE_BOOT_START
SERVICE_SYSTEM_START
SERVICE_AUTO_START
SERVICE_DEMAND_START
Exit: quits the Recovery Console, and then restarts the computer.
Expand: expands a compressed file. The variable source is the file that you want to expand. By default,
you cannot use wildcard characters. The variable destination is the directory for the new file. By default,
the destination cannot be removable media and cannot be read-only. You can use the attrib command
to remove the read-only attribute from the destination directory. The option /f:filespec is required if the
source contains more than one file. This option permits wildcard characters. The /y switch disables the
overwrite confirmation prompt.
Fixboot: writes a new startup sector on the system partition.
Fixmbr: repairs the startup partition‟s master boot code. The variable device is an optional name that
specifies the device that requires a new Master Boot Record. Omit this variable when the target is the
startup device.
Format: formats a disk. The /q switch performs a quick format. The /fs switch specifies the file system.
Help: If you do not use the command variable to specify a command, help lists all the commands that
the Recovery Console supports.
Listsvc: displays all available services and drivers on the computer.
Logon: displays detected installations of Windows and requests the local Administrator password for
those installations. Use this command to move to another installation or subdirectory.
Map: displays currently active device mappings. Include the arc option to specify the use of Advanced
RISC Computing (ARC) paths (the format for Boot.ini) instead of Windows device paths.
MD (Mkdir): operates only within the system directories of the current Windows installation, removable
media, the root directory of any hard disk partition, or the local installation sources.
More/Type: displays the specified text file on screen.
Rd (Rmdir): operates only within the system directories of the current Windows installation, removable
media, the root directory of any hard disk partition, or the local installation sources.
Ren (Rename): operates only within the system directories of the current Windows installation,
removable media, the root directory of any hard disk partition, or the local installation sources. You
cannot specify a new drive or path as the target.
Set: displays and sets the Recovery Console environment variables.
Systemroot: sets the current directory to %SystemRoot%.
Miscellaneous Commands
GUID Commands (through RUN):
- 31 -
© 2011, BCDALAI's Free Tech. Support Blog
Windows Command Guide 2011
Table-15: [Applies To: Windows XP or later. Here the GUID (Globally Unique Identifier) command
uses the Windows Shell to execute a task. All these commands may not work always. To create
shortcut using these commands in this table refer Apendix-A10 and B.]
WINDOWS XP / SERVER 2003
SL. Control Panel Applets/ GUID / COMMAND CODE
Features
01 Folder Options shell:::{6dfd7c5c-2451-11d3-a299-00c04f8ef6af}
02 My Computer shell:::{20d04fe0-3aea-1069-a2d8-08002b30309d}
03 My Documents shell:::{450d8fba-ad25-11d0-98a8-0800361b1103}
04 My Network Places shell:::{208d2c60-3aea-1069-a2d7-08002b30309d}
05 Network Connections shell:::{7007acc7-3202-11d1-aad2-00805fc1270e}
06 Printers and Faxes shell:::{2227a280-3aea-1069-a2de-08002b30309d}
07 Recycle Bin shell:::{645ff040-5081-101b-9f08-00aa002f954e}
08 Scheduled Tasks shell:::{d6277990-4c6a-11cf-8d87-00aa0060f5bf}
09 Web Browser (Default) shell:::{871c5380-42a0-1069-a2ea-08002b30309d}
WINDOWS VISTA / WINDOWS 7 or higher
10 Action Center shell:::{bb64f8a7-bee7-4e1a-ab8d-7d8273f7fdb6}
11 Add Hardware shell:::{7a979262-40ce-46ff-aeee-7884ac3b6136}
12 Administrative Tools shell:::{d20ea4e1-3957-11d2-a40b-0c5020524153}
13 AutoPlay shell:::{9c60de1e-e5fc-40f4-a487-460851a8d915}
14 Backup and Restore shell:::{b98a2bea-7d42-4558-8bd1-832f41bac6fd}
15 Biometrics Devices shell:::{0142e4d0-fb7a-11dc-ba4a-000ffe7ab428}
16 BitLocker Drive Encryption shell:::{d9ef8727-cac2-4e60-809e-86f80a666c91}
17 Color Management shell:::{b2c761c6-29bc-4f19-9251-e6195265baf1}
18 Computer shell:::{20d04fe0-3aea-1069-a2d8-08002b30309d}
19 Control Panel: Category view shell:::{26ee0668-a00a-44d7-9371-beb064c98683}
- 32 -
© 2011, BCDALAI's Free Tech. Support Blog
Windows Command Guide 2011
55 Personalization shell:::{ed834ed6-4b5a-4bfe-8f11-a626dcb6a921}
56 Phone and Modem shell:::{40419485-c444-4567-851a-2dd7bfa1684d}
57 Power Options shell:::{025a5937-a6be-4686-a844-36fe4bec8b6d}
58 Printers shell:::{2227a280-3aea-1069-a2de-08002b30309d}
59 Problem Reports and shell:::{fcfeecae-ee1b-4849-ae50-685dcf7717ec}
Solutions
60 Programs and Features shell:::{7b81be6a-ce2b-4676-a29e-eb907a5126c5}
61 Recovery shell:::{9fe63afd-59cf-4419-9775-abcc3849f861}
62 Recycle Bin shell:::{645ff040-5081-101b-9f08-00aa002f954e}
63 Region and Language shell:::{62d8ed13-c9d0-4ce8-a914-47dd628fb1b0}
64 RemoteApp and Desktop shell:::{241d7c96-f8bf-4f85-b01f-e2b043341a4b}
Connections
65 Scanners and Cameras shell:::{00f2886f-cd64-4fc9-8ec5-30ef6cdbe8c3}
66 Sound shell:::{f2ddfc82-8f12-4cdd-b7dc-d4fe1425aa4d}
67 Speech Recognition shell:::{58e3c745-d971-4081-9034-86e34b30836a}
68 Sync Center shell:::{9c73f5e5-7ae7-4e32-a8e8-8d23b85255bf}
69 System shell:::{bb06c0e4-d293-4f75-8a90-cb05b6477eee}
70 Tablet PC Settings shell:::{80f3f1d5-feca-45f3-bc32-752c152e456e}
71 Taskbar and Start Menu shell:::{0df44eaa-ff21-4412-828e-260a8728e7f1}
72 Text to Speech shell:::{d17d1d6d-cc3f-4815-8fe3-607e7d5d10b3}
73 Troubleshooting shell:::{c58c4893-3be0-4b45-abb5-a63e4b8c8651}
74 User Accounts shell:::{60632754-c523-4b62-b45c-4172da012619}
75 Web Browser (Default) shell:::{871c5380-42a0-1069-a2ea-08002b30309d}
76 Windows Anytime Upgrade shell:::{be122a0e-4503-11da-8bde-f66bad1e3f3a}
77 Windows CardSpace shell:::{78cb147a-98ea-4aa6-b0df-c8681f69341c}
78 Windows Defender shell:::{d8559eb9-20c0-410e-beda-7ed416aecc2a}
79 Windows Firewall shell:::{4026492f-2f69-46b8-b9bf-5654fc07e423}
80 Windows Marketplace shell:::{3e7efb4c-faf1-453d-89eb-56026875ef90}
81 Windows Mobility Center shell:::{5ea4f148-308c-46d7-98a9-49041b1dd468}
82 Windows Security Center shell:::{087da31b-0dd3-4537-8e23-64a18591f88b}
83 Windows SideShow shell:::{e95a4861-d57a-4be1-ad0f-35267e261739}
84 Windows Update shell:::{36eef7db-88ad-4e81-ad49-0e313f0c35f8}
Tips: To create shortcuts using the above GUID in Windows 7, create a new folder and rename the
folder like this: for “Control Panel - Full” rename a folder in Windows 7 with the following:
ControlPanel-Full.{ED7BA470-8E54-465E-825C-99712043E01C}
More Commands
[Notes: These commands can be used to opening / doing a specific task or to create a shortcut for
frequent use. Use Command Prompt for these commands.]
Locking Computer (Workstation):
%WinDir%\system32\rundll32 user32.dll, LockWorkStation
Hibernating Computer:
%WinDir%\System32\rundll32 PowrProf.dll, SetSuspendState
Notes: Hibernate option must be enabled in the “Power Options” from Control Panel. Otherwise the
system will go to standby mode.
Shutdown Computer:
Abort Shutdown: %SystemRoot%\System32\shutdown -a
Log Off: %SystemRoot%\System32\shutdown -s -t 00
Restart: %SystemRoot%\System32\shutdown -r -f -t 00
Shutdown: %SystemRoot%\System32\shutdown -s -f -t 00
Notes: Replace 00 preferably with any two digit number. For more see Apendix-A3.
Add or Remove Programs with specific tab:
Change or Remove Programs: %SystemRoot%\system32\control appwiz.cpl,,0
Add New Programs (CD-ROM/Floppy): %SystemRoot%\system32\control appwiz.cpl,,1
Add/Remove Windows Components: %SystemRoot%\system32\control appwiz.cpl,,2
Set Program Access and Defaults: %SystemRoot%\system32\control appwiz.cpl,,3
- 33 -
© 2011, BCDALAI's Free Tech. Support Blog
Windows Command Guide 2011
Device Manager:
%SystemRoot%\System32\mmc %SystemRoot%\system32\devmgmt.msc
Computer Management:
%WinDir%\system32\mmc /s %WinDir%\system32\compmgmt.msc
IP Configuration:
%SystemRoot%\system32\cmd /k %SystemRoot%\system32\ipconfig /all
Microsoft Update:
%SystemRoot%\system32\rundll32 %SystemRoot%\system32\muweb.dll,LaunchMUSite
Map Network Drive:
net use Z: \\computername\network_share
Notes: Z: is the drive letter for the mapped network drive, it starts in descending order i.e. from Z to A.
Directory List Printing
Dir /A:D /B /O:G /S>filename.txt
Control Panel in Windows XP (GUID command):
::{20d04fe0-3aea-1069-a2d8-08002b30309d}\::{21ec2020-3aea-1069-a2dd-08002b30309d}
Program Compatibility Wizard (WinXP)
HelpCtr -FromHCP -url hcp://system/compatctr/compatmode.htm
Restoring “Show Desktop” icon in Quick Launch (WinXP / 2K3)
regsvr32 /i:u shell32
Detailed Windows Licensing Status:
slmgr.vbs /dlv
IPv4 and IPv6 Route table:
route print
Or
netstat -r
Checking which folders are shared:
net share
Manually check for and install Windows updates (Vista or higher):
wuauclt /detectnow
Display signed drivers:
driverquery /si
Devices configured to wake up computer from sleep:
powercfg -devicequery wake_armed
Uninstalling a Service Pack:
spuninst-u
Creating an EFS recovery agent (Windows 7 or higher):
cipher /r:recoveryagent
Backing up EFS Certificate (Windows 7 or higher):
cipher /x
Updating Group Policy manually:
gpupdate /force
Checking the version of JAVA installed:
Java -version
Appendix-A
1. RUN box: Press the “Windows Logo” button and then press “R”, or go to “Start Menu” and
click “RUN”, to open “RUN” dialog box. Then type these commands in the RUN box and press
Enter to open an application.
2. Running Disk Cleanup for all drives:
Disk Cleanup Settings: cleanmgr /sageset:99
Automatic Cleanup: cleanmgr /sagerun:99
[Notes: Always check settings before “Automatic Cleanup”.]
3. Shutdown Actions:
Abort Shutdown: shutdown -a
Log Off: shutdown -s -t 00
Restart: shutdown -r -f -t 00
Shutdown: shutdown -s -f -t 00
GUI Interface: shutdown -i
[Notes: For these options (flags) in Vista or higher use/ (forward slash) instead of - (dash).]
4. TCP/IP: In Windows XP / Windows Server 2003, IPv4 protocol is the core networking protocol.
You can‟t uninstall it. But you can install/uninstall IPv6 protocol. In Windows Vista / Windows
Server 2008 or higher, IPv6 protocol is the core networking protocol. You can‟t uninstall it. But
you can install/uninstall IPv4 protocol.
- 34 -
© 2011, BCDALAI's Free Tech. Support Blog
Windows Command Guide 2011
5. The /allcompartmentsswitch: If you use the /allcompartments switch after the Ipconfig
command, you can apply the command universally across all interfaces; for example, ipconfig
/allcompartments /all or ipconfig /allcompartments /renew.
6. Windows Live Essentials: Windows Live Essentials 2011 (Wave 4, version 15 or higher) and
its components can run only on Windows Vista and Windows 7 or later. For Windows XP use
Windows Live Essential (Wave 3, version 14). Windows Live Essential can‟t be installed on
Windows Server 2003 / Server 2008 / 2008 R2.
7. XPS Viewer: “XPS Essentials Pack” or “XPS Viewer EP” is a standalone application from
Microsoft to view and create XPS formats. Also you can view XPS documents in Internet
Explorer if “.NET Framework 3.0” or higher isinstalled.
8. Recovery: For Vista, Server 2008, Windows 7 or higher, Recovery Console is not available
(as previously with Windows 2000 / XP / Server 2003). This is replaced by various advance
recovery options. You can use commands to diagnose and troubleshoot the OS related issues
through booting with a recovery disk or by a Windows DVD in recovery mode. Use the
following commands:
Restore System files and Settings: srtrui.exe
Windows Complete PC Restore: bmrui.exe
Windows DISM Capture: dwscapture.exe
For Windows 7 / Server 2008 R2 (not for Vista) you don‟t need to boot from Windows DVD to
use system recovery functions. Press F8 before windows start up and select Repair Your
Computer options from the “Advance Boot Options” menu, to get into System Recovery
Options. You only need the “Windows Installation Disc” or “System Repair Disc” only when
you can‟t boot windows or when you get the error “Bootmgr is missing”.
9. RUN AS: This command line tool enables you to run programs using the credential of another
user. This feature has been improved in Windows 7 as Run As Administrator in the graphical
mode. In the command line mode this tool has also some extended functions in Windows 7.
10. Command Tips (Create shortcut): Many commands in this ebook can be used for executing
a task or configuring system settings. The commands can be run from RUN box or commands
prompt. If you want to use the particular command frequently then you can make a shortcut
and place it on the Desktop / Start Menu for an easy use of it. If you find problem with the some
commands (mentioned in this ebook) in Windows Vista or higher then use / (forward slash)
instead of - (dash) for the options in a particular command.
To create a shortcut for program: right-click on the desktop click New > Shortcut. In the
location type / paste the command and click Next, then type a proper title / name for that
program and click finish. To create shortcut for the GUID commands add the word “shell:”
before that command if that word is not present in that command and paste in the location
box.
11. Creating Command for Programs:
You can make your own commands too. If you want to launch a program from RUN or from
command prompt. Follow these steps:
Create a shortcut for a program. Name the shortcut anything as you wish. Don‟t name this
same to windows commands, otherwise this will not work.
Copy it to the “%windows%\system32” folder. Then open RUN box, type in the name and
press Enter.
12. Running Recovery Console:
Insert the Windows XP startup disk into the floppy disk drive, or insert the Windows XP
CD-ROM into the CD-ROM drive, and then restart the computer.
Press any key to start the computer from the CD-ROM drive if you are prompted.
When the “Welcome to Setup” screen appears, press R to start the Recovery Console.
If you have a dual-boot or multiple-boot computer, select the installation that you must
access from the Recovery Console.
When you are prompted, type the Administrator password. Or ENTER for blank password.
At the command prompt, type the appropriate commands to diagnose and repair your
Windows XP installation. For a list of commands that are available in Recovery Console,
type recoveries console commands or help and pressENTER.
For information about a specific command, type help command name at the command
prompt and then press ENTER.
To exit the Recovery Console and restart the computer, issue exit command.
How to install the Recovery Console
Insert the Windows XP CD into the CD-ROM drive. Click Start, and click RUN. Then type
x:\i386\winnt32 /cmdcons where x is the drive letter for the CD-ROM drive.
- 35 -
© 2011, BCDALAI's Free Tech. Support Blog
Windows Command Guide 2011
A Windows Setup Dialog Box appears. The Windows Setup Dialog Box describes the
Recovery Console option. To confirm the installation, click Yes.
Restart the computer. The next time that you start your computer, “Microsoft Windows
Recovery Console” appears on the startup menu.
Notes: Always use Windows XP Professional Service Pack 3 CD to Install the Recovery
Console and to avoid any error - refer to: KB898594.
13. MMC: Microsoft Management Console (MMC) snap-ins can be opened with the default
consoles (.msc extension) installed with Windows. You can create custom console file, save it
in the system32 folder and can open from command prompt or from RUN. When saving the
console the file name should be unique, without space and must not conflict with other
windows files or commands. You can open console snap-ins in two ways:
Example: Device manager
Commands: devmgmt.msc or mmc devmgmt.msc
14. Creating custom Command for an App:
Open Registry Editor (from Start Menu > RUN and type regedit then press Enter):
Go to the location:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\
Create a new Key and name it as per exact executable file name of your app (example
“windbg.exe" file for "Debugging Tools for Windows (x86)"). Remember to add .exe in the
key name. The key name must be same as the app's executable name to avoid confusion.
Then in the right pane change the value of the default string value named as "Default", to
the address of the app's installation folder. The app's address must be direct and not be
with environment variables. Example: C:\Program Files\Debugging Tools for Windows
(x86)\windbg.exe
And create another new string named “Path” and changed the value to the location of the
app. Example: C:\Program Files\Debugging Tools for Windows (x86)\
Then close registry editor and issue the command in the RUN. These commands may not
be executed from Command Prompt.
15. RUN vs. Command Prompt: RUN: It is used to execute some of the Windows functions and
features. These commands are based on environment variables and Windows registry. Also
some MS-DOS commands can be executed from RUN box.
Command Prompt: Command Prompt also called Windows Command Processor is the
stripped down version of earlier MS-DOS operating system for Windows environment. The
commands are mostly same as MS-DOS commands or derived from it. Many Windows
functions and tools are integrated with Command Prompt for better usability. You have to open
the Command Prompt with administrator credential to execute commands.
16. Rules in this Ebook
All commands in this ebook are case sensitive, although many are written with
multiple cases.Making shortcuts: Many of these commands can be used for creating shortcuts.
For command usage use /? Switch after a command.
Short forms: App = Application, Apps = Applications, IE= Internet Explorer, WinME =
Windows ME, 2K = Windows 2000, 2K3 = Windows Server 2003, XP or WinXP = Windows XP,
Win7 = Windows 7, Vista = Windows Vista, 2K8 = Windows Server 2008, %WinDir% =
%SystemRoot%, rundll32 = rundll32.exe, rundll32 = %SystemRoot%\system32\rundll32.exe.
Abbreviations: ACL: Access Control List, ADSI: Active Directory Services Interfaces, COM:
Component Object Model, DCOM: Distributed Component Object Model, SMS: System
Management Server, DPI: Dots per inch, IIS: Internet Information Services, iSCSI: Internet
Small Computer System Interface, ISE: Integrated Scripting Environment, XPS: XML Paper
Specification, ATM: Asynchronous Transfer Mode, MDT: Microsoft Deployment Toolkit, WIM:
Windows Imaging Format, VHD: Virtual Hard Disk, WET: Windows Easy Transfer, SCCM:
System Center Configuration Manager, BITS: Background Intelligent Transfer Service, MAC:
Media Access Control, TFTP: Trivial File Transfer Protocol, FQDN: Fully Qualified Domain
Name, ODBC: Open Database Connectivity, SCCM: System Center Configuration Manager,
WDS: Windows Deployment Service.
Notes: For more abbreviations go to: http://bit.ly/cI8Fwz
17. Windows Deployment Tools: DISM.exe, Diskpart, imagex.exe, MAP, MDT 2010, SCCM 2007,
sysprep.exe, Windows SIM, WET, Windows PE, WIM image, USMT, VHD, VHD boot,
Windows 7 Upgrade Advisor etc.
18. Commonly Used Command-line Tools
Attrib, chkdsk, convert, dir, expand, gpupdate, ipconfig, net, netsh, nslookup, ping, regedit, sfc,
shutdown, telnet, tracert etc.
FEW TOOLS [See table-9 and table-10 for more commands.]
- 36 -
© 2011, BCDALAI's Free Tech. Support Blog
Windows Command Guide 2011
pushd Stores the current directory for use by the POPD command and then changes to the specified
directory.
Syntax:
PUSHD [path | ..]
Parameters
path Specifies the directory to make the current directory.
Notes: If Command Extensions are enabled the PUSHD command accepts network paths in addition to
the normal drive letter and path. If a network path is specified, PUSHD will create a temporary drive
letter that points to that specified network resource and then change the current drive and directory,
using the newly defined drive letter. Temporary drive letters are allocated from Z: on down, using the
first unused drive letter found.
popd Changes to the directory stored by the PUSHD command.
POPD
Notes: If Command Extensions are enabled the POPD command will delete any temporary drive letter
created by PUSHD when you POPD that drive off the pushed directory stack.
regsvr32 This command-line tool registers .dll files as command components in the registry.
Syntax:
regsvr32 [/u] [/s] [/n] [/i[:cmdline]] dllname
Parameters
/u Unregisters server.
/s Specifies regsvr32 to run silently and to not display any message boxes.
/n Specifies not to call DllRegisterServer. You must use this option with /i.
/i:cmdline Calls DllInstall passing it an optional [cmdline]. When used with /u, it calls dll uninstall.
dllname Specifies the name of the dll file that will be registered.
Examples: To register the .dll for the Compressed Folder, type: regsvr32 zipfldr.dll
Appendix-B
CHANGED FEATURES AND NAMES
Table-16: [Applies To: Vista, Server 2008, 2008 R2, Windows 7 and other Microsoft
technologies.
FEATURES / SERVICES / TOOLS
SL. NEWER FORMER
WINDOWS VISTA (Client) WINDOWS 2000, XP, SERVER 2003
01 Backup and Restore Center NTBackup (Windows Backup Utility)
02 Computer My Computer
03 Credential Manager Stored User Names and Passwords
04 Documents My Documents
05 Ease of Access Center Accessibility Options
06 Getting Started or Welcome Center Windows XPTour
07 Music My Music
08 Network Discovery Protocol (NDP) Computer Browser
09 Network Places My Network Places
10 Pictures My Pictures
11 Programs and Features Add or Remove Programs
12 Recent Documents My Recent Documents
13 Recovery Recovery Console
14 Region and Language Regional Settings
15 Reliability and Performance Monitor Performance Monitor
16 Run As / Run As Administrator Run As
17 Security Configuration Management Local Security Settings
18 Subsystem for Unix-based Applications Windows Services for Unix
19 Superfetch Prefetch
20 Sync Center Microsoft Synchronization Manager
21 System Integrity Check and Repair System File Checker (SFC)
22 System Protection System Restore
23 Task Scheduler Scheduled Tasks
24 Users Documents and Settings
25 Videos My Videos
26 Windows Complete PC Restore Automated System Recovery (ASR)
27 Windows Contacts Address Book
28 Windows Deployment Services (WDS) Remote Installation Services (RIS)
- 37 -
© 2011, BCDALAI's Free Tech. Support Blog
Windows Command Guide 2011
- 38 -
© 2011, BCDALAI's Free Tech. Support Blog
Windows Command Guide 2011
REFERENCES
Books / Articles:
MCTS: Windows 7 Configuring (Exam 70-680), MCTS: Exam 70-649, MCTS: Windows Vista (Exam 70-
620 and 70-622), Microsoft Encyclopedia of Security,Microsoft Office 2003 Resource Kit,Microsoft
th th nd
Windows Internals, 4 Ed. and 5 Ed, Microsoft Windows Vista Administration, Understanding IPv6 2
Ed., Windows 7 Inside Out,Windows 7 Resource Kit, Windows Registry Guide, Windows Vista Inside
Out, Windows Vista Resource Kit,Office 2010 All-in-One For Dummies,CCNA Study Guide (Exam 640-
802), OtherMCITP books.
Programs and Tools:
Admin Packs,Camtech Tools, DameWare NT Utilities, Debugging Tools for Windows, dllusage,
EasyBCD, gtools, HijackThis, InnoSetup, nLite, Notepad2, NSIS, Path, pserv, RT 7 Lite, Resource
Hacker, Sysinternals Tools, System Explorer, Unlocker, vLite, WinTricks, Windows AIK, Windows
Resource Kit Tools, Windows SDK, XP SysPad etc.
Websites and Forums:
http://answers.microsoft.com/, http://blogs.technet.com/markrussinovich/, http://en.wikipedia.org/,
http://techrepublic.com.com/, http://technet.microsoft.com/, http://msdn.microsoft.com/,
http://www.softpedia.com/ , http://www.sevenforums.com/, http://sourceforge.net/,
http://windows7forums.com/, http://www.answerbag.com/, http://forums.chip.in/, http://www.cnet.com/,
http://www.fixya.com/, http://www.msfn.org/, http://www.neowin.net/, http://www.techspot.com/,
http://www.wincert.net/, http://www.windowsbbs.com/, http://www.windowsitpro.com/,
http://www.windowssecrets.com/, http://www.worldstart.com/.
Twitter:
@edbott, @ITPRO, @mariusoiaga,@markrussinovich, @maryjofoley, @Microsoft, @MicrosoftHelps,
@MicrosoftKB, @MicrosoftKB1, @MicrosoftKB3, @msitpro, @MSLearning, @MSWindows, @Office,
@pcquest, @pcworld, @ranjanaj, @sp3ciali5t, @Sysinternals, @TechNetTips, @techworldnews,
@TheWindowsClub, @thurrott, @WilliamStanek, @windowsblog, @WindowsITPro.
Useful articles by this Author:
Administrative Power Tricks: http://bit.ly/evb1A3
Known/Unknown Facts on Windows: http://bit.ly/gh8pYX
Integrate “Service Packs” into Windows and Office Installations: http://bit.ly/eTR9X0
Vista Folder-File Info: http://bit.ly/1qZvcq
Enable or Disable Windows Update Auto Restart: http://bit.ly/flMBGH
Windows Common FAQs-001: http://bit.ly/fP84rx
The computer screen dims after resume from Hibernation: http://bit.ly/aphG9n
Creating custom RUN commands for your favorite apps: http://t.co/ww6nfrw
THE END
- 39 -
© 2011, BCDALAI's Free Tech. Support Blog