Last active
October 5, 2016 20:14
-
-
Save brianfgonzalez/574aa68f4d5c39c5005bfdf15fa6c4b9 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
REM Install Windows ADK ( https://developer.microsoft.com/en-us/windows/hardware/windows-assessment-deployment-kit ) | |
REM Download and extract SetACL.exe to same directory as CrazyWinPEMouseFix.bat ( https://helgeklein.com/download/#setacl ) | |
REM In SCCM, edit the "winpe.wim" boot file ( file name does NOT include packageid ) then run "Update Dis.." against the Boot Image in the console | |
SET BootImagePath=E:\Packages\Boot\MDT2013u2x64\winpe.wim | |
if not exist \mount (md \mount) | |
if not exist "%~dp0SetACL.exe" ( goto NoSetACL ) | |
dism /mount-wim /wimfile:"%BootImagePath%" /index:1 /mountdir:\mount | |
reg load hklm\importedsystem \mount\Windows\System32\config\SYSTEM | |
"%~dp0SetACL.exe" -on "HKEY_LOCAL_MACHINE\importedsystem\ControlSet001\Enum" -ot reg -actn setowner -ownr "n:Administrators" | |
"%~dp0SetACL.exe" -on "HKEY_LOCAL_MACHINE\importedsystem\ControlSet001\Enum" -ot reg -actn ace -ace "n:Administrators;p:full" | |
reg add "HKEY_LOCAL_MACHINE\importedsystem\ControlSet001\Enum\ACPI\PNP0501\a\Device Parameters" /v "SkipEnumerations" /t "REG_DWORD" /d "4294967294" /f | |
reg unload hklm\importedsystem | |
dism /unmount-wim /mountdir:\mount /commit | |
pause | |
exit /b | |
:NoSetACL | |
echo "%~dp0SetACL.exe not found. Exiting script." | |
pause | |
exit /b |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment