/build/static/layout/Breadcrumb_cap_w.png

MSI Software Deployment Using Batch File

I am attempting to install a three part msi install of Sophos Encryption using a batch file.  It is relatively simple and works when I manually attempt to install it on a machine using admin credentials as well as emulating the Local System User account.  I've zipped up the four install files and batch file and uploaded it to KBOX.  I then set it to run the batch file before the desktop loads.  When it runs on a machine instead of installing anything it just pops up the window for the msiexec paremeter list, like when you've mistyped something into the msiexec command line or just typed msiexec.  You click OK and then it goes to the desktop with no actions taken.

Here is the batch file's contents:

@echo off
@setlocal enableextensions
@cd /d "%~dp0"

echo Starting Sophos PreInstall
start /wait msiexec.exe /i SGxClientPreinstall.msi /passive /norestart

echo.
echo Starting Sophos Client Install
if "%ProgramFiles(x86)%" == "" goto on32bit
  goto on64bit

:on32bit

start /wait msiexec.exe /i SGNClient_x32.msi /passive /norestart
goto end

:on64bit

start /wait msiexec.exe /i SGNClient_x64.msi /passive /norestart
goto end

:end
echo.
echo Starting Sophos Client Configuration
start /wait msiexec.exe /i 6_sophos_post_install.msi /passive /norestart

0 Comments   [ + ] Show comments

Answers (2)

Answer Summary:
Using the "%~dp0" in the msiexec call fixed the issue. Thank you for your help. start /wait msiexec.exe /i "%~dp0SGxClientPreinstall.msi" /passive /norestart
Posted by: jagadeish 11 years ago
Red Belt
4

Can you try this?

@echo off
@setlocal enableextensions

echo Starting Sophos PreInstall
start /wait msiexec.exe /i "%~dp0SGxClientPreinstall.msi" /passive /norestart

echo.
echo Starting Sophos Client Install
if "%ProgramFiles(x86)%" == "" goto on32bit
  goto on64bit

:on32bit

start /wait msiexec.exe /i "%~dp0SGNClient_x32.msi" /passive /norestart
goto end

:on64bit

start /wait msiexec.exe /i "%~dp0SGNClient_x64.msi" /passive /norestart
goto end

:end
echo.
echo Starting Sophos Client Configuration
start /wait msiexec.exe /i "%~dp06_sophos_post_install.msi" /passive /norestart


Comments:
Posted by: chucksteel 11 years ago
Red Belt
0

Have you checked the C:\ProgramData\Dell\KACE\downloads directory for the package and made sure that the paths are correct? If the MSI files are in a directory it might be best to hardcode the paths into the script, so if you know that the package will be in C:\ProgramData\Dell\KACE\downloads\12345 run msiexec /i C:\ProgramData\Dell\KACE\downloads\12345\package.msi instead of changing to the folder. 

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ