securecrt的vbs指令碼

2021-06-18 17:43:54 字數 924 閱讀 6141

vbs檔案內容:

#$language = "vbscript"

#$inte***ce = "1.0" 

sub main

crt.screen.synchronous = true

'獲取securecrt物件,定義變數

'dim objtab

'set objtab = crt.getscripttab

'1.跳轉到相應的目錄,vbcr表示回車

szcommand="cd /home"

crt.screen.send szcommand & vbcr

'等待命令執行成功後,才執行下面的語句

crt.screen.waitforstring "["

szcommand="rz"

crt.screen.send szcommand & vbcr

crt.screen.waitforstring "["

'3.移動檔案到相應的目錄

'szcommand="mv -f mysky.txt /home"

'crt.screen.send szcommand & vbcr

'crt.screen.waitforstring "["

'4.壓縮檔案

szcommand="zip test2013_backup.zip mysky.txt"

crt.screen.send szcommand & vbcr

crt.screen.waitforstring "["

szcommand="sz test2013_backup.zip"

crt.screen.send szcommand & vbcr

crt.screen.waitforstring "["

crt.screen.synchronous = false

end sub

指令碼 vbs 有用的指令碼

指令碼 vbs 有用的指令碼 2010年01月15日 顯示系統版本 for each ps in getobject winmgmts root cimv2 win32 operatingsystem instances wscript.echo ps.caption ps.version next...

secureCRT指令碼編寫

securecrt支援三種指令碼語言 vbs,js,python。三種指令碼分別以一下三種形式開頭 vbs language vbscript inte ce 1.0 js language jscript inte ce 1.0 python language python inte ce 1.0...

VBS 常用指令碼

將域使用者或租新增到本地組 set objgroup getobject winnt administrators set objuser getobject winnt testnet engineers objgroup.add objuser.adspath 修改本地管理員密碼 set obj...