Create Windows image as normal user
This commit is contained in:
parent
3db9ed6d59
commit
97380e57d3
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue