iT邦幫忙

0

請問open-audit的VBS腳本有辦法背景執行嗎?(已解決)

  • 分享至 

  • twitterImage

其實open-audit-WINDOWS.VBS內有個參數,可以讓VBS執行時,隱藏視窗。
https://ithelp.ithome.com.tw/upload/images/20191226/20002331uOWy6sakKe.jpg
https://ithelp.ithome.com.tw/upload/images/20191226/20002331zLcOpF9iDY.jpg
https://ithelp.ithome.com.tw/upload/images/20191226/20002331LPkbktyLAX.jpg
...............
最近拜讀節省哥的文章,架了open-audit資產管理系統,因跑GPO讓USER端登入時,CMD視窗停在桌面太久,怕USER去點掉,有辦法背景隱藏執行VBS? 我查到的都是讓CMD隱藏的資訊。

圖片
  直播研討會
圖片
{{ item.channelVendor }} {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中

2 個回答

2
echochio
iT邦高手 1 級 ‧ 2019-12-21 21:34:35
最佳解答

附上vbscript 範例 , 這是之前我安裝趨勢防毒的 vbscript ....
這 vbscript 放在GPO 設定登入執行 ...

cscript \\192.168.1.1\trend\client.vbs

這個vbscript 會在 5 分鐘後執行

\\192.168.1.1\trend\trend-client.bat

當然前端使用者看不到 ... 且權限夠
至於 trend-client.bat 批次檔這邊就不寫了
... 其實 bat 就是看 目錄裡面的檔案在不在不在就重裝

WScript.Sleep 5*60*1000
Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.currentdirectory="c:\"
WshShell.Run "\\192.168.1.1\trend\trend-client.bat", 0
Set WshShell = Nothing
fireflybug iT邦研究生 4 級 ‧ 2019-12-22 11:48:22 檢舉

感謝 我試出來了

1.建立audit.vbs (延遲五分鐘後背景安裝)
...................
WScript.Sleep 5x60x1000(x自己改成星號)
Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.currentdirectory="c:"
WshShell.Run "\FILESRV-VM\gpowork\Open-AudIT_SCRIPT\runVBS_audit_windows.bat", 0
Set WshShell = Nothing
...................

2.建立一個批次檔runVBS_audit_windows.bat來呼叫audit附的vbs檔案
...................
cscript.exe \FILESRV-VM\gpowork\Open-AudIT_SCRIPT\audit_windows-20191221.vbs
...................

3.把audit.vbs檔案放到GPO讓使用者登入時執行
audit.vbs

0

還有一招是放在系統的排程器裡,用 Administrator 權限去執行。

fireflybug iT邦研究生 4 級 ‧ 2019-12-24 10:53:39 檢舉

好辦法 感謝節省哥

我要發表回答

立即登入回答