Java executes windows cmd command, and java executes windowscmd
// Obtain the runtime
Runtime rt = Runtime. getRuntime ();
// Obtain the process
Process p = rt.exe c (String [] cmdarray); or Process p = rt.exe c (String cmd );
If p is not empty, clear it.
If (null! = P) {destory
P. destory ();
P = null;
}
For example:
Runtime rt = Runtime.getRuntime(); Process p = rt.exec("cmd.exe /c shutdown -a"); System.out.println(p.toString());
Cmd/c dir: Close the command window after executin
1. gpedit. msc ----- Group Policy2. sndrec32 ------- Recorder3. NSLookup ------- IP address Detector4. Explorer ------- open the Resource Manager5. logoff --------- logout command6. tsshutdn ------- 60 seconds countdown shutdown command7. lusrmgr. msc ---- local users and groups8. Services. msc --- local service settin
Java runtime.getruntime(cmd.exe C (commandstr) can call and execute the CMD command.
CMD/C dir: Close the command window after executing the Dir command.
CMD/K dir does not close the command window after executing the Dir command.
CMD/C start dir opens a new window and executes the Dir command. The original window is closed.
CMD/K start dir will open a new window and execute the Dir command. The original window will not close.
You can use CMD /? View help information.
★CMD command★1. gpedit.
"Start" ---> "run" Enter the following command, or win + R, and enter the following command
1. gpedit. msc ----- Group Policy2. sndrec32 ------- Recorder3. NSLookup ------- IP address Detector4. Explorer ------- open the Resource Manager5. logoff --------- logout command6. tsshutdn ------- 60 seconds countdown shutdown command7. lusrmgr. msc ---- local users and
Manager (2000/XP/2003)
Gpedit. msc ----- Group Policy
Sndrec32 ------- Recorder
NSLookup ------- IP address Detector
Explorer ------- open the Resource Manager
Logoff --------- logout command
Tsshutdn ------- 60 seconds countdown shutdown command
Lusrmgr. msc ---- local users and groups
Services. msc --- local service
Common running commands in windows system highlights running in the Start menu in windows system is a good thing. You can use it to open common programs and services. Www.2cto.com is recorded here for your reference. Gpedit. msc failover Group Policy sndrec32 ------------------ recorder nslookup ------------------ IP address detector explorer ------------------ open the resource manager logoff ------------------ logout command tsshutdn wait 60 seconds
Msconfig start command gpedit. MSC Group Policy sndrec32 recorder NSLookup IP address detector explorer open Resource Manager logoff logout command tsshutdn 60 seconds countdown shutdown command lusrmgr. MSC local user and group services. MSC local service settings oobe/msoobe/A check whether XP is activated notepad op
CMD command set
1. gpedit. msc ----- Group Policy2. sndrec32 ------- Recorder3. NSLookup ------- IP address Detector4. Explorer ------- open the Resource Manager5. logoff --------- logout command6. tsshutdn ------- 60 seconds countdown shutdown command7. lusrmgr. msc ---- local users and groups8. Services. msc --- l
Mstsc -- Remote Desktop Connection
Logoff -- logout command
Rononce-p -- shutdown in 15 seconds
Tsshutdn -- 60 seconds countdown shutdown command
Iexpress-a trojan bundle tool that comes with the System
Tourstart -- XP introduction (roaming XP displayed after installation is complete
Program )
Winchat -- XP built-in LAN chat
Sndrec32 -- Recorder
NSLookup -- IP address Detector
Explorer -- open Resource Manager
Lusrmgr.
calibration 19. devmgmt. msc: Device Manager 20. desk. cpl: screen resolution 21. dfrgui: optimizes the drive Windows 7 → dfrg. msc: disk fragment program 22. dialer: Dialing procedure 23. diskmgmt. msc: disk management 24. dvdplay: DVD player 25. dxdiag: Check DirectX information 26. eudcedit: Word Creation Program 27. eventvwr: Event Viewer 28. explorer: Open
little connection with the system itself. When we run the DOS program at the command prompt, it is actually automatically transferred to the NTVDM virtual machine. It has nothing to do with cmd itself.
Calc ----------- start Calculator
Chkdsk.exe ----- chkdsk disk check
Compmgmt. msc --- Computer Management
Conf ----------- Start netmeeting
Control userpasswords2 ----- user account permission settings
Devmgmt.
Explorer ------- open Resource Manager NSLookup ------- IP address detector logoff --------- log out command tsshutdn ------- 60 seconds countdown shutdown command lusrmgr. MSC ---- local users and group services. MSC --- local service settings oobe/msoobe/A ---- check if XP is activated notepad -------- open notepad cleanmgr ------- spam Net start messenger ----
performance monitoring program progman -------- Program Manager regedit.exe ---- registry gpedit. MSC ----- Group Policy rsop. MSC ------- group policy result set regedt32 ------- Registry Editor rononce-P ---- shut down regsvr32/u * in 15 seconds *. DLL ---- stop the DLL file and run regsvr32/u zipfldr. DLL ------ cancel zip supports cmd.exe -------- cmd command prompt chkdsk.exe ----- chkdsk disk check c
ProtectionTsshutdn ------- 60 seconds countdown shutdown command tourstart ------ XP introduction (roaming XP program displayed after installation)Taskmgr -------- Task Manager eventvwr ------- Event ViewerEudcedit ------- Word Creation Program explorer ------- open the Resource ManagerPackager ------- object packaging program perfmon. msc ---- computer performance monitoring programProgman -------- Program Manager regedit.exe ---- RegistryRsop.
Common MMC console shortcut commands in Windows
ThanksFragmented IT informationArticle
I have been away from the main IT business for some time, but I still want to build my own house. What should I do ?? Although fragment is not a good technology, I still like to pretend to be a master ............
Yesterday, I helped people "repair computers ". With some convenient MMC commands, people think they are even masters. I don't need these things for a long time. Let's review them today. Let's Go ...
--- Windows Firewall gpedit. MSC ----- Group Policy hdwwiz. cpl ----- add hardware iexpress ------- Trojan bundle tool. The system comes with inetcpl. cpl ---- intetnet option intl. cpl ------- region and language options (input method options) irprops. cpl ---- Wireless Link joy. cpl -------- game controller lusrmgr. MSC ---- local user and group logoff -------
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.