====== Unzip using cscript and Wsh ====== I have no permission to run powershell in the library computer, so I can't use powershell to unzip from command line. I have to use GUI everytime I make a new backup of database and want to use access over the backup. But I can use cscript to decompress the files via shell32.dll: 'Modified from something I saw on the net. Sub UnZip(ExtractTo,ZipFile) WScript.echo "Entering Unzip ("& ExtractTo &","& ZipFile &")" Set fso = CreateObject("Scripting.FileSystemObject") If NOT fso.FolderExists(ExtractTo) Then fso.CreateFolder(ExtractTo) End If Set objShell = CreateObject("Shell.Application") Set FilesInZip=objShell.NameSpace(ZipFile).items objShell.NameSpace(ExtractTo).CopyHere(FilesInZip) Set fso = Nothing Set objShell = Nothing End Sub 'Add current directory to route if needed. 'This is vital to get a valid filename we can use with nameSpace function. Function DefaultDir (FileOrRoute , DefaultRoute ) Dim DD 'Si el archivo contiene ":", tenemos la ruta completa. if instr(FileOrRoute,":")>0 then DefaultDir=FileOrRoute exit Function end if 'Si el archivo comienza por "\", necesitamos la unidad if left (FileOrRoute,1)="\" then DD=Left(DefaultRoute,instr(DefaultRoute,":")) if right(DD,1)<>"\" then DD=DD+"\" DefaultDir = DD+FileOrRoute exit Function end if 'Caso contrario: 'AƱadir DefaultRoute entero. DD=DefaultRoute if right(DD,1)<>"\" then DD=DD+"\" DefaultDir = DD+FileOrRoute End Function set WshShell = WScript.CreateObject("WScript.Shell") strDesktop = WshShell.SpecialFolders("MyDocuments") strCurrent=WshShell.CurrentDirectory if (Wscript.arguments.count=2) then strZipFile = Wscript.arguments(0) strUnzipped = Wscript.arguments(1) strZipPath = DefaultDir(strZipFile,strCurrent) strUnzipPath = DefaultDir(strUnzipped,strCurrent) UnZip strUnzipPath , strZipPath else Wscript.Echo ("Wrong number of arguments: INFILE OUTFILE") end if