Fixed possibly wrong registry path

Your version of this script opens/creates registry path "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\4.0.30319.0\AutoGenKeys\$sid"
I think the correct path should be "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\ASP.NET\4.0.30319.0\AutoGenKeys\$sid"
This commit is contained in:
Daniel Kraemer 2015-11-20 21:37:08 +01:00
parent 09f54d6857
commit 7bb3ccf201
1 changed files with 3 additions and 3 deletions

View File

@ -43,10 +43,10 @@ function Provision-AutoGenKeys {
$aspNetKey = $softwareMicrosoftKey.CreateSubKey("ASP.NET") $aspNetKey = $softwareMicrosoftKey.CreateSubKey("ASP.NET")
} }
$aspNetBaseKey = $softwareMicrosoftKey.OpenSubKey("$expandedVersion", $True); $aspNetBaseKey = $aspNetKey.OpenSubKey("$expandedVersion", $True);
if ($aspNetBaseKey -eq $null) if ($aspNetBaseKey -eq $null)
{ {
$aspNetBaseKey = $softwareMicrosoftKey.CreateSubKey("$expandedVersion") $aspNetBaseKey = $aspNetKey.CreateSubKey("$expandedVersion")
} }
# Create AutoGenKeys subkey if it doesn't already exist # Create AutoGenKeys subkey if it doesn't already exist