This is what I use to install Skype standalone EXEs in our enterprise. This includes creating event logs, tracking, and splitting up the wrapper from the installer. I gather up all my resource files (progress bars, images, EXEs, and other files) and compile them into one nice EXE file. The wrapper acts as my initiation file and handles global sequencing.
The Wrapper.exe
On Error Resume Next Dim CommandLine, CurrentFolder, objRegistry, strComputer, regValue, regValueName, regPath, objShell, objfso, Path64, Path86, LDFolder, strDate, BuildVersion AppName = "Skype" BuildVersion = "7.30.64.105" CreateEventLog = "EVENTCREATE /T INFORMATION /L Application /ID 777 /d " & Chr(34) & "Engineer: " & AppName & " " & BuildVersion & " package installation" Const HKEY_LOCAL_MACHINE = &H80000002 strComputer = "." Set objRegistry = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & strComputer & "\root\default:StdRegProv") set ObjShell = CreateObject("WScript.Shell") Set objfso = CreateObject("Scripting.FileSystemObject") SetStringValue = REG_SZ 'Determine if 32 or 64 bit LDClient is installed Path64 = "C:\Progra~2" Path86 = "C:\Progra~1" LDFolder = "\LANDesk\LDClient\sdmcache\apps\Microsoft\Skype\7.30.64.105" If (objfso.FolderExists(Path64 & LDFolder)) Then CurrentFolder = Path64 & LDFolder Else CurrentFolder = Path86 & LDFolder End If 'Set command line operation - the installer.exe contains vbscript with command line options to install Skype 'example: 'CommandLine = "%comspec% /c " & CurrentDirectory & "\SkypeSetupFull.exe /VERYSILENT /SP- /NOCANCEL /NORESTART /SUPPRESSMSGBOXES /NOLAUNCH" 'I separate the install process from the wrapper because it makes sequence file management much easier to handle 'if you have multiple installer.exe's CommandLine = "%comspec% /c " & chr(34) & CurrentFolder & "\Installer.exe" & chr(34) 'Launch operation with event logging ObjShell.Run CreateEventLog & " STARTED" & Chr(34),0,True ObjShell.Run CommandLine,0,True ObjShell.Run CreateEventLog & " COMPLETED" & Chr(34),0,True WScript.Sleep 2000 'Stamp registry for tracking strDate = chr(34) & NOW & chr(34) regValueName = "Timestamp" regPath = "SOFTWARE\COMPANY\" & AppName & "\" & BuildVersion 'create main key objRegistry.CreateKey HKEY_LOCAL_MACHINE, regPath 'set value objRegistry.SetStringValue HKEY_LOCAL_MACHINE,regPath, regValueName, strDate 'Clear session CommandLine = "" CurrentFolder = "" objRegistry = "" strComputer = "" regValue = "" regValueName = "" regPath = "" objShell = "" objfso = "" Path64 = "" Path86 = "" LDFolder = "" strDate = "" AppName = "" BuildVersion = "" WScript.Quit(0)
The Installer.exe
on error resume next Dim CommandLine, CurrentFolder, objfso, Path64, Path86, LDFolder, objShell set objShell = CreateObject("WScript.Shell") Set objfso = CreateObject("Scripting.FileSystemObject") 'Determine if 32 or 64 bit LDClient is installed Path64 = "C:\Progra~2" Path86 = "C:\Progra~1" LDFolder = "\LANDesk\LDClient\sdmcache\apps\Microsoft\Skype\7.30.64.105" If (objfso.FolderExists(Path64 & LDFolder)) Then CurrentFolder = Path64 & LDFolder Else CurrentFolder = Path86 & LDFolder End If 'kills the progress bar objShell.Run "taskkill.exe /f /im mshta.exe",0,False WScript.Sleep 2000 'launches the progress bar objShell.Run "%comspec% /c " & CurrentFolder & "\progress.hta",0,False 'set command line operation CommandLine = "%comspec% /c " & chr(34) & CurrentFolder & "\SkypeSetupFull.exe" & Chr(34) & " /VERYSILENT /SP- /NOCANCEL /NORESTART /SUPPRESSMSGBOXES /NOLAUNCH" 'launch operation objShell.Run CommandLine,0,True WScript.Sleep 2000 'kills the progress bar objShell.Run "taskkill.exe /f /im mshta.exe",0,false 'clear session CommandLine = "" CurrentFolder = "" Path64 = "" Path86 = "" LDFolder = "" objfso = "" objShell = "" WScript.Quit(0)