Windows Host ing ...

來源: CutOnce 2006-11-17 09:29:30 [] [舊帖] [給我悄悄話] 本文已被閱讀: 次 (782 bytes)
vbs or j
here is a j example to run notepad three times (one after another not all three instances at the same time)


var WshShell = W.CreateObject("W.Shell");

for (var i = 0; i < 3; i++) {
WshShell.Run("notepad.exe", 5, true);
}


save it with .js extension and execute it using c in command prompt or double-click in windows explorer

the third boolean parameter controls if it waits on return. batch file has no such control


Windows Host reference:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/56/html/60f96092-6021-42f3-9a27-6848f4c38f64.asp
WshShell.Run method reference:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/56/html/6f28899c-d653-4555-8a59-49640b0e32ea.asp

所有跟帖: 

bad wenxuecity input filter!!! -CutOnce- 給 CutOnce 發送悄悄話 (245 bytes) () 11/17/2006 postreply 09:32:37

請您先登陸,再發跟帖!

發現Adblock插件

如要繼續瀏覽
請支持本站 請務必在本站關閉/移除任何Adblock

關閉Adblock後 請點擊

請參考如何關閉Adblock/Adblock plus

安裝Adblock plus用戶請點擊瀏覽器圖標
選擇“Disable on www.wenxuecity.com”

安裝Adblock用戶請點擊圖標
選擇“don't run on pages on this domain”