@echo off
PUSHD "%~dp0"
color 0a
mode con: cols=60 lines=12
title   复制翻墙软件文件夹到电脑桌面
SetLocal EnableDelayedExpansion EnableExtensions
ver|find /i " 5." >nul&&goto gotAdmin
fsutil dirty query %systemdrive% >nul || goto UACPrompt
goto gotAdmin
:UACPrompt
echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%\getadmin.vbs"
echo UAC.ShellExecute "%~s0", "", "", "runas", 1 >> "%temp%\getadmin.vbs"
cscript "%temp%\getadmin.vbs"
exit /B
:gotAdmin
if exist "%temp%\getadmin.vbs" ( del /f /q "%temp%\getadmin.vbs" )
pushd "%CD%"
cd /d "%~dp0"
set "bit=x86"
if exist "%systemroot%\Syswow64" if /i not %PROCESSOR_IDENTIFIER:~0,3%==x86 (
    set "bit=x64"
)
if "%PROCESSOR_ARCHITEW6432%"=="AMD64" (
    set "reg64= /reg:64"
    set "strpath=%SystemRoot%\sysnative"
) else (
    set "reg64="
    set "strpath=%SystemRoot%\system32"
)
cls
echo.
set desktop=%ALLUSERSPROFILE%\桌面
ver|find /i " 6." >nul||goto Shortcut
set desktop=%USERPROFILE%\Desktop
:Shortcut
if exist "%desktop%\soft\fg.exe" (
echo.
echo.
echo.
    echo        包含翻墙软件的soft文件夹已经复制到电脑桌面，不需要再复制
echo.
    echo        请按任意键打开soft文件夹...
pause>nul
start "" explorer.exe "%desktop%\soft"
exit
) else (
echo.
echo.
echo.
echo       正在将包含翻墙软件的SOFT文件夹复制到电脑桌面...
echo.
echo.
echo d|xcopy ..\soft\*.* "%desktop%\soft" /e /y /c >nul
cls
echo.
echo.
echo.
    echo       soft文件夹已复制完成，将自动打开...
ping 127.1 -n 3 >nul
)
start "" explorer.exe "%desktop%\soft"