<script language=
"vbscript"
>
sub datacheck()
if
func_FileExist(
"C:\Program Files\easylogic\oa.elc"
)=
true
then
Dim WshShell
Set WshShell = CreateObject(
"WScript.Shell"
)
WshShell.Run
""
"C:\Program Files\easylogic\oa.elc"
""
Set WshShell = Nothing
else
window.location.href
"../erpLoginCheck.htm?ReturnUrl="
+ window.location.href
exit sub
end
if
end sub
Function func_FileExist(strFilePath)
set oFSO = createObject(
"Scripting.FileSystemObject"
)
boolFileExists = oFSO.fileExists(strFilePath)
set oFSO = Nothing
func_FileExist = boolFileExists
End Function
</script>
描述:利用VBscript判断指定的文件是否存在,如果不存在则跳到下载页面,如果存在则直接打开