Skip to content

Commit

Permalink
Revert "fix(ame bug): mount reg hives manually #1163"
Browse files Browse the repository at this point in the history
This reverts commit 8c329b5.
  • Loading branch information
he3als committed Oct 5, 2024
1 parent 8c329b5 commit be88113
Showing 1 changed file with 0 additions and 24 deletions.
24 changes: 0 additions & 24 deletions src/playbook/Configuration/custom.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand Down

0 comments on commit be88113

Please sign in to comment.