control-panel.bat revision 3897
0N/A
553N/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
0N/Arem trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable,
553N/Arem add the following below this CDDL HEADER, with the fields enclosed
553N/Arem by brackets "[]" replaced with your own identifying information:
553N/Arem Portions Copyright [yyyy] [name of copyright owner]
0N/Arem
0N/Arem CDDL HEADER END
0N/Arem
0N/Arem
0N/Arem Copyright 2006-2008 Sun Microsystems, Inc.
0N/A
0N/Asetlocal
0N/Afor %%i in (%~sf0) do set DIR_HOME=%%~dPsi..
288N/Aset INSTALL_ROOT=%DIR_HOME%
0N/A
0N/Aset INSTANCE_DIR=
0N/Afor /f "delims=" %%a in (%DIR_HOME%\instance.loc) do (
0N/A set INSTANCE_DIR=%%a
0N/A)
0N/Aset CUR_DIR=%~dp0
cd /d %INSTALL_ROOT%
cd /d %INSTANCE_DIR%
set INSTANCE_ROOT=%CD%
cd /d %CUR_DIR%
set SCRIPT_NAME=control-panel
rem Set environment variables
set SCRIPT_UTIL_CMD=set-full-environment
call "%INSTALL_ROOT%\lib\_script-util.bat"
if NOT %errorlevel% == 0 exit /B %errorlevel%
if "%~1" == "" goto callLaunch
goto callJava
:callLaunch
if exist "%INSTALL_ROOT%\lib\set-java-args.bat" DO call "%INSTALL_ROOT%\lib\set-java-args.bat"
"%INSTALL_ROOT%\lib\winlauncher.exe" launch "%OPENDS_JAVA_BIN%" %OPENDS_JAVA_ARGS% %SCRIPT_NAME_ARG% org.opends.guitools.controlpanel.ControlPanelLauncher
goto end
:callJava
if exist "%INSTALL_ROOT%\lib\set-java-args.bat" DO call "%INSTALL_ROOT%\lib\set-java-args.bat"
"%OPENDS_JAVA_BIN%" %OPENDS_JAVA_ARGS% %SCRIPT_NAME_ARG% org.opends.guitools.controlpanel.ControlPanelLauncher %*
rem return part
if %errorlevel% == 50 goto version
goto end
:version
rem version information was requested. Return code should be 0.
exit /B 0
:end