Make chntpw use sudo since binary is in sbin

This commit is contained in:
RPI News 2021-07-07 11:50:55 -06:00 committed by GitHub
parent d32e72379c
commit 1767cf7997
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -294,7 +294,7 @@ fi
if ! which cabextract >/dev/null 2>&1 \
|| ! which wimlib-imagex >/dev/null 2>&1 \
|| ! which chntpw >/dev/null 2>&1 \
|| ! sudo which chntpw >/dev/null 2>&1 \
|| ! which genisoimage >/dev/null 2>&1 \
&& ! which mkisofs >/dev/null 2>&1; then
echo "One of required applications is not installed."
@ -466,7 +466,7 @@ nv 1 InstRoot
ed InstRoot
X:\$Windows.~bt
q
y' | chntpw -e "$tempDir/SOFTWARE" >/dev/null
y' | sudo chntpw -e "$tempDir/SOFTWARE" >/dev/null
wimlib-imagex update ISODIR/sources/boot.wim 1 \
--command "add $tempDir/SOFTWARE /Windows/System32/config/SOFTWARE" >/dev/null