Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Function Zip(sFile,sArchiveName)
'This function executes the command line
'version of WinRAR and reports whether
'the archive exists after WinZip exits.
'If it exists then it returns true. If
'not it returns an error message.
Set oFSO = WScript.CreateObject("Scripting.FileSystemObject")
Set oShell = WScript.CreateObject("Wscript.Shell")
'--------Find Working Directory--------
aScriptFilename = Split(Wscript.ScriptFullName, "\")
sScriptFilename = aScriptFileName(Ubound(aScriptFilename))
sWorkingDirectory = Replace(Wscript.ScriptFullName, sScriptFilename, "")
'--------------------------------------
'-------Ensure we can find Winrar.exe------
If oFSO.FileExists(sWorkingDirectory & " " & "Winrar.EXE") Then
sWinZipLocation = ""
ElseIf oFSO.FileExists("C:\program files\Winrar\Winrar.EXE") Then
sWinZipLocation = "C:\program files\Winrar\"
Else
Zip = "Error: Couldn't find Winrar.EXE"
Exit Function
End If
'--------------------------------------
oShell.Run """" & sWinZipLocation & "winrar.exe"" a -IBCK """ & _
sArchiveName & """ """ & sFile & """", 0, True
If oFSO.FileExists(sArchiveName) Then
Zip = 1
Else
Zip = "Error: Archive Creation Failed."
End If
End Function