Hi All,
I have been working on this script for two weeks and having an issue. Powershell scripting is still at beginner level.
For this Start-Process Line, I cannot get this msi to install. I need the process to start the msi file from the same directory. I was able to do this in a previous script/msi file just fine. Any suggestions would be useful. THank you
<# Install Pulse Secure 9.1.4 #>
Start-Process msiexec.exe -ArgumentList “/i $PSScriptRoot\PulseSecure.msi” -Wait
#Pulse
PulseSecure9_1_4.txt (3.27 KB)
7 Spice ups
qexle
(kila)
April 2, 2020, 6:39pm
2
Try this:
Start path\file.msi -parameters
2 Spice ups
Neally
(Neally)
April 2, 2020, 6:39pm
3
something like so?
Start-Process -FilePath "msiexec.exe" -ArgumentList "/i","$PSScriptRoot\PulseSecure.msi" -Wait
1 Spice up
Evan7191
(Evan7191)
April 2, 2020, 6:46pm
4
Is the script in the same directory as the MSI file? The PSScriptRoot automatic variable exists only in the context of a script that is already running. I have used it only for controller scripts that call other scripts.
1 Spice up
Hi Evan, - yes the msi and script are in the same directory and when used in SCCM it will be copied to the ccmcache folder as well.
@qexle Thanks your suggestion worked for me. Seems this MSI is acting a bit funky as well. I had to remove the /i from my argumentlists. End result… Thank you so much!
Start-Process -FilePath “$PSScriptRoot\PulseSecure.msi” -ArgumentList “/qn”
@alexw Thanks for your input. Seems this msi file was acting a bit funky because I switched the syntax around alot even to the one you suggested and it wouldnt install. I would just get the msiexec parameter window stating what options to use to install… The first syntax (qxele sent) and removing /i worked for me (so weird)…
Thank you though!
Neally
(Neally)
April 3, 2020, 4:07pm
8
Well we can’t predict how the installer file behaves as that’s unique to you.
Glad you got it figured out.