本帖最后由 lomey 于 2015-10-17 11:46 编辑
- Dim Counter,msg,fso,WshShell
- Set fso = CreateObject("Scripting.FileSystemObject")
- Set WshShell = WScript.CreateObject("WScript.Shell")
- File = "D:\开机命令\Run.bat"
- While fso.FileExists(File) = False
-
- WScript.Sleep 1000
- Wend
- Return = WshShell.Run("cmd.exe /C"&File, 0 )
复制代码 如何修改以上代码,查找D盘与Z盘,D与Z盘符不同时存在,运行以下两条命令其中一条即可。
D:\开机命令\Run.bat
Z:\开机命令\Run.bat |