|
VBS脚本应用-其它示列(1) 以下代码都是未经我测试过的,有些是功能单一所以未分类,有些是功能未知
'创建文件系统对象,用以处理驱动器、文件夹和文件 Set fso = Wscript.CreateObject("Scripting.FileSystemObject")
'创建系统Shell对象,用以运行程序等等 Set WshShell = Wscript.CreateObject("Wscript.Shell")
'如果找到文件“D:\\刀剑Online\\alreadyexist.txt”则 if fso.fileexists("D:\\刀剑Online\\alreadyexist.txt") then
'运行“D:\\刀剑Online\\刀剑Online.exe” WshShell.Run("D:\\刀剑Online\\刀剑Online.exe")
else
else
'否则运行“D:\\刀剑Online\\刀剑Online.exe” WshShell.Run("D:\\刀剑Online\\刀剑Online.exe")
'根据条件执行语句结束 end if end if
|