diff options
author | Chris Church <chris@ninemoreminutes.com> | 2014-11-23 01:37:33 -0500 |
---|---|---|
committer | Chris Church <chris@ninemoreminutes.com> | 2014-11-23 01:37:33 -0500 |
commit | 116109468c6a8a4b2edada53964ac632123e7570 (patch) | |
tree | ef4549c19270f725880c5ba7cd82eb0032206ac6 /examples/scripts | |
parent | a798ecb0d48bf9ddb36183a7b2b8f1fb627a3803 (diff) | |
parent | c1fc0ca4fd1b3414b2745b303e8afdd5325f198a (diff) | |
download | ansible-116109468c6a8a4b2edada53964ac632123e7570.tar.gz |
Merge pull request #9481 from cipress/patch-1
fixes powershell upgrade script to work on different System architectures.
Diffstat (limited to 'examples/scripts')
-rw-r--r-- | examples/scripts/upgrade_to_ps3.ps1 | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/examples/scripts/upgrade_to_ps3.ps1 b/examples/scripts/upgrade_to_ps3.ps1 index 693088b75f..c9f55267e4 100644 --- a/examples/scripts/upgrade_to_ps3.ps1 +++ b/examples/scripts/upgrade_to_ps3.ps1 @@ -62,13 +62,24 @@ if ([Environment]::OSVersion.Version.Major -gt 6) $osminor = [environment]::OSVersion.Version.Minor +$architecture = $ENV:PROCESSOR_ARCHITECTURE + +if ($architecture -eq "AMD64") +{ + $architecture = "x64" +} +else +{ + $architecture = "x86" +} + if ($osminor -eq 1) { - $DownloadUrl = "http://download.microsoft.com/download/E/7/6/E76850B8-DA6E-4FF5-8CCE-A24FC513FD16/Windows6.1-KB2506143-x64.msu" + $DownloadUrl = "http://download.microsoft.com/download/E/7/6/E76850B8-DA6E-4FF5-8CCE-A24FC513FD16/Windows6.1-KB2506143-" + $architecture + ".msu" } elseif ($osminor -eq 0) { - $DownloadUrl = "http://download.microsoft.com/download/E/7/6/E76850B8-DA6E-4FF5-8CCE-A24FC513FD16/Windows6.0-KB2506146-x64.msu" + $DownloadUrl = "http://download.microsoft.com/download/E/7/6/E76850B8-DA6E-4FF5-8CCE-A24FC513FD16/Windows6.0-KB2506146-" + $architecture + ".msu" } else { |