extra .bat (Or .cmd) at the end

Re: extra .bat (Or .cmd) at the end

Postby WSUSUpdateAdmin » 30.11.2018, 17:02

Hi.

Great, thanks, it't in. :)

Cheers
Torsten
WSUSUpdateAdmin
Administrator
 
Posts: 2245
Joined: 07.07.2009, 14:38

Re: extra .bat (Or .cmd) at the end

Postby Cababs » 10.11.2019, 04:40

i understand this topic is a year old but i've just come across this and realize its exactly what im doing but i think im going it wrong.

i have some software that i install with WOU from ..\wsusoffline\client\software\custom\InstallCustomSoftware.cmd
InstallCustomSoftware.cmd
Code: Select all
@ECHO OFF

REM Program Declarations
set AdobeAir= AdobeAIRInstaller.exe -silent

set AdobeFlash_activeX= install_flash_player_ax.exe -install
set AdobeFlash_Npapi= install_flash_player.exe -install
set AdobeFlash_Ppapi= install_flash_player_ppapi.exe -install

set AdobeReaderBase= AdbeRdr11010_en_US.exe /sPB
set AdobeReaderUpdate= AdbeRdrUpd11023.msp /passive

set AdobeShockwave= sw_lic_full_installer.exe /S

set AutoCadViewerXP= "SetupDWGTrueView2014_ENU_32bit\Setup.exe" /qb /i \setup.ini /language en-us
set AutoCadViewerx86= "DWGTrueView_2018_ENU_32bit\Setup.exe" /qb /i \setup.ini /language en-us
set AutoCadViewerx64= "DWGTrueView_2018_ENU_64bit\Setup.exe" /qb /i \setup.ini /language en-us

set Javax86= "Java 8.161 x86.exe" /s
set Javax64= "Java 8.161 x64.exe" /s

set MalwarebytesAntiMalware= mbam-setup-2.2.1.1043.exe /SILENT /NORESTART
set MalwarebytesAntiExploit= mbae-setup-1.09.1.1261.exe /SILENT /NORESTART
set Malwarebytes= mb3-setup-consumer-3.3.1.2183-1.0.262-1.0.3923.exe /SILENT /NORESTART

set Skype= SkypeSetupFull.exe /VERYSILENT /SP- /NOCANCEL /NORESTART /SUPPRESSMSGBOXES /NOLAUNCH

set VLCx86= "vlc-3.0.0-win32" /L=1033 /S
set VLCx64= "vlc-3.0.0-win64" /L=1033 /S

set WindowsEssentials2012= wlsetup-all.exe /AppSelect:Familysafety,Mail,MovieMaker,wlsync /noToolbarCEIP /noSearch /noHomepage /noMU /noLaunch /q


REM Check Windows Version
ver | findstr /i "5\.0\." > nul
IF %ERRORLEVEL% EQU 0 goto ver_2000

ver | findstr /i "5\.1\." > nul
IF %ERRORLEVEL% EQU 0 goto ver_XP

ver | findstr /i "5\.2\." > nul
IF %ERRORLEVEL% EQU 0 goto ver_2003

ver | findstr /i "6\.0\." > nul
IF %ERRORLEVEL% EQU 0 goto ver_Vista

ver | findstr /i "6\.1\." > nul
IF %ERRORLEVEL% EQU 0 goto ver_Win7

ver | findstr /i "6\.2\." > nul
IF %ERRORLEVEL% EQU 0 goto ver_Win8

ver | findstr /i "6\.3\." > nul
IF %ERRORLEVEL% EQU 0 goto ver_Win81

ver | findstr /i "10\.0\." > nul
IF %ERRORLEVEL% EQU 0 goto ver_Win10
goto warn_and_exit


:ver_Win10
ver
IF EXIST "%PROGRAMFILES(X86)%" (GOTO 64BIT) ELSE (GOTO 32BIT)
   :64BIT
   echo 64-bit...
   echo %TIME% - Adobe Air
   %AdobeAir%

   echo %TIME% - Adobe Reader 11.10
   %AdobeReaderBase%

   echo %TIME% - Adobe Reader 11.23 (Update)
   %AdobeReaderUpdate%

   echo %TIME% - AutoCad Viewer
   REM %AutoCadViewerx64%
   GOTO END
   


   :32BIT
   echo 32-bit...
   echo %TIME% - Adobe Air
   %AdobeAir%

   echo %TIME% - Adobe Reader 11.10
   %AdobeReaderBase%

   echo %TIME% - Adobe Reader 11.23 (Update)
   %AdobeReaderUpdate%
   GOTO END


:ver_Win81
ver
IF EXIST "%PROGRAMFILES(X86)%" (GOTO 64BIT) ELSE (GOTO 32BIT)
   :64BIT
   echo 64-bit...
   GOTO END

   echo %TIME% - Adobe Air
   %AdobeAir%

   echo %TIME% - Adobe Reader 11.10
   %AdobeReaderBase%

   echo %TIME% - Adobe Reader 11.23 (Update)
   %AdobeReaderUpdate%
   
   echo %TIME% - ADOBE Shockwave 12
   %AdobeShockwave%

   echo %TIME% - Java x86
   %Javax86%
   
   echo %TIME% - Java x64
   %Javax64%

   echo %TIME% - vlc x64
   %VLCx64%

   echo %TIME% - Skype
   %Skype%

   echo %TIME% - Windows Live Essentials 2012
   %WindowsEssentials2012%

   echo %TIME% - AutoCad Viewer
   %AutoCadViewerx64%
   GOTO END

   :32BIT
   echo 32-bit...
   echo %TIME% - Adobe Air
   %AdobeAir%

   echo %TIME% - Adobe Reader 11.10
   %AdobeReaderBase%

   echo %TIME% - Adobe Reader 11.23 (Update)
   %AdobeReaderUpdate%

   echo %TIME% - ADOBE Shockwave 12
   %AdobeShockwave%

   echo %TIME% - Java x86
   %Javax86%

   echo %TIME% - vlc x86
   %VLCx86%

   echo %TIME% - Skype
   %Skype%

   echo %TIME% - Windows Live Essentials 2012
   %WindowsEssentials2012%

   echo %TIME% - AutoCad Viewer
   %AutoCadViewerx86%
   GOTO END


:ver_Win8
ver
IF EXIST "%PROGRAMFILES(X86)%" (GOTO 64BIT) ELSE (GOTO 32BIT)
   :64BIT
   echo 64-bit...
   echo %TIME% - Adobe Air
   %AdobeAir%

   echo %TIME% - Adobe Reader 11.10
   %AdobeReaderBase%

   echo %TIME% - Adobe Reader 11.23 (Update)
   %AdobeReaderUpdate%
   
   echo %TIME% - ADOBE Shockwave 12
   %AdobeShockwave%

   echo %TIME% - Java x86
   %Javax86%
   
   echo %TIME% - Java x64
   %Javax64%

   echo %TIME% - vlc x64
   %VLCx64%

   echo %TIME% - Skype
   %Skype%

   echo %TIME% - Windows Live Essentials 2012
   %WindowsEssentials2012%
   GOTO END

   :32BIT
   echo 32-bit...
   echo %TIME% - Adobe Air
   %AdobeAir%

   echo %TIME% - Adobe Reader 11.10
   %AdobeReaderBase%

   echo %TIME% - Adobe Reader 11.23 (Update)
   %AdobeReaderUpdate%

   echo %TIME% - ADOBE Shockwave 12
   %AdobeShockwave%

   echo %TIME% - Java x86
   %Javax86%

   echo %TIME% - vlc x86
   %VLCx86%

   echo %TIME% - Skype
   %Skype%

   echo %TIME% - Windows Live Essentials 2012
   %WindowsEssentials2012%
   GOTO END


:ver_Win7
ver
IF EXIST "%PROGRAMFILES(X86)%" (GOTO 64BIT) ELSE (GOTO 32BIT)
   :64BIT
   echo 64-bit...
   echo %TIME% - Adobe Air
   %AdobeAir%
   
   echo %TIME% - Adobe Flash (activeX)
   %AdobeFlash_activeX%
   
   echo %TIME% - Adobe Flash (Npapi)
   %AdobeFlash_Npapi%
   
   echo %TIME% - Adobe Flash (Ppapi)
   %AdobeFlash_Ppapi%

   echo %TIME% - Adobe Reader 11.10
   %AdobeReaderBase%

   echo %TIME% - Adobe Reader 11.23 (Update)
   %AdobeReaderUpdate%
   
   echo %TIME% - ADOBE Shockwave 12
   REM %AdobeShockwave%

   echo %TIME% - Java x86
   %Javax86%
   
   echo %TIME% - Java x64
   %Javax64%

   echo %TIME% - vlc x64
   %VLCx64%

   echo %TIME% - Skype
   %Skype%

   echo %TIME% - Windows Live Essentials 2012
   %WindowsEssentials2012%
   GOTO END

   :32BIT
   echo 32-bit...
   echo %TIME% - Adobe Air
   %AdobeAir%
   
   echo %TIME% - Adobe Flash (activeX)
   %AdobeFlash_activeX%
   
   echo %TIME% - Adobe Flash (Npapi)
   %AdobeFlash_Npapi%
   
   echo %TIME% - Adobe Flash (Ppapi)
   %AdobeFlash_Ppapi%

   echo %TIME% - Adobe Reader 11.10
   %AdobeReaderBase%

   echo %TIME% - Adobe Reader 11.23 (Update)
   %AdobeReaderUpdate%

   echo %TIME% - ADOBE Shockwave 12
   %AdobeShockwave%

   echo %TIME% - Java x86
   %Javax86%

   echo %TIME% - vlc x86
   %VLCx86%

   echo %TIME% - Skype
   %Skype%

   echo %TIME% - Windows Live Essentials 2012
   %WindowsEssentials2012%
   GOTO END


:ver_Vista
ver
IF EXIST "%PROGRAMFILES(X86)%" (GOTO 64BIT) ELSE (GOTO 32BIT)
   :64BIT
   echo 64-bit...
   GOTO END

   :32BIT
   echo 32-bit...
   echo %TIME% - Adobe Air
   %AdobeAir%

   echo %TIME% - Adobe Reader 11.10
   %AdobeReaderBase%

   echo %TIME% - Adobe Reader 11.23 (Update)
   %AdobeReaderUpdate%

   echo %TIME% - ADOBE Shockwave 12
   %AdobeShockwave%

   echo %TIME% - Java x86
   %Javax86%

   echo %TIME% - vlc x86
   %VLCx86%

   echo %TIME% - Skype
   %Skype%
   GOTO END

:ver_2003
ver
IF EXIST "%PROGRAMFILES(X86)%" (GOTO 64BIT) ELSE (GOTO 32BIT)
   :64BIT
   echo 64-bit...
   GOTO END

   :32BIT
   echo 32-bit...
   GOTO END


:ver_XP
ver
IF EXIST "%PROGRAMFILES(X86)%" (GOTO 64BIT) ELSE (GOTO 32BIT)
   :64BIT
   echo 64-bit...
   GOTO END

   :32BIT
   echo 32-bit...
   echo %TIME% - Adobe Air
   %AdobeAir%

   echo %TIME% - Adobe Reader 11.10
   %AdobeReaderBase%

   echo %TIME% - Adobe Reader 11.23 (Update)
   %AdobeReaderUpdate%

   echo %TIME% - ADOBE Shockwave 12
   %AdobeShockwave%

   echo %TIME% - Java x86
   %Javax86%

   echo %TIME% - vlc x86
   %VLCx86%

   echo %TIME% - Skype
   %Skype%
   
   echo %TIME% - AutoCAD Viewer
   %AutoCadViewerXP%
   GOTO END


:ver_2000
ver
IF EXIST "%PROGRAMFILES(X86)%" (GOTO 64BIT) ELSE (GOTO 32BIT)
   :64BIT
   echo 64-bit...
   GOTO END

   :32BIT
   echo 32-bit...
   GOTO END


:warn_and_exit
echo Machine OS cannot be determined.

:END
echo.


this works perfectly but it is doing this on every recall. ideally i want this after all updates have been installed. should i be using "..\wsusoffline\client\cmd\custom\FinalizationHookFinal.cmd" to do this?
Notable Achievements
CompTIA A+
HNC Computing
Cababs
 
Posts: 186
Joined: 22.12.2013, 01:17

Re: extra .bat (Or .cmd) at the end

Postby Dalai » 10.11.2019, 16:22

Cababs wrote:ideally i want this after all updates have been installed. should i be using "..\wsusoffline\client\cmd\custom\FinalizationHookFinal.cmd" to do this?

Yes. Or check the values of REBOOT_REQUIRED and/or RECALL_REQUIRED variables and act accordingly.

Regards
Dalai
Dalai
 
Posts: 1011
Joined: 12.07.2016, 21:00

Previous

Return to Verschiedenes / Miscellaneous

Who is online

Users browsing this forum: Google [Bot] and 9 guests