Skip to content

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronparker committed Dec 4, 2023
1 parent 02e649d commit 972fa61
Show file tree
Hide file tree
Showing 7 changed files with 57 additions and 54 deletions.
2 changes: 1 addition & 1 deletion scripts/image/103_MicrosoftNET.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ try {
# Download
Import-Module -Name "Evergreen" -Force
$App = Get-EvergreenApp -Name "Microsoft.NET" | `
Where-Object { $_.Installer -eq "windowsdesktop" -and $_.Architecture -eq "x64" -and $_.Channel -match "LTS|Current" }
Where-Object { $_.Installer -eq "windowsdesktop" -and $_.Architecture -eq "x64" -and $_.Channel -match "LTS|STS" }
$OutFile = Save-EvergreenApp -InputObject $App -CustomPath $Path -WarningAction "SilentlyContinue"
}
catch {
Expand Down
2 changes: 1 addition & 1 deletion scripts/image/104_MicrosoftEdge.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ catch {
try {
# Post install configuration
$prefs = @{
"homepage" = "https://www.office.com"
"homepage" = "https://www.microsoft365.com"
"homepage_is_newtabpage" = $false
"browser" = @{
"show_home_button" = $true
Expand Down
2 changes: 1 addition & 1 deletion scripts/image/403_GoogleChrome.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ catch {
try {
# Post install configuration
$prefs = @{
"homepage" = "https://www.office.com"
"homepage" = "https://www.microsoft365.com"
"homepage_is_newtabpage" = $false
"browser" = @{
"show_home_button" = $true
Expand Down
38 changes: 7 additions & 31 deletions scripts/image/414_Greenshot.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -8,29 +8,9 @@
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

#region Use Secure variables in Nerdio Manager to pass a JSON file with the variables list
if ([System.String]::IsNullOrEmpty($SecureVars.VariablesList)) {
}
else {
try {
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
$params = @{
Uri = $SecureVars.VariablesList
UseBasicParsing = $true
ErrorAction = "Stop"
}
$Variables = Invoke-RestMethod @params
[System.String] $GreenshotDefaultsIni = $Variables.$AzureRegionName.GreenshotDefaultsIni
}
catch {
throw $_
}
}
#endregion

try {
Import-Module -Name "Evergreen" -Force
$App = Get-EvergreenApp -Name "Greenshot" | Where-Object { $_.Architecture -eq "x86" -and $_.Uri -match "Greenshot-INSTALLER-*" } | Select-Object -First 1
$App = Get-EvergreenApp -Name "Greenshot" | Where-Object { $_.Type -eq "exe" -and $_.InstallerType -eq "Default" } | Select-Object -First 1
$OutFile = Save-EvergreenApp -InputObject $App -CustomPath $Path -WarningAction "SilentlyContinue"
}
catch {
Expand Down Expand Up @@ -63,17 +43,13 @@ try {
Stop-Process -Force -ErrorAction "SilentlyContinue"

# Download the default settings
if ([System.String]::IsNullOrEmpty($GreenshotDefaultsIni)) {
}
else {
$params = @{
Uri = $GreenshotDefaultsIni
OutFile = "$Env:ProgramFiles\Greenshot\greenshot-defaults.ini"
UseBasicParsing = $true
ErrorAction = "SilentlyContinue"
}
Invoke-WebRequest @params
$params = @{
URI = $SecureVars.GreenshotDefaultsIni
OutFile = "$Env:ProgramFiles\Greenshot\greenshot-defaults.ini"
UseBasicParsing = $true
ErrorAction = "SilentlyContinue"
}
Invoke-WebRequest @params

# Remove unneeded shortcuts
$Shortcuts = @("$Env:Public\Desktop\Greenshot.lnk",
Expand Down
42 changes: 42 additions & 0 deletions scripts/image/420_1Password.ps1
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
16 changes: 2 additions & 14 deletions tests/scripts/Apps.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,6 @@
],
"ServicesDisabled": []
},
{
"Name": "MicrosoftFSLogixAppsRuleEditor",
"Filter": "Get-EvergreenApp -Name \"MicrosoftFSLogixApps\" | Where-Object { $_.Channel -eq \"Production\" } | Select-Object -First 1",
"Installed": "Microsoft FSLogix Apps RuleEditor",
"FilesExist": [
"C:\\Program Files\\FSLogix\\Apps\\RuleEditor.exe"
],
"ShortcutsNotExist": [],
"ServicesDisabled": []
},
{
"Name": "Microsoft.NET",
"Filter": "Get-EvergreenApp -Name \"Microsoft.NET\" | Where-Object { $_.Installer -eq \"windowsdesktop\" -and $_.Channel -eq \"LTS\" -and $_.Architecture -eq \"x64\" } | Select-Object -First 1",
Expand All @@ -36,7 +26,7 @@
},
{
"Name": "Microsoft.NET",
"Filter": "Get-EvergreenApp -Name \"Microsoft.NET\" | Where-Object { $_.Installer -eq \"windowsdesktop\" -and $_.Channel -eq \"Current\" -and $_.Architecture -eq \"x64\" } | Select-Object -First 1",
"Filter": "Get-EvergreenApp -Name \"Microsoft.NET\" | Where-Object { $_.Installer -eq \"windowsdesktop\" -and $_.Channel -eq \"STS\" -and $_.Architecture -eq \"x64\" } | Select-Object -First 1",
"Installed": "Microsoft Windows Desktop Runtime - 7",
"FilesExist": [
"C:\\Program Files\\dotnet\\dotnet.exe"
Expand Down Expand Up @@ -110,9 +100,7 @@
"Filter": "Get-EvergreenApp -Name \"Microsoft365Apps\" | Where-Object { $_.Channel -eq \"MonthlyEnterprise\" } | Select-Object -First 1",
"Installed": "Microsoft 365 Apps for enterprise",
"FilesExist": [
"C:\\Program Files\\Microsoft Office\\root\\Office16\\WINWORD.EXE",
"C:\\Program Files\\Microsoft Office\\root\\Office16\\officeappguardwin32.exe",
"C:\\Program Files\\Microsoft Office\\root\\Office16\\protocolhandler.exe"
"C:\\Program Files\\Microsoft Office\\root\\Office16\\OUTLOOK.EXE"
],
"ShortcutsNotExist": [],
"ServicesDisabled": []
Expand Down
9 changes: 3 additions & 6 deletions variables/NerdioManagerVariables.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,10 @@
"OSLanguage": "en-AU",
"TimeZone": "AUS Eastern Standard Time",
"AppxMode": "Block",
"FSLogixAgentVersion": "2.9.8440.42104",
"FSLogixAppMaskingRuleset": "https://stybluynyickph2.blob.core.windows.net/configs/AppMaskingRuleset.zip",
"FSLogixRedirections": "https://stybluynyickph2.blob.core.windows.net/configs/Redirections.xml",
"M365Channel": "Current",
"M365AppsConfig": "https://stybluynyickph2.blob.core.windows.net/configs/Microsoft365Apps-Outlook-Shared.xml",
"M365AppsConfig": "https://stybluynyickph2.blob.core.windows.net/configs/Microsoft365Apps-Validation.xml",
"FoxitLanguage": "English",
"FirefoxLanguage": "en-US",
"FirefoxChannel": "LATEST_FIREFOX_VERSION",
Expand All @@ -25,11 +24,10 @@
"OSLanguage": "en-US",
"TimeZone": "Pacific Standard Time",
"AppxMode": "Block",
"FSLogixAgentVersion": "2.9.8440.42104",
"FSLogixAppMaskingRuleset": "https://stybluynyickph2.blob.core.windows.net/configs/AppMaskingRuleset.zip",
"FSLogixRedirections": "https://stybluynyickph2.blob.core.windows.net/configs/Redirections.xml",
"M365Channel": "Current",
"M365AppsConfig": "https://stybluynyickph2.blob.core.windows.net/configs/Microsoft365Apps-Outlook-Shared.xml",
"M365AppsConfig": "https://stybluynyickph2.blob.core.windows.net/configs/Microsoft365Apps-Validation.xml",
"FoxitLanguage": "English",
"FirefoxLanguage": "en-US",
"CitrixWorkspaceStream": "Current",
Expand All @@ -43,11 +41,10 @@
"OSLanguage": "en-GB",
"TimeZone": "GMT Standard Time",
"AppxMode": "Block",
"FSLogixAgentVersion": "2.9.8440.42104",
"FSLogixAppMaskingRuleset": "https://stybluynyickph2.blob.core.windows.net/configs/AppMaskingRuleset.zip",
"FSLogixRedirections": "https://stybluynyickph2.blob.core.windows.net/configs/Redirections.xml",
"M365Channel": "Current",
"M365AppsConfig": "https://stybluynyickph2.blob.core.windows.net/configs/Microsoft365Apps-Outlook-Shared.xml",
"M365AppsConfig": "https://stybluynyickph2.blob.core.windows.net/configs/Microsoft365Apps-Validation.xml",
"FoxitLanguage": "English",
"FirefoxLanguage": "en-GB",
"CitrixWorkspaceStream": "Current",
Expand Down

0 comments on commit 972fa61

Please sign in to comment.