@echo =======================================================
@echo  Installing Data Transformation Services support files
@echo =======================================================

@if %OS%!==! set destdir=%WINDIR%\System
@if %OS%!==Windows_NT! set destdir=%SYSTEMROOT%\System32

@md %destdir%\Resources\

@md %destdir%\Resources\1049
@copy %1\*.rll %destdir%\Resources\1049

@md %destdir%\Resources\1033
@copy %1\*.rll %destdir%\Resources\1033

@if not exist %destdir%\sqlunirl.dll copy %1\sqlunirl.dll %destdir%

@if not exist %destdir%\sqlresld.dll copy %1\sqlresld.* %destdir%

@if not exist %destdir%\custtask.dll copy %1\custtask.* %destdir%

@if exist %destdir%\dtsffile.dll goto skip1

@copy %1\dtsffile.dll %destdir%
@regsvr32 /s %destdir%\dtsffile.dll
@Echo regdll dtsffile.dll 
:skip1 

@if exist %destdir%\dtspkg.dll goto skip2

@copy %1\dtspkg.dll %destdir%
@regsvr32 /s %destdir%\dtspkg.dll
@Echo regdll dtspkg.dll
:skip2 

@if exist %destdir%\dtspump.dll goto skip3

@copy %1\dtspump.dll %destdir%
@regsvr32 /s %destdir%\dtspump.dll
@Echo regdll dtspump.dll
:skip3 

@if exist %destdir%\axscphst.dll goto skip4

@copy %1\axscphst.dll %destdir%
@regsvr32 /s %destdir%\axscphst.dll
@Echo regdll axscphst.dll
:skip4 
