update nextcloud installer
This commit is contained in:
@@ -1,12 +1,13 @@
|
||||
## Define URL for downloading the installer
|
||||
$URL = 'https://dev.emberkom.com/emberkom/management-scripts/raw/branch/master/resources/Nextcloud-3.0.3-setup.exe'
|
||||
$FILE = '{0}{1}' -f (GetTempPath), (Split-Path $URL -Leaf)
|
||||
. 'C:\Users\dyoder\Emberkom\Data\Projects\development\management-scripts\Tools.ps1'
|
||||
|
||||
$FILE = Download-File -URL $URL -File $FILE
|
||||
## Define URL for downloading the installer
|
||||
$URL = 'https://dev.emberkom.com/emberkom/management-scripts/raw/branch/master/resources/Nextcloud-3.0.3-setup.exe'
|
||||
|
||||
#$FILE = '{0}{1}' -f (GetTempPath), (Split-Path $URL -Leaf)
|
||||
#$FILE = Download-File -URL $URL -File $FILE
|
||||
|
||||
## Stop app if it's currently running
|
||||
Try { Get-Process | Where { $_.Name -like "nextcloud" } | Stop-Process -Force }
|
||||
Catch { LogErr $_.Exception.Message }
|
||||
End-Process -Name 'nextcloud' -Force
|
||||
|
||||
## Get the install location so we can start the app again after installation
|
||||
If ( Test-Path "HKLM:SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Nextcloud" )
|
||||
@@ -15,7 +16,7 @@ ElseIf ( Test-Path "HKLM:SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Nex
|
||||
{ $InstallPath = '{0}\nextcloud.exe' -f $(Get-ItemProperty -Path "HKLM:SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Nextcloud" -ErrorAction SilentlyContinue).InstallLocation }
|
||||
|
||||
## Install package
|
||||
Install-Program -Path $FILE -Arguments "/S" -Delete
|
||||
Install-Program -Path $(Download-File -URL $URL) -Arguments "/S" -Delete
|
||||
|
||||
## Start the app after installation
|
||||
If ( Test-Path $InstallPath )
|
||||
|
||||
Reference in New Issue
Block a user