8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-22 16:03:03 +01:00
firebird-mirror/builds/win32/unzip.vbs
Vlad Khorsun 192e06f1e1 Change way to search for unzip utility:
- allow caller (user) to explicitly set full path to the unzip.exe using FB_UNZIP environment variable,
- if FB_UNZIP is not set, look up in PATH,
- try GIT folder,
- at last use simple VBS script.
2023-07-16 17:50:52 +03:00

31 lines
799 B
Plaintext

src = Wscript.Arguments(0) ' source zip archive name
dst = Wscript.Arguments(1) ' destination folder name
set objShell = CreateObject("Shell.Application")
set srcFiles = objShell.NameSpace(src)
set dstFolder = objShell.NameSpace(dst)
if (srcFiles is nothing) then
set fso = CreateObject("Scripting.FileSystemObject")
fso.GetStandardStream(2).WriteLine "Wrong source file name: " & src
Wscript.Quit
end if
if (dstFolder is nothing) then
set fso = CreateObject("Scripting.FileSystemObject")
call fso.CreateFolder(dst)
set dstFolder = objShell.NameSpace(dst)
end if
' Options
' 4
' Do not display a progress dialog box.
' 16
' Respond with "Yes to All" for any dialog box that is displayed.
call dstFolder.CopyHere(srcFiles.items, 16+4)
set srcFiles = Nothing
Set objShell = Nothing