-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
02e649d
commit 972fa61
Showing
7 changed files
with
57 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
#description: Installs the 1Password Windows client | ||
#execution mode: Combined | ||
#tags: Evergreen, AgileBits, 1Password | ||
#Requires -Modules Evergreen | ||
[System.String] $Path = "$Env:SystemDrive\Apps\AgileBits\1Password" | ||
|
||
#region Script logic | ||
New-Item -Path $Path -ItemType "Directory" -Force -ErrorAction "SilentlyContinue" | Out-Null | ||
New-Item -Path "$Env:ProgramData\Nerdio\Logs" -ItemType "Directory" -Force -ErrorAction "SilentlyContinue" | Out-Null | ||
|
||
try { | ||
# Download | ||
$App = [PSCustomObject]@{ | ||
Version = "8.10.18" | ||
URI = "https://downloads.1password.com/win/1PasswordSetup-latest.msi" | ||
} | ||
Import-Module -Name "Evergreen" -Force | ||
$OutFile = Save-EvergreenApp -InputObject $App -CustomPath $Path -WarningAction "Stop" | ||
} | ||
catch { | ||
throw $_ | ||
} | ||
|
||
Write-Information -MessageData ":: Install AgileBits 1Password" -InformationAction "Continue" | ||
try { | ||
# Install package | ||
$LogFile = "$Env:ProgramData\Nerdio\Logs\1Password.log" -replace " ", "" | ||
$params = @{ | ||
FilePath = "$Env:SystemRoot\System32\msiexec.exe" | ||
ArgumentList = "/package `"$($OutFile.FullName)`" /quiet /log $LogFile" | ||
NoNewWindow = $true | ||
PassThru = $true | ||
Wait = $true | ||
ErrorAction = "Continue" | ||
} | ||
$result = Start-Process @params | ||
Write-Information -MessageData ":: Install exit code: $($result.ExitCode)" -InformationAction "Continue" | ||
} | ||
catch { | ||
throw $_ | ||
} | ||
#endregion |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters