From d42b15e420478dc45785fff6e00b863cc1f8a0f9 Mon Sep 17 00:00:00 2001
From: lutoff <lutoff@localhost>
Date: Thu, 18 Sep 2008 10:14:53 +0000
Subject: [PATCH] These changes are separating the current delivery into  an "Install Layout" (the binaries) and an "Instance Layout" (the user data).

---
 opends/resource/uninstall.bat |   15 ++++++++++++---
 1 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/opends/resource/uninstall.bat b/opends/resource/uninstall.bat
index 677efca..1e4a6ce 100644
--- a/opends/resource/uninstall.bat
+++ b/opends/resource/uninstall.bat
@@ -28,20 +28,29 @@
 setlocal
 for %%i in (%~sf0) do set DIR_HOME=%%~dPsi.
 
-set INSTANCE_ROOT=%DIR_HOME%
+set INSTALL_ROOT=%DIR_HOME%
+set INSTANCE_DIR=
+for /f "delims=" %%a in (%INSTALL_ROOT%\instance.loc) do (
+  set INSTANCE_DIR=%%a
+)
+set CUR_DIR=%~dp0
+cd %INSTALL_ROOT%
+cd %INSTANCE_DIR%
+set INSTANCE_ROOT=%CD%
+cd %CUR_DIR%
 
 set SCRIPT_NAME=uninstall
 
 rem Set environment variables
 set SCRIPT_UTIL_CMD=set-full-environment-and-test-java
-call "%INSTANCE_ROOT%\lib\_script-util.bat"
+call "%INSTALL_ROOT%\lib\_script-util.bat"
 if NOT %errorlevel% == 0 exit /B %errorlevel%
 
 if "%~1" == "" goto callLaunch
 goto callJava
 
 :callLaunch
-"%DIR_HOME%\lib\winlauncher.exe" launch "%OPENDS_JAVA_BIN%" %OPENDS_JAVA_ARGS% %SCRIPT_NAME_ARG% org.opends.guitools.uninstaller.UninstallLauncher
+"%INSTALL_ROOT%\lib\winlauncher.exe" launch "%OPENDS_JAVA_BIN%" %OPENDS_JAVA_ARGS% %SCRIPT_NAME_ARG% org.opends.guitools.uninstaller.UninstallLauncher
 goto end
 
 :callJava

--
Gitblit v1.10.0