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
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
Cancel
0 Comments   [ + ] Show Comments

Comments

Please log in to comment

Community Chosen Answer

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

Answered 10/04/2012 by: jagadeish
Red Belt

Please log in to comment

Answers

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. 

Answered 10/05/2012 by: chucksteel
Red Belt

Please log in to comment
Answer this question or Comment on this question for clarity