Hi,
This is a vbscript dealing with zip file. According to this code I found online if the outFolder does not exist, it should be created automatically. Any ideas as to what may be wrong? What I am also not sure about is where the zip file should reside so the script can find it.
Here is the link from the original script I found:
Thanks
Const NOCONFIRMATION = &H10&
Const NOERRORUI = &H400&
Const SIMPLEPROGRESS = &H100&
cFlags = NOCONFIRMATION + NOERRORUI + SIMPLEPROGRESS
strZipFile = "\PrinterInstaller.zip"
outFolder = "C:\Program Files (x86)\Print\Print Utility"
Set fso = CreateObject("Scripting.FileSystemObject")
Set f1 = fso.GetFolder(".\C:\Program Files (x86)\Print\Print Utility")
If Not fso.FolderExists(outFolder) Then
fso.CreateFolder(outFolder)
End If
Set objShell = CreateObject("Shell.Application")
Set objSource = objShell.NameSpace(f1+strZipFile).Items()
Set objTarget = objShell.NameSpace(outFolder)
objTarget.CopyHere objSource, cFlags
Set WshShell = WScript.CreateObject("WScript.Shell")
Set oShellLink = WshShell.CreateShortcut(SM & "Printer Installer 1.lnk")
oShellLink.TargetPath = PATH & "Print Utility\Launcher.exe"
oShellLink.WorkingDirectory = PATH & "Print Utility\"
oShellLink.IconLocation = PATH & "Print Utility\printer.ico"
oShellLink.Save
Set WshShell = WScript.CreateObject("WScript.Shell")
Set oShellLink = WshShell.CreateShortcut(SM & "Printer Installer 2.lnk")
oShellLink.TargetPath = PATH & "Print Utility\Launcher.exe"
oShellLink.WorkingDirectory = PATH & "Print Utility\"
oShellLink.IconLocation = PATH & "Print Utility\printer.ico"
oShellLink.Save
This is a vbscript dealing with zip file. According to this code I found online if the outFolder does not exist, it should be created automatically. Any ideas as to what may be wrong? What I am also not sure about is where the zip file should reside so the script can find it.
Here is the link from the original script I found:
Thanks
Const NOCONFIRMATION = &H10&
Const NOERRORUI = &H400&
Const SIMPLEPROGRESS = &H100&
cFlags = NOCONFIRMATION + NOERRORUI + SIMPLEPROGRESS
strZipFile = "\PrinterInstaller.zip"
outFolder = "C:\Program Files (x86)\Print\Print Utility"
Set fso = CreateObject("Scripting.FileSystemObject")
Set f1 = fso.GetFolder(".\C:\Program Files (x86)\Print\Print Utility")
If Not fso.FolderExists(outFolder) Then
fso.CreateFolder(outFolder)
End If
Set objShell = CreateObject("Shell.Application")
Set objSource = objShell.NameSpace(f1+strZipFile).Items()
Set objTarget = objShell.NameSpace(outFolder)
objTarget.CopyHere objSource, cFlags
Set WshShell = WScript.CreateObject("WScript.Shell")
Set oShellLink = WshShell.CreateShortcut(SM & "Printer Installer 1.lnk")
oShellLink.TargetPath = PATH & "Print Utility\Launcher.exe"
oShellLink.WorkingDirectory = PATH & "Print Utility\"
oShellLink.IconLocation = PATH & "Print Utility\printer.ico"
oShellLink.Save
Set WshShell = WScript.CreateObject("WScript.Shell")
Set oShellLink = WshShell.CreateShortcut(SM & "Printer Installer 2.lnk")
oShellLink.TargetPath = PATH & "Print Utility\Launcher.exe"
oShellLink.WorkingDirectory = PATH & "Print Utility\"
oShellLink.IconLocation = PATH & "Print Utility\printer.ico"
oShellLink.Save