Windows Script Host Script: F:\Files\Shockwave Player 11616269\Shockwave Player.vbs Line: 71 Char: 2 Error: The system cannot find the file specified Code: 800700002 Source: (null
'========================================================================= ' ' NAME: Shockwave Player 1161629 ' ' AUTHOR: Michael Roberts Desktop\Packaging Engineer ' ' DATE: 08/30/2011 ' ' COMMENT: This script will install Shockwave Player 1161629. ' If the installation is successful or failed the script will ' copy a log file to a network share. '========================================================================== Option Explicit Const OverwritExisting = True Const ForWriting = 2 Const For_Appending = 8 Public wshShell, objFSO, sMSIfile, strComputer, objNetwork, statusFlag Set objNetwork = WScript.CreateObject("WScript.Network") statusFlag ="" Dim strlog : strlog = "C:\Logs\" & objNetwork.UserName & "." & objNetwork.ComputerName & "." & "Shockwave.log" 'Set log file Dim netPath1 : netPath1 = "\\??.???.???.???\zen\LOGS\Adobe_Shockwave_1116629\Successful\" 'Target network Dim netPath2 : netPath2 = "\\??.???.???.???\zen\LOGS\Adobe_Shockwave_1116629\Failure\" 'Target network Dim strCommand, retErrcode, objFolder, sFolder, sComnd Set wshShell = CreateObject("WScript.Shell") Set objFSO = CreateObject("Scripting.FileSystemObject") If objFSO.FolderExists("C:\Logs") Then sFolder = 1 Else 'Create Logs folder if it does not exist Set objFolder = objFSO.CreateFolder("C:\Logs") sFolder = 0 End If Dim objTextFile : Set objTextFile = objFSO.CreateTextFile(strlog, True) objTextFile.Close Dim objFile : Set objFile = objFSO.GetFile(strlog) Dim TS : Set TS = objfile.OpenAsTextStream (FOR_APPENDING) If sFolder = 1 Then logaction("C:\Logs folder exists") Else logaction("C:\Logs folder DOES NOT exist .. creating Logs folder.") End If sMSIfile = "sw_lic_full_installer" logaction("The " & sMSIfile & " MSI (sw_lic_full_installer) is beginning its installation.") RunHiddenCommand "msiexec /i """ & Replace(WScript.ScriptFullName, "\" & WScript.ScriptName, "") & "\" & sMSIfile & ".msi""" & " /qb!- REBOOT=ReallySuppress ALLUSERS=1 /l*v " & """C:\Logs\" & sMSIfile & ".log""" 'Un-install old versions of Adobe Shockwave with un-install utility sMSIfile = "sw_uninstaller.msi" RunHiddenCommand Replace(WScript.ScriptFullName, "\" & WScript.ScriptName, "") & "\" & sMSIfile & "sw_unistaller.msi.exe.exe -uninstall" set objFSO = Nothing set objTextFile = Nothing set objFile = Nothing set TS = Nothing Set wshShell = Nothing Sub RunHiddenCommand(strCommand) ' On Error Resume Next retErrcode = wshShell.Run (strCommand, 0, True) If retErrcode = 0 Then logaction("The " & sMSIfile & " process completed sucessfully. The return error code is: " & retErrcode) statusFlag = "Successful" Else statusFlag = "Failure" End If End Sub Sub logaction(strtext) TS.WriteLine(now & vbtab & strtext) End Sub Wscript.Quit
RunHiddenCommand
echo
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)