vbs循環(huán)產(chǎn)生的參數(shù)的傳遞問題
更新時(shí)間:2008年06月09日 23:08:17 作者:
用vbs實(shí)現(xiàn)循環(huán)產(chǎn)生參數(shù)的傳遞問題,建議大家測試學(xué)習(xí)
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.OpenTextFile("d:\1\0.txt", 1)
set WshShell = WScript.CreateObject("WScript.Shell")
strFolder = "d:\1\"
Do Until objFile.AtEndOfStream
strLine = objFile.ReadLine
filename = strLine
Set objFile = objFSO.GetFile(filename)
set oShellLink = WshShell.CreateShortcut(strFolder & objFSO.GetBaseName(filename) & ".lnk")
oShellLink.TargetPath = objFile
oShellLink.WindowStyle = 1
oShellLink.WorkingDirectory = objFSO.GetParentFolderName(filename)
oShellLink.Save
Loop
objFile.Close
這個(gè)只傳遞一次就完了
Set objFile = objFSO.OpenTextFile("d:\1\0.txt", 1)
set WshShell = WScript.CreateObject("WScript.Shell")
strFolder = "d:\1\"
Do Until objFile.AtEndOfStream
strLine = objFile.ReadLine
filename = strLine
Set objFile = objFSO.GetFile(filename)
set oShellLink = WshShell.CreateShortcut(strFolder & objFSO.GetBaseName(filename) & ".lnk")
oShellLink.TargetPath = objFile
oShellLink.WindowStyle = 1
oShellLink.WorkingDirectory = objFSO.GetParentFolderName(filename)
oShellLink.Save
Loop
objFile.Close
這個(gè)只傳遞一次就完了
相關(guān)文章
利用wscript執(zhí)行文件[包括可執(zhí)行exe文件]vbs腳本
利用wscript執(zhí)行文件[包括可執(zhí)行exe文件]vbs腳本...2007-02-02VBS 強(qiáng)制關(guān)閉Symantec Endpoint Protection的代碼
很多企業(yè)電腦系統(tǒng)是Windows Xp,使用Windows server 2003 來控制,其中客戶端得殺毒軟件有不少是使用 Symantec Endpoint Protection2013-01-01VBScript 打造自己的遠(yuǎn)程CMDShell附使用教程
這個(gè)cmdshell需要結(jié)合nc進(jìn)行配合使用,現(xiàn)在肉雞上執(zhí)行cmdshell然后在本地上面運(yùn)行nc,注意看下面的參數(shù)2013-07-07VBScript Enun Remote CMD Shell代碼
Enun Remote CMDShell,喜歡玩cmdshell的朋友可以參考下2013-07-07