REM This file setup the ThinkVantage Vista theme and Think Screensaver

cd C:\SWTOOLS\Theme
copy /Y "Think Screensaver.scr" "%WINDIR%\System32"
if exist C:\SWWORK\V64 copy /Y "Think Screensaver.scr" "%WINDIR%\sysWOW64"
if exist C:\SWTOOLS\V64 copy /Y "Think Screensaver.scr" "%WINDIR%\sysWOW64"


md "%WINDIR%\Resources\Themes\ThinkVantage"
copy /Y "Computer.ico" "%WINDIR%\Resources\Themes\ThinkVantage"
copy /Y "recycle_empty.ico" "%WINDIR%\Resources\Themes\ThinkVantage"
copy /Y "recycle_full.ico" "%WINDIR%\Resources\Themes\ThinkVantage"
copy /Y "Network.ico" "%WINDIR%\Resources\Themes\ThinkVantage"
icacls "%WINDIR%\Resources\Themes\ThinkVantage" /grant BUILTIN\users:F /T /C /L

REM make ThinkVantage Vista theme as system default
C:\SWTools\Vistawel\Tools\xmodify /m /sAddblock32.xml /t%WINDIR%\PANTHER\UNATTEND\unattend.xml
C:\SWTools\Vistawel\Tools\xmodify /m /sAddblock64.xml /t%WINDIR%\PANTHER\UNATTEND\unattend.xml


REM refer to Vista Screen Resolution module, use TpDevPE.exe to detect the Screen Resolution
TpDevPE.exe /LCDRES >nul
If ErrorLevel 13 GoTo NScreen
If ErrorLevel 12 GoTo WScreen
If ErrorLevel 11 GoTo WScreen
If ErrorLevel 10 GoTo WScreen
If ErrorLevel 9 GoTo WScreen
If ErrorLevel 8 GoTo WScreen
If ErrorLevel 7 GoTo NScreen
If ErrorLevel 6 GoTo NScreen
If ErrorLevel 5 GoTo NScreen
If ErrorLevel 4 GoTo NScreen
If ErrorLevel 3 GoTo NScreen
If ErrorLevel 2 GoTo NScreen
If ErrorLevel 1 GoTo NScreen

TpDevPE.exe /LCDRESAPI >nul
If ErrorLevel 13 GoTo NScreen
If ErrorLevel 12 GoTo WScreen
If ErrorLevel 11 GoTo WScreen
If ErrorLevel 10 GoTo WScreen
If ErrorLevel 9 GoTo WScreen
If ErrorLevel 8 GoTo WScreen
If ErrorLevel 7 GoTo NScreen
If ErrorLevel 6 GoTo NScreen
If ErrorLevel 5 GoTo NScreen
If ErrorLevel 4 GoTo NScreen
If ErrorLevel 3 GoTo NScreen
If ErrorLevel 2 GoTo NScreen
If ErrorLevel 1 GoTo NScreen

goto NScreen



:NScreen
copy /Y ".\NormalScreen\ThinkVantage Vista.theme" "%WINDIR%\Resources\Themes"
if not exist "C:\SWTOOLS\Wallpaper" md "C:\SWTOOLS\Wallpaper"
copy /Y ".\NormalScreen\BlackMap1600X1200.jpg" "C:\SWTOOLS\Wallpaper"
copy /Y ".\NormalScreen\BlueMap1600X1200.jpg" "C:\SWTOOLS\Wallpaper"
copy /Y ".\NormalScreen\1600x1200-Thinkdots.jpg" "C:\SWTOOLS\Wallpaper"

FOR %%i IN (1025 1026 1028 1029 1030 1031 1032 1033 1035 1036 1037 1038 1040 1041 1042 1043 1044 1045 1046 1048 1049 1050 1051 1053 1055 1058 1060 2052 2070 2074 3076 3082) DO if exist %windir%\System32\oobe\info\default\%%i\oobe.xml (
C:\SWTools\Vistawel\Tools\xmodify /r /soobe3Kremove.xml /t%WINDIR%\system32\oobe\info\default\%%i\oobe.xml
C:\SWTools\Vistawel\Tools\xmodify /r /soobeBoxterremove.xml /t%WINDIR%\system32\oobe\info\default\%%i\oobe.xml
C:\SWTools\Vistawel\Tools\xmodify /r /soobekodachiremove.xml /t%WINDIR%\system32\oobe\info\default\%%i\oobe.xml
C:\SWTools\Vistawel\Tools\xmodify /r /soobethinkremove.xml /t%WINDIR%\system32\oobe\info\default\%%i\oobe.xml
C:\SWTools\Vistawel\Tools\xmodify /r /sScoutoobethinkremove.xml /t%WINDIR%\system32\oobe\info\default\%%i\oobe.xml

C:\SWTools\Vistawel\Tools\xmodify /r /s.\NormalScreen\oobeNSadd.xml /t%WINDIR%\system32\oobe\info\default\%%i\oobe.xml

C:\SWTools\Vistawel\Tools\xmodify /m /s.\NormalScreen\oobeNSadd.xml /t%WINDIR%\system32\oobe\info\default\%%i\oobe.xml
)

goto END

:WScreen
copy /Y ".\WideScreen\ThinkVantage Vista.theme" "%WINDIR%\Resources\Themes"
if not exist "C:\SWTOOLS\Wallpaper" md "C:\SWTOOLS\Wallpaper"
copy /Y ".\WideScreen\BlackMap1680X1050.jpg" "C:\SWTOOLS\Wallpaper"
copy /Y ".\WideScreen\BlueMap1680X1050.jpg" "C:\SWTOOLS\Wallpaper"
copy /Y ".\WideScreen\1680x1050-Thinkdots.jpg" "C:\SWTOOLS\Wallpaper"

FOR %%i IN (1025 1026 1028 1029 1030 1031 1032 1033 1035 1036 1037 1038 1040 1041 1042 1043 1044 1045 1046 1048 1049 1050 1051 1053 1055 1058 1060 2052 2070 2074 3076 3082) DO if exist %windir%\System32\oobe\info\default\%%i\oobe.xml (
C:\SWTools\Vistawel\Tools\xmodify /r /soobe3Kremove.xml /t%WINDIR%\system32\oobe\info\default\%%i\oobe.xml
C:\SWTools\Vistawel\Tools\xmodify /r /soobeBoxterremove.xml /t%WINDIR%\system32\oobe\info\default\%%i\oobe.xml
C:\SWTools\Vistawel\Tools\xmodify /r /soobekodachiremove.xml /t%WINDIR%\system32\oobe\info\default\%%i\oobe.xml
C:\SWTools\Vistawel\Tools\xmodify /r /soobethinkremove.xml /t%WINDIR%\system32\oobe\info\default\%%i\oobe.xml
C:\SWTools\Vistawel\Tools\xmodify /r /sScoutoobethinkremove.xml /t%WINDIR%\system32\oobe\info\default\%%i\oobe.xml

C:\SWTools\Vistawel\Tools\xmodify /r /s.\WideScreen\oobeWSadd.xml /t%WINDIR%\system32\oobe\info\default\%%i\oobe.xml


C:\SWTools\Vistawel\Tools\xmodify /m /s.\WideScreen\oobeWSadd.xml /t%WINDIR%\system32\oobe\info\default\%%i\oobe.xml
)

goto END

:END