some useful win cmd

///////////////////////////////

vbs for login qq

set WshShell = WScript.CreateObject(“WScript.Shell”)

WshShell.run “runas /user:less qq”  ‘qq should be in the same folder
WScript.Sleep 1000
WshShell.SendKeys “123456”  ‘password
WshShell.SendKeys “{ENTER}”
WScript.Sleep 1000

‘WshShell.SendKeys “exit”
‘WshShell.SendKeys “{ENTER}”

/////////////////////////////

linux grep alternative,windows’s find,findstr

find /?
findstr /?
dir|findstr "work"
dir|find "work"
type sqlprov.log|find /i "sql"
type sqlprov.log|findstr /i "sql"
netstat -na | find "8580"

/////////////////////////////

;(first u should install python)
;this following reg file is used for windows cmd,and file sharing using python when
;u right click the folder:

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\Directory\shell\cmd]
@="Dos 在这里"

[HKEY_CLASSES_ROOT\Directory\shell\cmd\command]
@="cmd.exe /k \"cd %L\""

[HKEY_CLASSES_ROOT\Directory\shell\sharepython]
@="python share"

[HKEY_CLASSES_ROOT\Directory\shell\sharepython\command]
@="cmd.exe /k \"cd %L && c:\\python27\\python.exe -m SimpleHTTPServer 9000\""

[HKEY_CLASSES_ROOT\Drive\shell\cmd]
@="Dos 在这里"

[HKEY_CLASSES_ROOT\Drive\shell\cmd\command]
@="cmd.exe /k \"cd %L\""

//////////////////////////
::desktop.bat

cd /d %userprofile%\桌面
::explorer %cd%
cmd
  1. No trackbacks yet.

Leave a comment