This article details how to perform a silent, on-premises installation of the nshift Client using a PowerShell script. The script utilizes the Windows Installer (msiexec.exe) to execute the installation silently, avoiding the need for manual user interaction.
Prerequisites:
-
Access to the Shared Network Location: The script assumes the nShift Client installer (UpdateClient.msi) is located on a shared network path accessible from the target machines. Ensure the user running the script has read permissions to this location.
-
PowerShell Execution Policy: Your PowerShell execution policy must allow for the execution of scripts. You might need to adjust this with the Set-ExecutionPolicy cmdlet (e.g., Set-ExecutionPolicy RemoteSigned). Caution: Be mindful of the security implications of modifying the execution policy. Only adjust it if necessary and revert it to a secure setting after the installation.
-
Administrator Privileges: The script requires administrator privileges on the target machine to install the software. Run the PowerShell script "as administrator".
The PowerShell Script:
# Define the server name
$serverName = "DESKTOP-F17QVPE"
# Define the path to the MSI file using the server name
$msiPath = "\\$serverName\Client\UpdateClient.msi"
# Define the installation directory
$installDir = "$env:ProgramFiles(x86)\Consignor Client"
# Define the installation options using the server name
$exeOptions = "ConsignorClientServerName=$serverName ConsignorClientPortName=52346 ConsignorClientSitePortName=52345"
# Construct the msiexec command
$msiexecArgs = "/i `"$msiPath`" INSTALLDIR=`"$installDir`" EXEOPTIONS=`"$exeOptions`""
# Execute the msiexec command
Start-Process msiexec.exe -ArgumentList $msiexecArgs -Wait
Note: Tested on version 18.168.x.x
Example: