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