Created
April 24, 2022 11:45
-
-
Save jottr/956a6fe5c874f68a52d3b534767d9f19 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[convert-UUP] | |
AutoStart =1 | |
AddUpdates =1 | |
Cleanup =0 | |
ResetBase =0 | |
NetFx3 =0 | |
StartVirtual =0 | |
wim2esd =0 | |
SkipISO =0 | |
SkipWinRE =0 | |
LCUwinre =0 | |
UpdtBootFiles=0 | |
ForceDism =0 | |
RefESD =0 | |
SkipEdge =0 | |
AutoExit =0 | |
[Store_Apps] | |
SkipApps =0 | |
AppsLevel =0 | |
[create_virtual_editions] | |
vAutoStart =1 | |
vDeleteSource=0 | |
vPreserve =0 | |
vwim2esd =0 | |
vSkipISO =0 | |
vAutoEditions=Enterprise |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#Generated on 2022-04-23 21:42:52 GMT | |
# Proxy configuration | |
# If you need to configure a proxy to be able to connect to the internet, | |
# then you can do this by configuring the all_proxy environment variable. | |
# By default this variable is empty, configuring aria2c to not use any proxy. | |
# | |
# Usage: export all_proxy="proxy_address" | |
# For example: export all_proxy="127.0.0.1:8888" | |
# | |
# More information how to use this can be found at: | |
# https://aria2.github.io/manual/en/html/aria2c.html#cmdoption-all-proxy | |
# https://aria2.github.io/manual/en/html/aria2c.html#environment | |
export all_proxy="" | |
# End of proxy configuration | |
if ! which aria2c >/dev/null \ | |
|| ! which cabextract >/dev/null \ | |
|| ! which wimlib-imagex >/dev/null \ | |
|| ! which chntpw >/dev/null \ | |
|| ! which genisoimage >/dev/null \ | |
&& ! which mkisofs >/dev/null; then | |
echo "One of required applications is not installed." | |
echo "The following applications need to be installed to use this script:" | |
echo " - aria2c" | |
echo " - cabextract" | |
echo " - wimlib-imagex" | |
echo " - chntpw" | |
echo " - genisoimage or mkisofs" | |
echo "" | |
if [ `uname` == "Linux" ]; then | |
# Linux | |
echo "If you use Debian or Ubuntu you can install these using:" | |
echo "sudo apt-get install aria2 cabextract wimtools chntpw genisoimage" | |
echo "" | |
echo "If you use Arch Linux you can install these using:" | |
echo "sudo pacman -S aria2 cabextract wimlib chntpw cdrtools" | |
elif [ `uname` == "Darwin" ]; then | |
# macOS | |
echo "macOS requires Homebrew (https://brew.sh) to install the prerequisite software." | |
echo "If you use Homebrew, you can install these using:" | |
echo "brew tap sidneys/homebrew" | |
echo "brew install aria2 cabextract wimlib cdrtools sidneys/homebrew/chntpw" | |
fi | |
exit 1 | |
fi | |
destDir="UUPs" | |
tempScript="aria2_script.$RANDOM.txt" | |
echo "Retrieving aria2 script..." | |
aria2c --no-conf --log-level=info --log="aria2_download.log" -o"$tempScript" --allow-overwrite=true --auto-file-renaming=false "https://uupdump.net/get.php?id=d71d8c28-db1f-4e53-baca-405f88cf66ad&pack=en-us&edition=professional&aria2=2" | |
if [ $? != 0 ]; then | |
echo "Failed to retrieve aria2 script" | |
exit 1 | |
fi | |
detectedError=`grep '#UUPDUMP_ERROR:' "$tempScript" | sed 's/#UUPDUMP_ERROR://g'` | |
if [ ! -z $detectedError ]; then | |
echo "Unable to retrieve data from Windows Update servers. Reason: $detectedError" | |
echo "If this problem persists, most likely the set you are attempting to download was removed from Windows Update servers." | |
exit 1 | |
fi | |
echo "" | |
echo "Attempting to download files..." | |
aria2c --no-conf --log-level=info --log="aria2_download.log" -x16 -s16 -j5 -c -R -d"$destDir" -i"$tempScript" | |
if [ $? != 0 ]; then | |
echo "We have encountered an error while downloading files." | |
exit 1 | |
fi | |
echo "" | |
if [ -e ./files/convert.sh ]; then | |
chmod +x ./files/convert.sh | |
./files/convert.sh wim "$destDir" 0 | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment