don't exit script if already installed
This commit is contained in:
@@ -1,21 +1,6 @@
|
|||||||
# Path to the MSI installer
|
# Path to the MSI installer
|
||||||
$MSIURL = 'https://lfupdate.s3.amazonaws.com/clients/outlook/admin_msi/LiquidFiles_Admin_2.1.10.msi'
|
$MSIURL = 'https://lfupdate.s3.amazonaws.com/clients/outlook/admin_msi/LiquidFiles_Admin_2.1.10.msi'
|
||||||
|
|
||||||
# Get path to the installed agent
|
|
||||||
$PathToAgentExe64 = "${Env:ProgramFiles(x86)}\LiquidFiles Windows Agent\LiquidFilesWindowsAgent.exe"
|
|
||||||
$PathToAgentExe32 = "${Env:ProgramFiles}\LiquidFiles Windows Agent\LiquidFilesWindowsAgent.exe"
|
|
||||||
If ( Test-Path $PathToAgentExe64 ) {
|
|
||||||
$PathToAgentExe = $PathToAgentExe64
|
|
||||||
} ElseIf ( Test-Path $PathToAgentExe32 ) {
|
|
||||||
$PathToAgentExe = $PathToAgentExe32
|
|
||||||
}
|
|
||||||
|
|
||||||
# Exit this script if the agent is already installed
|
|
||||||
If ( $PathToAgentExe ) {
|
|
||||||
LogMsg "LiquidFiles agent is already installed. This installer will exit."
|
|
||||||
Exit
|
|
||||||
}
|
|
||||||
|
|
||||||
# Set installer args
|
# Set installer args
|
||||||
If (-not [string]::IsNullOrEmpty($LFHost) ) {
|
If (-not [string]::IsNullOrEmpty($LFHost) ) {
|
||||||
LogMsg "LiquidFiles target server: ${LFHost}"
|
LogMsg "LiquidFiles target server: ${LFHost}"
|
||||||
@@ -44,6 +29,8 @@ Try {
|
|||||||
Catch { LogErr $_.Exception.Message }
|
Catch { LogErr $_.Exception.Message }
|
||||||
|
|
||||||
# Start the agent
|
# Start the agent
|
||||||
|
$PathToAgentExe64 = "${Env:ProgramFiles(x86)}\LiquidFiles Windows Agent\LiquidFilesWindowsAgent.exe"
|
||||||
|
$PathToAgentExe32 = "${Env:ProgramFiles}\LiquidFiles Windows Agent\LiquidFilesWindowsAgent.exe"
|
||||||
If ( Test-Path $PathToAgentExe64 ) {
|
If ( Test-Path $PathToAgentExe64 ) {
|
||||||
$PathToAgentExe = $PathToAgentExe64
|
$PathToAgentExe = $PathToAgentExe64
|
||||||
} ElseIf ( Test-Path $PathToAgentExe32 ) {
|
} ElseIf ( Test-Path $PathToAgentExe32 ) {
|
||||||
|
|||||||
Reference in New Issue
Block a user