@echo off
cd /d %~dp0
Set WorkDir=%~dp0
Set WorkDir=%WorkDir:~0,-1%

dccon -remove

copy /y x64\*.exe %WinDir%\System32
copy /y x64\*.dll %WinDir%\SysWOW64
copy /y x64\*.sys %WinDir%\System32\Drivers

Reg.exe add "HKLM\SOFTWARE\Acronis\CommonComponents" /v "expat.dll" /t REG_SZ /d "%WorkDir%\expat.dll" /f
Reg.exe add "HKLM\SOFTWARE\Acronis\CommonComponents" /v "icu38.dll" /t REG_SZ /d "%WorkDir%\icu38.dll" /f
Reg.exe add "HKLM\SOFTWARE\Acronis\CommonComponents" /v "kb_link.dll" /t REG_SZ /d "%WorkDir%\kb_link.dll" /f
Reg.exe add "HKLM\SOFTWARE\Acronis\CommonComponents" /v "libcrypto10.dll" /t REG_SZ /d "%WorkDir%\libcrypto10.dll" /f
Reg.exe add "HKLM\SOFTWARE\Acronis\CommonComponents" /v "libssl10.dll" /t REG_SZ /d "%WorkDir%\libssl10.dll" /f
Reg.exe add "HKLM\SOFTWARE\Acronis\CommonComponents" /v "oem_doc_source.dll" /t REG_SZ /d "%WorkDir%\oem_doc_source.dll" /f
Reg.exe add "HKLM\SOFTWARE\Acronis\CommonComponents" /v "resource.dll" /t REG_SZ /d "%WorkDir%\resource.dll" /f
Reg.exe add "HKLM\SOFTWARE\Acronis\CommonComponents" /v "rpc_client.dll" /t REG_SZ /d "%WorkDir%\rpc_client.dll" /f
Reg.exe add "HKLM\SOFTWARE\Acronis\CommonComponents" /v "thread_pool.dll" /t REG_SZ /d "%WorkDir%\thread_pool.dll" /f
Reg.exe add "HKLM\SOFTWARE\Acronis\CommonComponents" /v "tib_api.dll" /t REG_SZ /d "%WorkDir%\tib_api.dll" /f
Reg.exe add "HKLM\SOFTWARE\Acronis\CommonComponents" /v "tib_mounter.dll" /t REG_SZ /d "%WorkDir%\tib_mounter.dll" /f
Reg.exe add "HKLM\SOFTWARE\Acronis\CommonComponents" /v "ulxmlrpcpp.dll" /t REG_SZ /d "%WorkDir%\ulxmlrpcpp.dll" /f

Reg.exe add "HKLM\SOFTWARE\Acronis\TrueImage" /v "standard" /t REG_SZ /d " 13  1  6 25 20 29 98 20120  1 98 23  4 15 24  3 20120 20 15 27109 96  1 97 98120 24  3 96  5  4  6103108120 27  2  5 23 25 24108 24120 16 27 17 27103  3 20 97120109 15 19 98  2 16 18 20120 13  4 98109 12109 22 27" /f

Reg.exe add "HKLM\SOFTWARE\Wow6432Node\Acronis\CommonComponents" /v "expat.dll" /t REG_SZ /d "%WorkDir%\expat.dll" /f
Reg.exe add "HKLM\SOFTWARE\Wow6432Node\Acronis\CommonComponents" /v "icu38.dll" /t REG_SZ /d "%WorkDir%\icu38.dll" /f
Reg.exe add "HKLM\SOFTWARE\Wow6432Node\Acronis\CommonComponents" /v "kb_link.dll" /t REG_SZ /d "%WorkDir%\kb_link.dll" /f
Reg.exe add "HKLM\SOFTWARE\Wow6432Node\Acronis\CommonComponents" /v "libcrypto10.dll" /t REG_SZ /d "%WorkDir%\libcrypto10.dll" /f
Reg.exe add "HKLM\SOFTWARE\Wow6432Node\Acronis\CommonComponents" /v "libssl10.dll" /t REG_SZ /d "%WorkDir%\libssl10.dll" /f
Reg.exe add "HKLM\SOFTWARE\Wow6432Node\Acronis\CommonComponents" /v "oem_doc_source.dll" /t REG_SZ /d "%WorkDir%\oem_doc_source.dll" /f
Reg.exe add "HKLM\SOFTWARE\Wow6432Node\Acronis\CommonComponents" /v "resource.dll" /t REG_SZ /d "%WorkDir%\resource.dll" /f
Reg.exe add "HKLM\SOFTWARE\Wow6432Node\Acronis\CommonComponents" /v "rpc_client.dll" /t REG_SZ /d "%WorkDir%\rpc_client.dll" /f
Reg.exe add "HKLM\SOFTWARE\Wow6432Node\Acronis\CommonComponents" /v "thread_pool.dll" /t REG_SZ /d "%WorkDir%\thread_pool.dll" /f
Reg.exe add "HKLM\SOFTWARE\Wow6432Node\Acronis\CommonComponents" /v "tib_api.dll" /t REG_SZ /d "%WorkDir%\tib_api.dll" /f
Reg.exe add "HKLM\SOFTWARE\Wow6432Node\Acronis\CommonComponents" /v "tib_mounter.dll" /t REG_SZ /d "%WorkDir%\tib_mounter.dll" /f
Reg.exe add "HKLM\SOFTWARE\Wow6432Node\Acronis\CommonComponents" /v "ulxmlrpcpp.dll" /t REG_SZ /d "%WorkDir%\ulxmlrpcpp.dll" /f

Reg.exe add "HKLM\SOFTWARE\Wow6432Node\Acronis\TrueImage" /v "standard" /t REG_SZ /d " 13  1  6 25 20 29 98 20120  1 98 23  4 15 24  3 20120 20 15 27109 96  1 97 98120 24  3 96  5  4  6103108120 27  2  5 23 25 24108 24120 16 27 17 27103  3 20 97120109 15 19 98  2 16 18 20120 13  4 98109 12109 22 27" /f

::"%WorkDir%\instdrvw.exe" snapman "%WorkDir%\x64\snapman.sys"
::"%WorkDir%\instdrvw.exe" fltsrv "%WorkDir%\x64\fltsrv.sys"

sc create snapman type= kernel start= boot binpath= "system32\DRIVERS\snapman.sys"
net start snapman
sc create fltsrv type= kernel start= boot binpath= "system32\DRIVERS\fltsrv.sys"
net start fltsrv

start "TrueImage" TrueImage.exe
exit
