Windows Start | Run commands
Description | Run Command |
---|---|
Accessibility Options | utilman or control access.cpl |
Add Hardware Wizard | hdwwiz |
Programs and Features (Add New Programs) (Add Remove Windows Components) (Set Program Access & Defaults ) | appwiz.cpl control appwiz.cpl,,1 control appwiz.cpl,,2 control appwiz.cpl,,3 |
Administrative Tools | control admintools |
Advanced User Accounts Control Panel | netplwiz |
Authorization Manager | azman.msc |
Automatic Update | control wuaucpl.cpl |
Backup and Restore Utility | sdclt |
Bluetooth Transfer Wizard | fsquirt |
Calculator | calc |
Certificate Manager | certmgr.msc |
Character Map | charmap |
Check Disk Utility | chkdsk |
Clear Type (tune or turn off) | cttune |
Color Management | colorcpl.exe |
Command Prompt | cmd |
Component Services | dcomcnfg or comexp.msc |
Computer Management | CompMgmtLauncher.exe or compmgmt.msc |
Control Panel | control |
Credential (passwords) Backup and Restore Wizard | credwiz |
Data Execution Prevention | SystemPropertiesDataExecutionPrevention |
Date and Time Properties | timedate.cpl |
Device Manager | hdwwiz or devmgmt.msc |
Device Pairing Wizard | DevicePairingWizard |
Digitizer Calibration Tool (Tablets/Touch screens) | tabcal |
Direct X Control Panel (if installed) | directx.cpl |
Direct X Troubleshooter | dxdiag |
Disk Cleanup Utility | cleanmgr |
Disk Defragmenter | dfrgui defrag |
Disk Management | diskmgmt.msc |
Disk Partition Manager | diskpart |
Display Color Calibration | dccw |
Display DPI / Text size | dpiscaling |
Display Properties (Themes, Desktop, Screensaver) | control desktop |
Display Properties (Resolution, Orientation) | desk.cpl |
Display Properties (Color & Appearance) | control color |
Documents (open ‘My Documents’ folder) | documents |
Downloads (open ‘Downloads’ folder) | downloads |
Driver Verifier Utility | verifier |
DVD Player | dvdplay |
Edit Environment Variables | rundll32.exe sysdm.cpl,EditEnvironmentVariables |
Encrypting File System Wizard (EFS) | rekeywiz |
Event Viewer | eventvwr.msc |
File Signature Verification Tool (Device drivers) | sigverif |
Files and Settings Transfer Tool | %systemroot%\system32\migwiz\migwiz.exe |
Firewall Control Panel | firewall.cpl |
Folders Properties | control folders |
Fonts list | control fonts |
Font preview | fontview arial.ttf |
Game Controllers | joy.cpl |
Local Group Policy Editor | gpedit.msc |
Internet Properties | inetcpl.cpl |
IP Configuration | ipconfig |
iSCSI Initiator configuration | iscsicpl |
Keyboard Properties | control keyboard |
Language Pack Installer | lpksetup |
Local Security Policy | secpol.msc |
Local Users and Groups | lusrmgr.msc |
Log out | logoff |
Microsoft Malicious Software Removal Tool | mrt |
Microsoft Management Console | mmc |
Access (Microsoft Office) | msaccess |
Excel (Microsoft Office) | Excel |
Powerpoint (Microsoft Office) | powerpnt |
Word (Microsoft Office) | winword |
Microsoft Paint | mspaint |
Microsoft Support Diagnostic Tool | msdt |
Mouse Properties | control mouse or main.cpl |
Network Connections | control netconnections or ncpa.cpl |
Projector: Connect to Network Projector Switch projector display | netproj |
displayswitch
Default ODBC driver:
32-bit ODBC driver under 64-bit platform:
C:\windows\sysWOW64\odbcad32.exe
sysdm.cpl SystemProperties
or
sysdm.cpl DisplaySYSDMCPL
explorer.exe . Will open at the current directory
Windows Firewall with Advanced Security
wf.msc
(boot password.)
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”
Batch file to run a command in cmd within a directory
I want to have a batch file(must be placed on desktop) which does the following;
- opens cmd
- navigates to a directory, e.g. C:\activiti-5.9\setup
- runs a command within the directory, e.g. ant demo.start (this command runs the activiti server)
I tried the following to reach to the directory but how to run command, «ant demo.start» ?
Thank you for the help.
EDIT:
Referring to zb226’s answer below: One more question if you can answer me is how to make that cmd to be run as administrator? will the following work?
START cmd /K «runas /user:administrator & cd C:\activiti-5.9\setup & ant demo.start»
6 Answers 6
Chain arbitrary commands using & like this:
Thus, in your particular case, put this line in a batch file on your desktop:
You can also use && to chain commands, albeit this will perform error checking and the execution chain will break if one of the commands fails. The behaviour is detailed here.
Edit: Intrigued by @James K’s comment «You CAN chain the commands, but they will have no effect», I tested some more and to my surprise discovered, that the program I was starting in my original test — firefox.exe — while not existing in a directory in the PATH environment variable, is actually executable anywhere on my system (which really made me wonder — see bottom of answer for explanation). So in fact executing.
. didn’t prove the solution was working. So I chose another program (nLite) after making sure that it was not executable anywhere on my system:
And that works just as my original answer already suggested. A Windows version is not given in the question, but I’m using Windows XP, btw.
How to run a command on command prompt startup in Windows
If you want to perform any task at computer startup or based on an event this is very helpful
Back to the question
I have two questions:
I want some specific commands to be executed when I start command prompt.
e.g. cls to clear my command prompt.
I want to execute some commands in a batch file and wait for the user to enter new commands (if any).
e.g. A batch file which will take the user to some specified folder and then wait for the user to rename/delete a file from the command prompt.
How can I do it?
6 Answers 6
If you want a defined set of commands to run every time you start a command prompt, the best way to achieve that would be to specify an init script in the AutoRun registry value. Create it like this (an expandable string value allows you to use environment variables like %USERPROFILE% ):
Then create a file init.cmd in your profile folder:
To remove these changes, delete the registry key:
- Make a shortcut
- Go to the properties
- The bit where it says: C:\Users\ \Desktop\cmd.exe , you put: -cmd /K
e.g. C:\Users\Lewis\Desktop\cmd.exe -cmd /K color 1f
This is the way to launch 1 command without having to mess about with the registry.
Run multiple commands
You can also use & (and) operator to execute multiple commands.
I found my answer: I should use the /K switch, using which I can enter a new command on the opened command prompt.
E.g. cmd /K cls will open a command prompt for me and clear it. (Answer for question 1)
cmd /K MyBatchFile.bat will start a command prompt, execute the batch file and stay on the command prompt and will not exit. (Answer for question 2).
First, you need to press Windows Key + R. In the box that appears, type «regedit» (without the quotes). The Windows Registry Editor should open. Now, locate to HKEY_CURRENT_USER/Software/Microsoft/Command Processor. Once you have clicked on Command Processor on the left side, click Edit on the top bar. Then go to New > String Value in the Edit menu. Rename the String Value that appears to Autorun. Right click on Autorun and select Modify. Under the «Value Data» area, type in the commands you want to run. You can run multiple by typing && between them.
Expanding a bit, here is an alternative for Windows 10 where multiple aliases can be defined and applied to the Command Prompt upon execution.
- Create a file called init.cmd containing aliases on your %USERPROFILE% folder:
init.cmd
- Register it to be applied whenever the Command Prompt is executed:
In the Command Prompt, run:
Done
Now the contents of init.cmd will run for executions of cmd.exe namely from:
- Taskbar shortcut
- WIN + R cmd
- By typing cmd in the File Explorer address bar
- By running cmd.exe directly from C:\Windows\System32
After registering these settings just remember to close/open:
- The Command Prompt so the settings are applied
- The File Explorer, if you use to launch the cmd via File Explorer address bar