tries = 0\r
max_tries = 10\r
If Right(DestFolder, 1) <> "\" Then DestFolder = DestFolder & "\" End If\r
- If Not FSO.FileExists(DestFolder & "7za.exe") Then\r
+ If Not FSO.FileExists(DestFolder & "7za1701.exe") Then\r
On Error Resume Next\r
Set MyFile = FSO.CreateTextFile(DestFolder & "7za.tag", False)\r
If Err <> 0 Then Wscript.echo("Downloading 7za: " & DestFolder & "7za.tag - " & Err.Description) End If\r
On Error Goto 0\r
If Not IsEmpty(MyFile) Then\r
- MyFile.WriteLine("This file marks a pending download for 7za.exe so we don't download it twice at the same time")\r
+ MyFile.WriteLine("This file marks a pending download for 7za1701.exe so we don't download it twice at the same time")\r
MyFile.Close\r
- Wget ToolsBase & "7za.exe", DestFolder\r
+ Wget ToolsBase & "7za1701.exe", DestFolder\r
FSO.DeleteFile DestFolder & "7za.tag", true\r
- Wscript.echo("Downloaded 7za.exe")\r
+ Wscript.echo("Downloaded 7za1701.exe")\r
End If\r
Set MyFile = Nothing\r
WScript.Sleep(500)\r
End If\r
Do While FSO.FileExists(DestFolder & "7za.tag") And tries < max_tries\r
- Wscript.echo("Waiting for 7za.exe to be downloaded")\r
+ Wscript.echo("Waiting for 7za1701.exe to be downloaded")\r
WScript.Sleep(1000)\r
tries = tries + 1\r
Loop\r
If tries = max_tries Then\r
- Wscript.echo("ERROR: Download of 7za.exe takes too much time")\r
+ Wscript.echo("ERROR: Download of 7za1701.exe takes too much time")\r
Wscript.quit 99\r
End If\r
End Sub\r
batname = "tmp" & Strip(Archive) & CStr(Int(10000*Rnd)) & ".bat"\r
wscript.echo("Extracting: " & Archive & " - using: " & batname)\r
Set MyFile = FSO.CreateTextFile(UtilsDir & batname, True)\r
- MyFile.WriteLine("@" & quote & UtilsDir & "7za.exe" & quote & " x " & quote & Archive & quote & " -y -o" & quote & DestFolder & quote )\r
+ MyFile.WriteLine("@" & quote & UtilsDir & "7za1701.exe" & quote & " x " & quote & Archive & quote & " -y -o" & quote & DestFolder & quote )\r
MyFile.Close\r
Set MyFile = Nothing\r
ExecPrintOutput(UtilsDir & batname)\r
wscript.echo("Ready extracting: " & Archive)\r
- Fn = Left(Archive, Len(Archive)-3)\r
+ Fn = fso.GetParentFolderName(Archive) & "\" & FSO.getbasename(Archive)\r
If FSO.FileExists(Fn) Then\r
Set MyFile = FSO.CreateTextFile(UtilsDir & batname, True)\r
- MyFile.WriteLine("@" & quote & UtilsDir & "7za.exe" & quote & " x " & quote & Fn & quote & " -y -o" & quote & DestFolder & quote )\r
+ MyFile.WriteLine("@" & quote & UtilsDir & "7za1701.exe" & quote & " x " & quote & Fn & quote & " -y -o" & quote & DestFolder & quote )\r
MyFile.Close\r
Set MyFile = Nothing\r
ExecPrintOutput(UtilsDir & batname)\r
wscript.echo("Deleting: " & Fn)\r
FSO.DeleteFile Fn,true\r
End If\r
- Fn = Fn & tar\r
If FSO.FileExists(Fn) Then\r
Set MyFile = FSO.CreateTextFile(UtilsDir & batname, True)\r
- MyFile.WriteLine("@" & quote & UtilsDir & "7za.exe" & quote & " x " & quote & Fn & quote & " -y -o" & quote & DestFolder & quote )\r
+ MyFile.WriteLine("@" & quote & UtilsDir & "7za1701.exe" & quote & " x " & quote & Fn & quote & " -y -o" & quote & DestFolder & quote )\r
MyFile.Close\r
Set MyFile = Nothing\r
ExecPrintOutput(UtilsDir & batname)\r