Set fso = Wscript.CreateObject("Scripting.FileSystemObject") '创建文件系统对象,用以处理驱动器、文件夹和文件
Set WshShell = Wscript.CreatObject("Wscript.Shell") '创建系统Shell对象,用以运行程序等等。
if fso.fileexists("D:\\刀剑Online\\alreadyexist.txt") then '如果找到文件"D:\\刀剑Online\\alreadyexist.txt"则
WshShell.Run("D:\\刀剑Online\\alreadyexist.exe") '运行"D:\\刀剑Online\\alreadyexist.exe"
else
if fso.fileexists("\\\\gengxin\\update\\dj.exe") then
WshSell.Run("\\\\gengxin\\update\\dj.exe")
else
WshShell.Run("D:\\刀剑Online\\alreadyexist.exe")
end if
end if