REM WARNING!!! COPY THIS FOLDER IN THE ROOT OF DISK!!!
FOR %%d IN (Z C Y X W U V T S R Q P O N M L K J I H G F E D A B) DO IF EXIST "%%d:\RSHB_soft\rosselhozbank_online.ico" SET CDROM=%%d
@ECHO %CDROM%

@%--------------------------------------------------------------%
IF "%PROCESSOR_ARCHITEW6432%"=="AMD64" goto launch64
IF "%PROCESSOR_ARCHITECTURE%"=="" set PROCESSOR_ARCHITECTURE=x86
IF "%PROCESSOR_ARCHITECTURE%"=="x86" goto launch32
IF "%PROCESSOR_ARCHITECTURE%"=="AMD64" goto launch64
goto endorunknwn

:launch32
for /R %CDROM%:\RSHB_soft\1_eToken\x32 %%I in (*.exe) do START /wait "" "%%I"
for /R %CDROM%:\RSHB_soft\1_eToken\x32 %%I in (*.msi) do START /wait "" "%%I"
for /R %CDROM%:\RSHB_soft\2_CryptoPro_CSP\CryptoPro32 %%I in (*.exe) do START /wait "" "%%I"
for /R %CDROM%:\RSHB_soft\2_CryptoPro_CSP\CryptoPro32 %%I in (*.msi) do START /wait "" "%%I"
for /R %CDROM%:\RSHB_soft\4_CAPICOM\CapicomWin32 %%I in (*.exe) do START /wait "" "%%I"
for /R %CDROM%:\RSHB_soft\4_CAPICOM\CapicomWin32 %%I in (*.msi) do START /wait "" "%%I"

goto endorunknwn

:launch64
for /R %CDROM%:\RSHB_soft\1_eToken\x64 %%I in (*.exe) do START /wait "" "%%I"
for /R %CDROM%:\RSHB_soft\1_eToken\x64 %%I in (*.msi) do START /wait "" "%%I"
for /R %CDROM%:\RSHB_soft\2_CryptoPro_CSP\CryptoPro64 %%I in (*.exe) do START /wait "" "%%I"
for /R %CDROM%:\RSHB_soft\2_CryptoPro_CSP\CryptoPro64 %%I in (*.msi) do START /wait "" "%%I"

copy %CDROM%:\RSHB_soft\4_CAPICOM\CapicomWin7(64bit)\capicom.dll %windir%\syswow64
copy %CDROM%:\RSHB_soft\4_CAPICOM\CapicomWin7(64bit)\capicom.inf %windir%\syswow64
regsvr32.exe /s %windir%\syswow64\capicom.dll

:endorunknwn

copy %CDROM%:\RSHB_soft\3_Sertificate\SertMgr\CertMgr.exe %windir%\System32
for /R %CDROM%:\RSHB_soft\3_Sertificate\Sertificate %%I in (*.cer) do certutil -addstore -f Root "%%I"
xcopy %CDROM%:\RSHB_soft\5_QUIK\RSHB_QUIK %systemdrive%\RSHB_QUIK /E /I

exit