Create Windows image as normal user

This commit is contained in:
Manuel Thalmann 2024-08-06 11:39:34 +02:00
parent ace227693c
commit 75f9c54840

View file

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