Win10官网主题打包下载

Win10官方主题,打包下载。

1. 抓取Win10官网主题下载链接,并下载

mkdir win10-themepack && cd win10-themepack
curl https://support.microsoft.com/en-us/windows/desktop-themes-94880287-6046-1d35-6d2f-35dee759701e#ID0EDD=Windows_10 -o win10-desktop-themes.html

cat win10-desktop-themes.html | gawk 'BEGIN {RS="@[email protected]"; FS="ID0EDD-supTabControlContent"} {print $2}' | grep "<a href=\"https://download.microsoft.com/download" | gawk 'BEGIN{FS="\""} {print $2}' | sort | uniq > win10-desktop-themes-download-url.txt

theme_url[0]=''
count=1
while read line; do
    theme_url[${count}]="${line}"
    count=$[${count} + 1]
done < win10-desktop-themes-download-url.txt
count=$[${count} - 1]
echo "数组元素个数为: ${#theme_url[@]}"
echo "第一个链接:${theme_url[1]}"
echo "最后一个链接:${theme_url[${count}]}"

for (( i=1; i <= ${count}; i++ )); do
    # echo "wget ${theme_url[${i}]} " | bash
    echo "${i}. downloading \"${theme_url[${i}]}\""
    wget ${theme_url[${i}]}
    if [ $? -eq 0 ]; then
        echo ${i} > download-success.log
    else
        echo "${i}. wget ${theme_url[${i}]}" >> download-fail.log
    fi
done

2. 一键安装所有主题

@echo off
for %%i in (*.themepack) do (
	echo install "%%i"
    "%%i"
	choice /t 1 /d y /n >nul
)
pause

3. Win10官网主题打包下载

执行其中的批量安装主题.bat,一键安装所有主题。

内容保护区域