From 315a7a3c4a5e811421f55b4066ba9df76e54a9f6 Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Fri, 26 Apr 2013 20:15:27 +0000 Subject: [PATCH] Change nextdestiny to use system context rather than nebulous user context in powershell git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@16084 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- .../share/xcat/netboot/windows/nextdestiny.ps1 | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/xCAT-server/share/xcat/netboot/windows/nextdestiny.ps1 b/xCAT-server/share/xcat/netboot/windows/nextdestiny.ps1 index 423a95e16..a4e5678e0 100644 --- a/xCAT-server/share/xcat/netboot/windows/nextdestiny.ps1 +++ b/xCAT-server/share/xcat/netboot/windows/nextdestiny.ps1 @@ -3,13 +3,13 @@ if (!(Test-Path HKLM:\Software\Policies\Microsoft\SystemCertificates\AuthRoot)) mkdir HKLM:\Software\Policies\Microsoft\SystemCertificates\AuthRoot Set-ItemProperty HKLM:\Software\Policies\Microsoft\SystemCertificates\AuthRoot DisableRootAutoUpdate 1 } -if (!(Test-Path HKCU:\Software\xCAT)) { - mkdir HKCU:\Software\xCAT - $certstore = New-Object System.Security.Cryptography.X509Certificates.X509Store("My","CurrentUser") +if (!(Test-Path HKLM:\Software\xCAT)) { + mkdir HKLM:\Software\xCAT + $certstore = New-Object System.Security.Cryptography.X509Certificates.X509Store("xCAT","LocalMachine") $certstore.Open([System.Security.Cryptography.X509Certificates.OpenFlags]'Readwrite') $cacert = New-Object System.Security.Cryptography.X509Certificates.X509Certificate2("$env:instdrv\xcat\ca.pem") - Set-ItemProperty HKCU:\Software\xCAT cacertthumb $cacert.thumbprint - Set-ItemProperty HKCU:\Software\xCAT serveraddress $env:master - Set-ItemProperty HKCU:\Software\xCAT servername $env:mastername + Set-ItemProperty HKLM:\Software\xCAT cacertthumb $cacert.thumbprint + Set-ItemProperty HKLM:\Software\xCAT serveraddress $env:master + Set-ItemProperty HKLM:\Software\xCAT servername $env:mastername } Send-xCATCommand $command