我试图在下载完成后安装软件。在我的代码中,我试图检查软件是否存在于下载位置。如果它存在安装应该开始其他等待。但我无法达到预期的效果。请帮忙。
Set oReadObj = CreateObject("Scripting.FileSystemObject")
set oRead = oReadObj.OpenTextFile("C:\STMSetup\downloadlocation.txt", 1)
Dim intLineCounter
intLineCounter = 0
Do Until oRead.AtEndOfStream
strLine = oRead.ReadLine
Loop
Set FSO = CreateObject("Scripting.FileSystemObject")
strLine = filename
Do Until FSO.FileExists(filename)
wscript.sleep 5000
Loop