From be881137bd19c88459749d7c57e1899a416e798a Mon Sep 17 00:00:00 2001 From: he3als <65787561+he3als@users.noreply.github.com> Date: Sat, 5 Oct 2024 21:00:33 +0100 Subject: [PATCH] Revert "fix(ame bug): mount reg hives manually #1163" This reverts commit 8c329b564832075eaec9bd2004a98ae878d0ee2f. --- src/playbook/Configuration/custom.yml | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/src/playbook/Configuration/custom.yml b/src/playbook/Configuration/custom.yml index b703e7405f..250d729323 100644 --- a/src/playbook/Configuration/custom.yml +++ b/src/playbook/Configuration/custom.yml @@ -2,30 +2,6 @@ title: Root Playbook File description: Runs all of the Playbook files actions: - # AME Wizard seemingly has a bug where it doesn't mount other user's Registry hives - - !writeStatus: {status: 'Preparing Hives'} - - !powerShell: - command: | - $profileList = Get-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList' -Name 'ProfilesDirectory', 'Default' -EA 0 - $usersPath = if ([string]::IsNullOrEmpty($profileList.ProfilesDirectory)) { """$env:SystemDrive\Users""" } else { $profileList.ProfilesDirectory } - $defaultPath = if ([string]::IsNullOrEmpty($profileList.Default)) { """$usersPath\Default""" } else { $profileList.Default } - - $count = 1 - $prefix = 'HKU\AME_UserHive_' - foreach ($hive in (Get-ChildItem -Path $usersPath -Force -Depth 1 | ? { $_.Name -eq 'NTUSER.DAT' })) { - if (!$defaultFound -and ($hive.Directory.FullName -eq $defaultPath)) { - $defaultFound = $true - $name = """$prefix""" + """Default""" - } else { - $name = """$prefix""" + """$count""" - } - - Write-Output """`nMounting $($hive.Directory.Name):""" - reg load """$name""" """$($hive.FullName)""" - } - weight: 10 - wait: true - - !writeStatus: {status: 'Copying files'} - !powerShell: command: |