Wednesday, 17 April 2013

Command Line On Windows

There are some command line that we always use normally on windows os .
"getmac"      : MAC address
"msinfo32"   : hardware information
"regedit"       : registry
"msconfig"    : service and  start up



"dxdiag"       : system information , graphics card....
                                   
"control"       : control panel
"services.msc"  : list services
"wbemtest" :Windows Management instrumentation
"devmgmt.msc"
diskmgmt.msc
               
"wmic DISKDRIVE Get DeviceID , PNPDeviceID, SerialNumber"
"wmic BIOS get name, serialnumber, version"
"wmic csproduct get name, identifyingnumber, uuid"
"wmic CPU get Manufacturer,ProcessorId"
"wmic NIC get macaddress,description"

"wmic process | sort"

http://blog.wisefaq.com/2010/06/29/wmi-and-wmic-example-text-for-common-queries/
windows_run_commands
Batch file and Script .
+"start " : call   process  .
Example opens  Notepad program   : "start C:\Windows\notepad.exe"
+"call " : how to pass parameters to function   ( int main(int argc , char *argv[]){})
              "@echo off
               call main.exe hello world"
              pause"
+ ">"   :  echo hello world < logFile.log

+ check if  process returns 0 or 1   : ERRORLEVEL will contain the return code of the last command

+"mkdir"  : create a new directory
                 mkdir Test

                mkdir "Test\bin"
+"copy" :
              copy /Y Test\hello.cpp  "Test\bin"
+"del" 
            del "Test\bin\hello.cpp"
+ winrar sfx  to create exe file or ResHacker and signtool
winrar a -sfx -z"XXX.INI" OUTPUT.EXE


http://technet.microsoft.com/en-us/library/cc755813(v=ws.10).aspx
http://publib.boulder.ibm.com/infocenter/pseries/v5r3/index.jsp?topic=/com.ibm.aix.cmds/doc/aixcmds3/mkdir.htm
http://technet.microsoft.com/en-us/library/cc758944%28WS.10%29.aspx
http://www.ericphelps.com/batch/samples/samples.htm
http://mrcracker.com/books/Batch-File-Programming.pdf
http://www.mums.ac.ir/shares/hit/eduhit/book/windowsscripting.pdf
                                                                                                        ThongLT - letrthong@gmail.com
----------------------------------------------------------------------- --------------------------------




2 comments:

  1. Mày chỉ biết 2 lệnh này thôi à,kiếm thêm đi

    ReplyDelete