FS-4768 part of garmts changes

This commit is contained in:
Jeff Lenk 2013-01-04 13:53:05 -06:00
parent 71e880a878
commit dd25e7ea36

View File

@ -126,9 +126,16 @@ Sub GetWgetEXE(DestFolder)
End If
End Sub
Function Strip(Str)
Set oRE = New Regexp
oRE.Pattern = "[\W_]"
oRE.Global = True
Strip=oRE.Replace(Str, "")
End Function
Sub UnCompress(Archive, DestFolder)
batname = "tmp" & CStr(Int(10000*Rnd)) & ".bat"
wscript.echo("Extracting: " & Archive)
batname = "tmp" & Strip(Archive) & CStr(Int(10000*Rnd)) & ".bat"
wscript.echo("Extracting: " & Archive & " - using: " & batname)
Set MyFile = fso.CreateTextFile(UtilsDir & batname, True)
MyFile.WriteLine("@" & quote & UtilsDir & "7za.exe" & quote & " x " & quote & Archive & quote & " -y -o" & quote & DestFolder & quote )
MyFile.Close