Can a Batch Script to install any plugin or any solution MSI if the we are unable to install it from install policy?
ITMS 7.x, 8.x
The following script and instructions are provided AS IS and are intended to provide general guidance only and this is not supported by Broadcom Technical Support.
This can be run as a logon script or if the Job and Task is working it can be sent as a run script task from the Notification Server.
How to use:
Script:
@echo off
REM Checking Windows Architecture
REM Here we checking if %PROCESSOR_ARCHITECTURE% contain .86 or .64 symbols
REM you can use SET command to find all other system variables
echo Checking Windows OS architecture...
echo %PROCESSOR_ARCHITECTURE% | findstr /i ".64." > nul
IF %ERRORLEVEL% EQU 0 goto ver_64
goto ver_32
REM if OS architecture x86 found we installing x86 compatible .MSI package:
REM msiexec.exe /q /i where /q is quite and /i is installation
REM package_x64 and package_x86.msi is the name of MSI package
REM Modify the UNC Path based on your SMP or Package Server location
REM otherwise you should define absolute path to the MSI package
:ver_32
echo 32 bit detected
echo Installing application...
if exist "C:\Program Files\Altiris\Altiris Agent\installSMPlugin.txt" goto :end
net use u: "\\SMP-W2K8-01.EPM.LOCAL\NSCap\Bin\Win32\X86\Software Management\Plugin"
msiexec.exe /q /i "u:\SoftwareManagementSolution_Plugin_x86.msi"
TIMEOUT 30
REM Cleanup; Timestamp reinstall (for future check) and un map drive share
TIME /T > "C:\Program Files\Altiris\Altiris Agent\installSMPlugin.txt"
net use u: /DELETE
:end
REM comment "pause" if you don't need "Press any key to continue"
pause
exit
REM if OS architecture x64 found we installing x86 compatible .MSI package:
:ver_64
echo 64 bit detected
echo Installing application...
if exist "C:\Program Files\Altiris\Altiris Agent\installSMPlugin.txt" goto :end
net use u: "\\SMP-W2K8-01.EPM.LOCAL\NSCap\Bin\Win64\X64\Software Management\Plugin"
msiexec.exe /q /i "u:\SoftwareManagementSolution_Plugin_x64.msi"
TIMEOUT 30
REM Cleanup; Timestamp reinstall (for future check) and un map drive share
TIME /T > "C:\Program Files\Altiris\Altiris Agent\installSMPlugin.txt"
net use u: /DELETE
REM End of script
:end
REM comment "pause" if you don't need "Press any key to continue"
pause
exit