@echo off CLS REM -- set variables ---------------------------------------------------------------------- set _Source="%~d0%~p0" set _Navision=%_Source:~0,-16% set _Source=%_Source:~0,-1% set _Framework="%windir%\Microsoft.NET\Framework\v2.0.50727 set _ImageName=ACASqlNative REM -- Test .NET Framework 2.0 is installed ----------------------------------------------- if exist %_Framework%" goto next if exist "%ALLUSERSPROFILE%\DeskTop" %_Source%dotnetfxENU.exe" /Q if exist "%ALLUSERSPROFILE%\BureauBlad" %_Source%dotnetfxNLD.exe" /Q :next if exist %_Framework%" echo .NET Framework 2.0 installed if not exist %_Navision%" goto end1 REM -- Test %_ImageName%.dll is registered ------------------------------------------------ if exist %_Navision%\%_ImageName%.tlb" if exist %_Navision%\%_ImageName%.dll" goto next2 copy %_Source%%_ImageName%.dll" %_Navision%" > NUL cd %_Navision%" rem %_Framework%\Regasm.exe" /unregister %_Navision%\%_ImageName%.dll" %_Framework%\Regasm.exe" /tlb:%_Navision%\%_ImageName%.tlb" %_ImageName%.dll > NUL :next2 if exist %_Navision%\%_ImageName%.tlb" if exist %_Navision%\%_ImageName%.dll" echo SqlNative installed in %_Navision%" :end1 rem pause