@echo OFF
setlocal


echo unregister ...

REM 72
if exist %INSTROOT%\pgm\SAPDBSSC.ocx				 regsvr32 /u /s %INSTROOT%\pgm\SAPDBSSC.ocx
if exist %INSTROOT%\pgm\SQLSTUDIO.exe							    %INSTROOT%\pgm\SQLSTUDIO.exe /unregserver
if exist %INSTROOT%\pgm\SAPDBPC.dll  				 regsvr32 /u /s %INSTROOT%\pgm\SAPDBPC.dll
if exist %INSTROOT%\pgm\SAPDBShare.dll  	  	     regsvr32 /u /s %INSTROOT%\pgm\SAPDBShare.dll
if exist %INSTROOT%\pgm\SAPDBUPO.dll	 		   	 regsvr32 /u /s %INSTROOT%\pgm\SAPDBUPO.dll
if exist %INSTROOT%\pgm\SAPDBOM.dll 				 regsvr32 /u /s %INSTROOT%\pgm\SAPDBOM.dll
if exist %INSTROOT%\pgm\SAPDBGC.dll      			 regsvr32 /u /s %INSTROOT%\pgm\SAPDBGC.dll
if exist %INSTROOT%\pgm\SAPDBUP.ocx 	 			 regsvr32 /u /s %INSTROOT%\pgm\SAPDBUP.ocx
if exist %INSTROOT%\pgm\SAPDBResult.ocx 			 regsvr32 /u /s %INSTROOT%\pgm\SAPDBResult.ocx
if exist %INSTROOT%\pgm\SAPDBSO.ocx				     regsvr32 /u /s %INSTROOT%\pgm\SAPDBSO.ocx
if exist %INSTROOT%\pgm\SAPDBSR.ocx					 regsvr32 /u /s %INSTROOT%\pgm\SAPDBSR.ocx
if exist %INSTROOT%\pgm\SAPDBQBE.ocx				 regsvr32 /u /s %INSTROOT%\pgm\SAPDBQBE.ocx
if exist %INSTROOT%\pgm\SAPDBVIQ.ocx				 regsvr32 /u /s %INSTROOT%\pgm\SAPDBVIQ.ocx
if exist %INSTROOT%\pgm\SAPDBCM.ocx	 				 regsvr32 /u /s %INSTROOT%\pgm\SAPDBCM.ocx
if exist %INSTROOT%\pgm\SAPDBDSQL.ocx				 regsvr32 /u /s %INSTROOT%\pgm\SAPDBDSQL.ocx

if exist %INSTROOT%\pgm\SAPDBxASObjects.dll 		 regsvr32 /u /s %INSTROOT%\pgm\SAPDBxASObjects.dll
if exist %INSTROOT%\pgm\SAPDBxAS.ocx 				 regsvr32 /u /s %INSTROOT%\pgm\SAPDBxAS.ocx
if exist %INSTROOT%\pgm\SAPDBxConnection.dll		 regsvr32 /u /s %INSTROOT%\pgm\SAPDBxConnection.dll
if exist %INSTROOT%\pgm\SAPDBxDBFunctions.dll		 regsvr32 /u /s %INSTROOT%\pgm\SAPDBxDBFunctions.dll
if exist %INSTROOT%\pgm\SAPDBxDBResult.dll			 regsvr32 /u /s %INSTROOT%\pgm\SAPDBxDBResult.dll
if exist %INSTROOT%\pgm\SAPDBxNB.ocx				 regsvr32 /u /s %INSTROOT%\pgm\SAPDBxNB.ocx
if exist %INSTROOT%\pgm\SAPDBxSaveAs.ocx	  	     regsvr32 /u /s %INSTROOT%\pgm\SAPDBxSaveAs.ocx
if exist %INSTROOT%\pgm\SAPDBxZoom.ocx				 regsvr32 /u /s %INSTROOT%\pgm\SAPDBxZoom.ocx


REM 62
if exist %INSTROOT%\pgm\SAPDBQPControls.ocx          regsvr32 /u /s %INSTROOT%\pgm\SAPDBQPControls.ocx
if exist %INSTROOT%\pgm\SAPDBQPEngine.dll            regsvr32 /u /s %INSTROOT%\pgm\SAPDBQPEngine.dll
if exist %INSTROOT%\pgm\SAPDBQPObjects.dll           regsvr32 /u /s %INSTROOT%\pgm\SAPDBQPObjects.dll
if exist %INSTROOT%\pgm\SAPDBxOAL.dll                regsvr32 /u /s %INSTROOT%\pgm\SAPDBxOAL.dll
if exist %INSTROOT%\pgm\SAPDBxCommon.dll             regsvr32 /u /s %INSTROOT%\pgm\SAPDBxCommon.dll
if exist %INSTROOT%\pgm\SAPDBxRegLib.dll             regsvr32 /u /s %INSTROOT%\pgm\SAPDBxRegLib.dll
if exist %INSTROOT%\pgm\SAPDBxNavigation.ocx         regsvr32 /u /s %INSTROOT%\pgm\SAPDBxNavigation.ocx
if exist %INSTROOT%\pgm\SAPDBxAutoSuppose.ocx        regsvr32 /u /s %INSTROOT%\pgm\SAPDBxAutoSuppose.ocx
if exist %INSTROOT%\pgm\SAPDBxAutoSupposeObjects.dll regsvr32 /u /s %INSTROOT%\pgm\SAPDBxAutoSupposeObjects.dll
if exist %INSTROOT%\pgm\SAPDBxAbout.dll              regsvr32 /u /s %INSTROOT%\pgm\SAPDBxAbout.dll
if exist %INSTROOT%\pgm\SAPDBxQueryTable.ocx         regsvr32 /u /s %INSTROOT%\pgm\SAPDBxQueryTable.ocx
if exist %INSTROOT%\pgm\SAPDBxTabBar.ocx             regsvr32 /u /s %INSTROOT%\pgm\SAPDBxTabBar.ocx


echo delete ...

if exist %INSTROOT%\pgm\SAPDBQPEngine.dll del %INSTROOT%\pgm\SAPDBQPEngine.dll


if exist %INSTROOT%\pgm\SAPDBSSC.ocx				 del  %INSTROOT%\pgm\SAPDBSSC.ocx
if exist %INSTROOT%\pgm\SQLSTUDIO.exe				 del %INSTROOT%\pgm\SQLSTUDIO.exe
if exist %INSTROOT%\pgm\SAPDBPC.dll  				 del  %INSTROOT%\pgm\SAPDBPC.dll
if exist %INSTROOT%\pgm\SAPDBShare.dll  	  	     del  %INSTROOT%\pgm\SAPDBShare.dll
if exist %INSTROOT%\pgm\SAPDBUPO.dll	 		   	 del  %INSTROOT%\pgm\SAPDBUPO.dll
if exist %INSTROOT%\pgm\SAPDBOM.dll 				 del  %INSTROOT%\pgm\SAPDBOM.dll
if exist %INSTROOT%\pgm\SAPDBGC.dll      			 del  %INSTROOT%\pgm\SAPDBGC.dll
if exist %INSTROOT%\pgm\SAPDBUP.ocx 	 			 del  %INSTROOT%\pgm\SAPDBUP.ocx
if exist %INSTROOT%\pgm\SAPDBResult.ocx 			 del  %INSTROOT%\pgm\SAPDBResult.ocx
if exist %INSTROOT%\pgm\SAPDBSO.ocx				     del  %INSTROOT%\pgm\SAPDBSO.ocx
if exist %INSTROOT%\pgm\SAPDBSR.ocx					 del  %INSTROOT%\pgm\SAPDBSR.ocx
if exist %INSTROOT%\pgm\SAPDBQBE.ocx				 del  %INSTROOT%\pgm\SAPDBQBE.ocx
if exist %INSTROOT%\pgm\SAPDBVIQ.ocx				 del  %INSTROOT%\pgm\SAPDBVIQ.ocx
if exist %INSTROOT%\pgm\SAPDBCM.ocx	 				 del  %INSTROOT%\pgm\SAPDBCM.ocx
if exist %INSTROOT%\pgm\SAPDBDSQL.ocx				 del  %INSTROOT%\pgm\SAPDBDSQL.ocx

if exist %INSTROOT%\pgm\SAPDBxASObjects.dll 		 del  %INSTROOT%\pgm\SAPDBxASObjects.dll
if exist %INSTROOT%\pgm\SAPDBxAS.ocx 				 del  %INSTROOT%\pgm\SAPDBxAS.ocx
if exist %INSTROOT%\pgm\SAPDBxConnection.dll		 del  %INSTROOT%\pgm\SAPDBxConnection.dll
if exist %INSTROOT%\pgm\SAPDBxDBFunctions.dll		 del  %INSTROOT%\pgm\SAPDBxDBFunctions.dll
if exist %INSTROOT%\pgm\SAPDBxDBResult.dll			 del  %INSTROOT%\pgm\SAPDBxDBResult.dll
if exist %INSTROOT%\pgm\SAPDBxNB.ocx				 del  %INSTROOT%\pgm\SAPDBxNB.ocx
if exist %INSTROOT%\pgm\SAPDBxSaveAs.ocx	  	     del  %INSTROOT%\pgm\SAPDBxSaveAs.ocx
if exist %INSTROOT%\pgm\SAPDBxZoom.ocx				 del  %INSTROOT%\pgm\SAPDBxZoom.ocx


REM 62
if exist %INSTROOT%\pgm\SAPDBQPControls.ocx          del  %INSTROOT%\pgm\SAPDBQPControls.ocx
if exist %INSTROOT%\pgm\SAPDBQPEngine.dll            del  %INSTROOT%\pgm\SAPDBQPEngine.dll
if exist %INSTROOT%\pgm\SAPDBQPObjects.dll           del  %INSTROOT%\pgm\SAPDBQPObjects.dll
if exist %INSTROOT%\pgm\SAPDBxOAL.dll                del  %INSTROOT%\pgm\SAPDBxOAL.dll
if exist %INSTROOT%\pgm\SAPDBxCommon.dll             del  %INSTROOT%\pgm\SAPDBxCommon.dll
if exist %INSTROOT%\pgm\SAPDBxRegLib.dll             del  %INSTROOT%\pgm\SAPDBxRegLib.dll
if exist %INSTROOT%\pgm\SAPDBxNavigation.ocx         del  %INSTROOT%\pgm\SAPDBxNavigation.ocx
if exist %INSTROOT%\pgm\SAPDBxAutoSuppose.ocx        del  %INSTROOT%\pgm\SAPDBxAutoSuppose.ocx
if exist %INSTROOT%\pgm\SAPDBxAutoSupposeObjects.dll del  %INSTROOT%\pgm\SAPDBxAutoSupposeObjects.dll
if exist %INSTROOT%\pgm\SAPDBxAbout.dll              del  %INSTROOT%\pgm\SAPDBxAbout.dll
if exist %INSTROOT%\pgm\SAPDBxQueryTable.ocx         del  %INSTROOT%\pgm\SAPDBxQueryTable.ocx
if exist %INSTROOT%\pgm\SAPDBxTabBar.ocx             del  %INSTROOT%\pgm\SAPDBxTabBar.ocx


if exist %INSTROOT%\pgm\SAPDBQPEngine.dll del %INSTROOT%\pgm\SAPDBQPEngine.dll

echo delete shortcut ...

if exist "%USERPROFILE%\\Desktop\\SQL Studio 6.2.10.lnk" del "%USERPROFILE%\\Desktop\\SQL Studio 6.2.10.lnk"
if exist "%USERPROFILE%\\Desktop\\SQL Studio 7.2.0.lnk" del "%USERPROFILE%\\Desktop\\SQL Studio 7.2.0.lnk"

if exist %TOOL%\Bin\GETSSBETA.bat del %TOOL%\Bin\GETSSBETA.bat
if exist %INSTROOT%\pgm\SAPDBSSC.ocx del %INSTROOT%\pgm\SAPDBSSC.ocx


echo.
echo.
echo.
echo #####################################################################
echo.
echo Please use SQL Studio Setup on    //p29761/setups
echo.
echo #####################################################################




endlocal
