Installing App with Config File

I’m trying to install a VPN client (Pulse Secure) that can utilize a config file so that it automatically adds the VPN server information. I can get the application to install just fine in all cases below, but the install process skips completely over the config file unless I embed the config file in the image. We really do not want to embed the file since it contains information pertaining to the server. Here’s what I’ve done so far:

  1. (WORKS) In a captured Windows image with the config file in a directory on C:. Use this command line msiexec /i ps-pulse-win-9.1r15.0-b15819-64bit-installer.msi CONFIGFILE=C:\ProgramData\Default.pulsepreconfig /qn
  2. (DOES NOT WORK) This installs the app, but ignores the config file. Set working directory to \\server\share\folder. Use this command line msiexec /i ps-pulse-win-9.1r15.0-b15819-64bit-installer.msi CONFIGFILE=Default.pulsepreconfig /qn
  3. (DOES NOT WORK) This installs the app, but ignores the config file. Leave working directory set to .\Applications\PulseSecure. Use this command line msiexec /i ps-pulse-win-9.1r15.0-b15819-64bit-installer.msi CONFIGFILE=Default.pulsepreconfig /qn

I’m at a loss as to what to put on the command line entry in MDT so that it recognizes/uses the config file from a location other than a directory that’s on the system that’s being imaged. I know there are other programs out there that use a config file in this manner (MATLAB for one). So, I know it’s gotta be possible.

what i did was use a script that copies the files to the local machine, runs the install with the config file, then removes the files

it installs with all settings

I would put it in a script, I create a cabs folder and leave non sensitive config file and utils there for later as well. In your case remove the config file.

I like to use Powershell appdeploy toolkit for all scripts as it adds logging and a consistent command line.

-------

or possibly try with config file in same folder as msi

msiexec /i ps-pulse-win-9.1r15.0-b15819-64bit-installer.msi CONFIGFILE=.\Default.pulsepreconfig /qn

or

msiexec /i ps-pulse-win-9.1r15.0-b15819-64bit-installer.msi CONFIGFILE=%~dp0Default.pulsepreconfig /qn

Could you not do:
msiexec /i ps-pulse-win-9.1r15.0-b15819-64bit-installer.msi CONFIGFILE=\\server\share\folder\Default.pulsepreconfig /qn

I experimented with various scenarios to get this to work, such as baking in a scripts folder to store the necessary reference files. However, we finally decided the safest method to accomplish this was to create a .bat file to use as the installer. Within the .bat file, we can script it however we want, and it ended up being much simpler than originally expected. Here’s the code we used:

@echo off

pushd "%~dp0"

echo "Installing Pulse Secure"

msiexec /i %~dp0PulseSecure.msi CONFIGFILE=%~dp0Default.pulsepreconfig /qn

popd

exit /b 0

After finding this out, we were also able to follow the same process to install Matlab, but required some extra coding to see the installation progress since MDT saw the first exe process ending as the end of the install (which it isn’t).

@echo off

pushd "%~dp0"

echo Installing MATLAB ...

start "" /wait "setup.exe" -inputFile installer_input.txt

REM Since MATLAB kills the first exe above, Wait 90 seconds for spawned exe to start

REM Replace "setup.exe" below with the name of the exe that is spawned...

REM Ensure the name matches exactly (case sensitive)

timeout /t 90 /nobreak >nul 2>&1

:loop

tasklist | find /i "MathWorksProductInstaller" >nul 2>&1

if errorlevel 1 (

goto continue

) else (

`echo Still installing Matlab ...`

timeout /t 05 /nobreak >nul 2>&1

goto loop

)

:continue

popd

exit /b 0

There are dozens of ways to deal with this, but it comes down to personal preference.

I personally mapped a drive before app section and removed the drive mapping after apps.

Having a drive letter allowed me to script the necessary items to make the scenarios work. Trying to do working directories as UNC paths for anything is never a wise idea, too much nonsense can decide to not work on apps with dependencies.

Only exception to this is the Office installer…I copy the online installer to the machine and config files locally, and run it locally, then delete it. 100% success when I do that vs less with anything else.

We have some apps like that, we actually copy the files to the devices being images and install from that location and than delete the copied files

We use Pulse Secure (Ivanti Secure Access) and with the latest version the config file option for the install is not working anymore - used to. I have to manually import the profile after the install happens.

C:\Program Files (x86)\Common Files\Pulse Secure\JamUI\jamcommand.exe /importfile c:\temp\profile.pulsepreconfig

Use PSADT to wrap the installer! It will save you a ton of time with the prebuilt functions and variables.

Have you tried installing it from a server share that MDT has access to and turn on logging to see where it’s failing with the install.

All of my applications install this way, all under PowerShell

  1. Copy to scratch folder
  2. Use files in scratch folder for deployment tasks
  3. Nuke scratch folder near end of task sequence

I used to install pulse secure, shit VPN if you ask me, but that’s how we did it.

Might also need to enclose the path in quotes:

CONFIGFILE=“\server\share\folder\Default.pulseconfig”

I tried that as well, it still ignored the config file.

Tried that variation as well, still didn’t work.

How about turning on logging and see what is going on?

Maybe the installer doesn’t like UNC paths. You can try:

CONFIGFILE=“Z:\Applications\PulseSecure\Default.pulsepreconfig”

I believe DriveRoot should work as well:

CONFIGFILE=“%DeployDrive%\Applications\PulseSecure\Default.pulsepreconfig”

Edit: mistakenly said “DriveRoot”. Meant to put “DeployDrive”