Create Windows image as normal user

This commit is contained in:
Manuel Thalmann 2024-08-06 11:39:34 +02:00
parent 3db9ed6d59
commit 97380e57d3

View file

@ -157,16 +157,18 @@ begin
begin
set -l wimFile "$winOverlay/$wimFile"
chmod u+w "$wimFile"
while [ ! (wiminfo "$wimFile" 1 | grep "^$editionField" | cut -d ":" -f2 | string trim) = "Professional" ]
sudo wimdelete --soft "$wimFile" 1
wimdelete --soft "$wimFile" 1
end
while wiminfo "$wimFile" 2 &> /dev/null
sudo wimdelete --soft "$wimFile" 2
wimdelete --soft "$wimFile" 2
end
sudo wimoptimize "$wimFile"
wimoptimize "$wimFile"
chmod u-w "$wimFile"
end
begin