@echo off
cls
color 1f
echo ========================================================
echo  Welcome to Windows 8 Sidebar installer (64 bit)
echo --------------------------------------------------------
echo  To make installer work normally:
echo  1) Run Command Prompt with Administrative rights.
echo  2) Change dir to the dir containing this file.
echo  3) Run this cmd file.
echo --------------------------------------------------------
echo  Based on AsciiWolf cmd - http://asciiwolf.com/
echo ========================================================
echo.
echo [+] Yes, I did those 3 steps above!
echo [+] Press any key to start the installation...
pause>nul
echo [+] Copying x64 Sidebar to "%ProgramFiles%\Windows Sidebar"...
xcopy /E /I /Y "%CD%\x64\Windows Sidebar" "%ProgramFiles%\Windows Sidebar">nul
echo [+] Copying x86 Sidebar to "%ProgramFiles(x86)%\Windows Sidebar"...
xcopy /E /I /Y "%CD%\x86\Windows Sidebar" "%ProgramFiles(x86)%\Windows Sidebar">nul
echo [+] Fixing possible access bug...
attrib "%ProgramFiles%\Windows Sidebar" -s -h
attrib "%ProgramFiles(x86)%\Windows Sidebar" -s -h
echo [+] Register sbdrop.dll and wlsrvc.dll...
pushd %ProgramFiles%\Windows Sidebar
%windir%\System32\regsvr32 /s sbdrop.dll
%windir%\System32\regsvr32 /s wlsrvc.dll
popd
echo [+] Register sbdrop.dll and wlsrvc.dll (32 bit)...
pushd %ProgramFiles(x86)%\Windows Sidebar
%windir%\SysWOW64\regsvr32 /s sbdrop.dll
%windir%\SysWOW64\regsvr32 /s wlsrvc.dll
popd
echo [+] Import registry data...
reg import Sidebar_x64.reg>nul 2>nul
echo [+] Register Sidebar itself...
"%ProgramFiles%\Windows Sidebar\sidebar.exe" /RegServer
"%ProgramFiles(x86)%\Windows Sidebar\sidebar.exe" /RegServer
echo [+] Done, exiting...
