uninstall.bat revision 1920
0N/A
0N/A@echo off
0N/Arem CDDL HEADER START
0N/Arem
0N/Arem The contents of this file are subject to the terms of the
0N/Arem Common Development and Distribution License, Version 1.0 only
0N/Arem (the "License"). You may not use this file except in compliance
0N/Arem with the License.
0N/Arem
0N/Arem You can obtain a copy of the license at
0N/Arem trunk/opends/resource/legal-notices/OpenDS.LICENSE
0N/Arem or https://OpenDS.dev.java.net/OpenDS.LICENSE.
0N/Arem See the License for the specific language governing permissions
0N/Arem and limitations under the License.
0N/Arem
0N/Arem When distributing Covered Code, include this CDDL HEADER in each
0N/Arem file and include the License file at
873N/Arem trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable,
0N/Arem add the following below this CDDL HEADER, with the fields enclosed
0N/Arem by brackets "[]" replaced with your own identifying information:
0N/Arem Portions Copyright [yyyy] [name of copyright owner]
0N/Arem
0N/Arem CDDL HEADER END
733N/Arem
0N/Arem
0N/Arem Portions Copyright 2006-2007 Sun Microsystems, Inc.
0N/A
0N/Asetlocal
0N/Afor %%i in (%~sf0) do set DIR_HOME=%%~dPsi.
0N/A
0N/Aset INSTANCE_ROOT=%DIR_HOME%
0N/A
0N/A:checkJavaBin
0N/Aif "%JAVA_BIN%" == "" goto noJavaBin
0N/Agoto setClassPath
0N/A
0N/A:noJavaBin
0N/Aif "%JAVA_HOME%" == "" goto noJavaHome
0N/Aif not exist "%JAVA_HOME%\bin\java.exe" goto noJavaHome
0N/Aset JAVA_BIN=%JAVA_HOME%\bin\java.exe
0N/Agoto setClassPath
0N/A
0N/A:noJavaHome
0N/Aif not exist "%DIR_HOME%\lib\set-java-home.bat" goto noSetJavaHome
0N/Acall "%DIR_HOME%\lib\set-java-home.bat"
0N/Aset JAVA_BIN=%JAVA_HOME%\bin\java.exe
0N/Agoto setClassPath
0N/A
0N/A:noSetJavaHome
0N/Aecho Error: JAVA_HOME environment variable is not set.
0N/Aecho Please set it to a valid Java 5 (or later) installation.
0N/Apause
0N/Agoto end
0N/A
0N/A:noValidJavaHome
0N/Aecho ERROR: The detected Java version could not be used. Please set
0N/Aecho JAVA_HOME to to a valid Java 5 (or later) installation.
0N/Apause
0N/Agoto end
0N/A
0N/A:setClassPath
0N/AFOR %%x in ("%DIR_HOME%\lib\*.jar") DO call "%DIR_HOME%\lib\setcp.bat" %%x
0N/Aset CLASSPATH=%DIR_HOME%\classes;%CLASSPATH%
0N/A
0N/Aset PATH=%SystemRoot%
0N/A
0N/Arem Test that the provided JDK is 1.5 compatible.
0N/A"%JAVA_BIN%" org.opends.server.tools.InstallDS -t > NUL 2>&1
0N/Aif not %errorlevel% == 0 goto noValidJavaHome
0N/A
0N/Aif "%~1" == "" goto callLaunch
0N/Agoto callJava
0N/A
0N/A:callLaunch
0N/A"%DIR_HOME%\lib\winlauncher.exe" launch "%JAVA_BIN%" %JAVA_ARGS% org.opends.quicksetup.uninstaller.UninstallLauncher
0N/Agoto end
0N/A
0N/A:callJava
0N/A"%JAVA_BIN%" %JAVA_ARGS% org.opends.quicksetup.uninstaller.UninstallLauncher %*
0N/A
0N/Arem return part
0N/Aif %errorlevel% == 50 goto version
0N/Agoto end
0N/A
0N/A:version
0N/Arem version information was requested. Return code should be 0.
0N/Aexit /B 0
0N/A
0N/A:end
0N/A