Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
Added check to see if AcmeDesktop exists before creating it.  If you just do a force create, all the values under AcmeDesktop are wiped clean.  Therefore, we check if it exists and if so, just add the value we want to add.
  • Loading branch information
adamleinss committed Mar 9, 2018
1 parent 53d95fc commit 816937f
Showing 1 changed file with 153 additions and 22 deletions.
175 changes: 153 additions & 22 deletions Deploy-Application.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,12 @@ Try {
{ $Response = Show-InstallationPrompt -Message 'Executing BIOS update...please close all apps and connect to AC power' -ButtonRightText 'Cancel' -ButtonLeftText 'Continue' -Timeout 600
if ($Response -eq 'Cancel') { exit 12345 }

New-Item -Path HKLM:SOFTWARE -Name ACMEDesktop -Force
if (-not (Test-Path HKLM:\Software\ACMEDesktop))
{

New-Item -Path HKLM:SOFTWARE -Name ACMEDesktop -Force
}

Set-ItemProperty -Path HKLM:SOFTWARE\ACMEDesktop -Name MeltdownFirmwareFix -Value "Yes" -Type String

set-location $dirfiles\XPS13
Expand All @@ -165,7 +170,13 @@ Try {
{ $Response = Show-InstallationPrompt -Message 'Executing BIOS update...please close all apps and connect to AC power' -ButtonRightText 'Cancel' -ButtonLeftText 'Continue' -Timeout 600
if ($Response -eq 'Cancel') { exit 12345 }

New-Item -Path HKLM:SOFTWARE -Name ACMEDesktop -Force

if (-not (Test-Path HKLM:\Software\ACMEDesktop))
{

New-Item -Path HKLM:SOFTWARE -Name ACMEDesktop -Force
}

Set-ItemProperty -Path HKLM:SOFTWARE\ACMEDesktop -Name MeltdownFirmwareFix -Value "Yes" -Type String

Suspend-BitLocker -MountPoint C: -RebootCount 1 -Confirm:$false
Expand All @@ -180,7 +191,13 @@ Try {
{ $Response = Show-InstallationPrompt -Message 'Executing BIOS update...please close all apps and connect to AC power' -ButtonRightText 'Cancel' -ButtonLeftText 'Continue' -Timeout 600
if ($Response -eq 'Cancel') { exit 12345 }

New-Item -Path HKLM:SOFTWARE -Name ACMEDesktop -Force

if (-not (Test-Path HKLM:\Software\ACMEDesktop))
{

New-Item -Path HKLM:SOFTWARE -Name ACMEDesktop -Force
}

Set-ItemProperty -Path HKLM:SOFTWARE\ACMEDesktop -Name MeltdownFirmwareFix -Value "Yes" -Type String

Suspend-BitLocker -MountPoint C: -RebootCount 1 -Confirm:$false
Expand All @@ -195,7 +212,13 @@ Try {
{ $Response = Show-InstallationPrompt -Message 'Executing BIOS update...please close all apps and connect to AC power' -ButtonRightText 'Cancel' -ButtonLeftText 'Continue' -Timeout 600
if ($Response -eq 'Cancel') { exit 12345 }

New-Item -Path HKLM:SOFTWARE -Name ACMEDesktop -Force

if (-not (Test-Path HKLM:\Software\ACMEDesktop))
{

New-Item -Path HKLM:SOFTWARE -Name ACMEDesktop -Force
}

Set-ItemProperty -Path HKLM:SOFTWARE\ACMEDesktop -Name MeltdownFirmwareFix -Value "Yes" -Type String

Suspend-BitLocker -MountPoint C: -RebootCount 1 -Confirm:$false
Expand All @@ -209,8 +232,13 @@ Try {

{ $Response = Show-InstallationPrompt -Message 'Executing BIOS update...please close all apps and connect to AC power' -ButtonRightText 'Cancel' -ButtonLeftText 'Continue' -Timeout 600
if ($Response -eq 'Cancel') { exit 12345 }

if (-not (Test-Path HKLM:\Software\ACMEDesktop))
{

New-Item -Path HKLM:SOFTWARE -Name ACMEDesktop -Force
}

New-Item -Path HKLM:SOFTWARE -Name ACMEDesktop -Force
Set-ItemProperty -Path HKLM:SOFTWARE\ACMEDesktop -Name MeltdownFirmwareFix -Value "Yes" -Type String

Suspend-BitLocker -MountPoint C: -RebootCount 1 -Confirm:$false
Expand All @@ -230,7 +258,13 @@ Try {
{ $Response = Show-InstallationPrompt -Message 'Executing BIOS update...please close all apps' -ButtonRightText 'Cancel' -ButtonLeftText 'Continue' -Timeout 600
if ($Response -eq 'Cancel') { exit 12345 }

New-Item -Path HKLM:SOFTWARE -Name ACMEDesktop -Force

if (-not (Test-Path HKLM:\Software\ACMEDesktop))
{

New-Item -Path HKLM:SOFTWARE -Name ACMEDesktop -Force
}

Set-ItemProperty -Path HKLM:SOFTWARE\ACMEDesktop -Name MeltdownFirmwareFix -Value "Yes" -Type String

set-location $dirfiles\M900
Expand All @@ -243,7 +277,13 @@ Try {
{ $Response = Show-InstallationPrompt -Message 'Executing BIOS update...please close all apps' -ButtonRightText 'Cancel' -ButtonLeftText 'Continue' -Timeout 600
if ($Response -eq 'Cancel') { exit 12345 }

New-Item -Path HKLM:SOFTWARE -Name ACMEDesktop -Force

if (-not (Test-Path HKLM:\Software\ACMEDesktop))
{

New-Item -Path HKLM:SOFTWARE -Name ACMEDesktop -Force
}

Set-ItemProperty -Path HKLM:SOFTWARE\ACMEDesktop -Name MeltdownFirmwareFix -Value "Yes" -Type String

set-location $dirfiles\M900
Expand All @@ -256,7 +296,13 @@ Try {
{ $Response = Show-InstallationPrompt -Message 'Executing BIOS update...please close all apps' -ButtonRightText 'Cancel' -ButtonLeftText 'Continue' -Timeout 600
if ($Response -eq 'Cancel') { exit 12345 }

New-Item -Path HKLM:SOFTWARE -Name ACMEDesktop -Force

if (-not (Test-Path HKLM:\Software\ACMEDesktop))
{

New-Item -Path HKLM:SOFTWARE -Name ACMEDesktop -Force
}

Set-ItemProperty -Path HKLM:SOFTWARE\ACMEDesktop -Name MeltdownFirmwareFix -Value "Yes" -Type String

set-location $dirfiles\M900
Expand All @@ -269,7 +315,13 @@ Try {
{ $Response = Show-InstallationPrompt -Message 'Executing BIOS update...please close all apps' -ButtonRightText 'Cancel' -ButtonLeftText 'Continue' -Timeout 600
if ($Response -eq 'Cancel') { exit 12345 }

New-Item -Path HKLM:SOFTWARE -Name ACMEDesktop -Force

if (-not (Test-Path HKLM:\Software\ACMEDesktop))
{

New-Item -Path HKLM:SOFTWARE -Name ACMEDesktop -Force
}

Set-ItemProperty -Path HKLM:SOFTWARE\ACMEDesktop -Name MeltdownFirmwareFix -Value "Yes" -Type String

set-location $dirfiles\M900
Expand All @@ -286,7 +338,13 @@ Try {
{ $Response = Show-InstallationPrompt -Message 'Executing BIOS update...please close all apps' -ButtonRightText 'Cancel' -ButtonLeftText 'Continue' -Timeout 600
if ($Response -eq 'Cancel') { exit 12345 }

New-Item -Path HKLM:SOFTWARE -Name ACMEDesktop -Force

if (-not (Test-Path HKLM:\Software\ACMEDesktop))
{

New-Item -Path HKLM:SOFTWARE -Name ACMEDesktop -Force
}

Set-ItemProperty -Path HKLM:SOFTWARE\ACMEDesktop -Name MeltdownFirmwareFix -Value "Yes" -Type String

set-location $dirFiles\M710Q
Expand All @@ -302,8 +360,13 @@ Try {

{ $Response = Show-InstallationPrompt -Message 'Executing BIOS update...please close all apps' -ButtonRightText 'Cancel' -ButtonLeftText 'Continue' -Timeout 600
if ($Response -eq 'Cancel') { exit 12345 }

if (-not (Test-Path HKLM:\Software\ACMEDesktop))
{

New-Item -Path HKLM:SOFTWARE -Name ACMEDesktop -Force
}

New-Item -Path HKLM:SOFTWARE -Name ACMEDesktop -Force
Set-ItemProperty -Path HKLM:SOFTWARE\ACMEDesktop -Name MeltdownFirmwareFix -Value "Yes" -Type String

set-location $dirfiles\M93P
Expand All @@ -316,7 +379,13 @@ Try {
{ $Response = Show-InstallationPrompt -Message 'Executing BIOS update...please close all apps' -ButtonRightText 'Cancel' -ButtonLeftText 'Continue' -Timeout 600
if ($Response -eq 'Cancel') { exit 12345 }

New-Item -Path HKLM:SOFTWARE -Name ACMEDesktop -Force

if (-not (Test-Path HKLM:\Software\ACMEDesktop))
{

New-Item -Path HKLM:SOFTWARE -Name ACMEDesktop -Force
}

Set-ItemProperty -Path HKLM:SOFTWARE\ACMEDesktop -Name MeltdownFirmwareFix -Value "Yes" -Type String

set-location $dirfiles\M93P
Expand All @@ -329,7 +398,13 @@ Try {
{ $Response = Show-InstallationPrompt -Message 'Executing BIOS update...please close all apps' -ButtonRightText 'Cancel' -ButtonLeftText 'Continue' -Timeout 600
if ($Response -eq 'Cancel') { exit 12345 }

New-Item -Path HKLM:SOFTWARE -Name ACMEDesktop -Force

if (-not (Test-Path HKLM:\Software\ACMEDesktop))
{

New-Item -Path HKLM:SOFTWARE -Name ACMEDesktop -Force
}

Set-ItemProperty -Path HKLM:SOFTWARE\ACMEDesktop -Name MeltdownFirmwareFix -Value "Yes" -Type String

set-location $dirfiles\M93P
Expand All @@ -342,7 +417,13 @@ Try {
{ $Response = Show-InstallationPrompt -Message 'Executing BIOS update...please close all apps' -ButtonRightText 'Cancel' -ButtonLeftText 'Continue' -Timeout 600
if ($Response -eq 'Cancel') { exit 12345 }

New-Item -Path HKLM:SOFTWARE -Name ACMEDesktop -Force

if (-not (Test-Path HKLM:\Software\ACMEDesktop))
{

New-Item -Path HKLM:SOFTWARE -Name ACMEDesktop -Force
}

Set-ItemProperty -Path HKLM:SOFTWARE\ACMEDesktop -Name MeltdownFirmwareFix -Value "Yes" -Type String

set-location $dirfiles\M93P
Expand All @@ -355,7 +436,13 @@ Try {
{ $Response = Show-InstallationPrompt -Message 'Executing BIOS update...please close all apps' -ButtonRightText 'Cancel' -ButtonLeftText 'Continue' -Timeout 600
if ($Response -eq 'Cancel') { exit 12345 }

New-Item -Path HKLM:SOFTWARE -Name ACMEDesktop -Force

if (-not (Test-Path HKLM:\Software\ACMEDesktop))
{

New-Item -Path HKLM:SOFTWARE -Name ACMEDesktop -Force
}

Set-ItemProperty -Path HKLM:SOFTWARE\ACMEDesktop -Name MeltdownFirmwareFix -Value "Yes" -Type String

set-location $dirfiles\M93P
Expand All @@ -368,7 +455,13 @@ Try {
{ $Response = Show-InstallationPrompt -Message 'Executing BIOS update...please close all apps' -ButtonRightText 'Cancel' -ButtonLeftText 'Continue' -Timeout 600
if ($Response -eq 'Cancel') { exit 12345 }

New-Item -Path HKLM:SOFTWARE -Name ACMEDesktop -Force

if (-not (Test-Path HKLM:\Software\ACMEDesktop))
{

New-Item -Path HKLM:SOFTWARE -Name ACMEDesktop -Force
}

Set-ItemProperty -Path HKLM:SOFTWARE\ACMEDesktop -Name MeltdownFirmwareFix -Value "Yes" -Type String

set-location $dirfiles\M93P
Expand All @@ -381,7 +474,13 @@ Try {
{ $Response = Show-InstallationPrompt -Message 'Executing BIOS update...please close all apps' -ButtonRightText 'Cancel' -ButtonLeftText 'Continue' -Timeout 600
if ($Response -eq 'Cancel') { exit 12345 }

New-Item -Path HKLM:SOFTWARE -Name ACMEDesktop -Force

if (-not (Test-Path HKLM:\Software\ACMEDesktop))
{

New-Item -Path HKLM:SOFTWARE -Name ACMEDesktop -Force
}

Set-ItemProperty -Path HKLM:SOFTWARE\ACMEDesktop -Name MeltdownFirmwareFix -Value "Yes" -Type String

set-location $dirfiles\M93P
Expand All @@ -394,7 +493,13 @@ Try {
{ $Response = Show-InstallationPrompt -Message 'Executing BIOS update...please close all apps' -ButtonRightText 'Cancel' -ButtonLeftText 'Continue' -Timeout 600
if ($Response -eq 'Cancel') { exit 12345 }

New-Item -Path HKLM:SOFTWARE -Name ACMEDesktop -Force

if (-not (Test-Path HKLM:\Software\ACMEDesktop))
{

New-Item -Path HKLM:SOFTWARE -Name ACMEDesktop -Force
}

Set-ItemProperty -Path HKLM:SOFTWARE\ACMEDesktop -Name MeltdownFirmwareFix -Value "Yes" -Type String

set-location $dirfiles\M93P
Expand All @@ -412,6 +517,16 @@ Try {
{
$Response = Show-InstallationPrompt -Message 'Executing BIOS update...please close all apps and connect to AC power' -ButtonRightText 'Cancel' -ButtonLeftText 'Continue' -Timeout 600
if ($Response -eq 'Cancel') { exit 12345 }


if (-not (Test-Path HKLM:\Software\ACMEDesktop))
{

New-Item -Path HKLM:SOFTWARE -Name ACMEDesktop -Force
}

Set-ItemProperty -Path HKLM:SOFTWARE\ACMEDesktop -Name MeltdownFirmwareFix -Value "Yes" -Type String

set-location $dirfiles\YogaS1
Suspend-BitLocker -MountPoint C: -RebootCount 1 -Confirm:$false
start-process winuptp.exe -ArgumentList '-s' -Wait -PassThru
Expand All @@ -427,7 +542,13 @@ Try {
$Response = Show-InstallationPrompt -Message 'Executing BIOS update...please close all apps and connect to AC power' -ButtonRightText 'Cancel' -ButtonLeftText 'Continue' -Timeout 600
if ($Response -eq 'Cancel') { exit 12345 }

New-Item -Path HKLM:SOFTWARE -Name ACMEDesktop -Force

if (-not (Test-Path HKLM:\Software\ACMEDesktop))
{

New-Item -Path HKLM:SOFTWARE -Name ACMEDesktop -Force
}

Set-ItemProperty -Path HKLM:SOFTWARE\ACMEDesktop -Name MeltdownFirmwareFix -Value "Yes" -Type String

set-location $dirfiles\YogaS1
Expand All @@ -449,8 +570,13 @@ Try {
$Response = Show-InstallationPrompt -Message 'Executing BIOS update...please close all apps' -ButtonRightText 'Cancel' -ButtonLeftText 'Continue' -Timeout 600
if ($Response -eq 'Cancel') { exit 12345 }

New-Item -Path HKLM:SOFTWARE -Name ACMEDesktop -Force
Set-ItemProperty -Path HKLM:SOFTWARE\ACMEDesktop -Name MeltdownFirmwareFix -Value "Yes" -Type String
if (-not (Test-Path HKLM:\Software\ACMEDesktop))
{

New-Item -Path HKLM:SOFTWARE -Name ACMEDesktop -Force
}

Set-ItemProperty -Path HKLM:SOFTWARE\ACMEDesktop -Name MeltdownFirmwareFix -Value "Yes" -Type String

set-location $dirfiles\E32
start-process flash.cmd -ArgumentList '/quiet' -Wait -PassThru
Expand Down Expand Up @@ -505,7 +631,12 @@ Try {
$Response = Show-InstallationPrompt -Message 'Executing BIOS update...please close all apps' -ButtonRightText 'Cancel' -ButtonLeftText 'Continue' -Timeout 600
if ($Response -eq 'Cancel') { exit 12345 }

New-Item -Path HKLM:SOFTWARE -Name ACMEDesktop -Force
if (-not (Test-Path HKLM:\Software\ACMEDesktop))
{

New-Item -Path HKLM:SOFTWARE -Name ACMEDesktop -Force
}

Set-ItemProperty -Path HKLM:SOFTWARE\ACMEDesktop -Name MeltdownFirmwareFix -Value "Yes" -Type String

set-location $dirfiles\P310
Expand Down

0 comments on commit 816937f

Please sign in to comment.