How to manually uninstall Novell eDirectory from a Windows server

  • 3004658
  • 24-Jan-2007
  • 12-Jun-2012

Environment

Novell eDirectory 8.5 for Windows NT 4.0
Novell eDirectory 8.5 for Windows 2000
Novell eDirectory 8.6 for Windows NT
Novell eDirectory 8.7 for Windows 2000
Novell eDirectory 8.8 for Windows 2000
Novell eDirectory for Windows 2003
Microsoft Windows NT 4.0

Situation

How to manually uninstall Novell eDirectory from a Windows Server
How to remove eDirectory from a Windows 2000 server?
How to manually remove eDirectory from a Windows Server
eDirectory for Windows NT/2000 scrub utility
Scrubbing eDirectory from Windows NT
Scrubbing eDirectory from Windows 2000

Resolution

NOTE: This batch file will automatically remove eDirectory from an English Windows NT/2000/2003 server. If at all possible you should remove all replicas from the server by normal methods (ConsoleOne, iManager) before running this script. If that is not possible (eg: due to eDirectory corruption) you must manually remove the server from any replica rings where it used to be. It will also remove NICI entries as well. It calls for one external executable: REG.EXE is now included with Windows XP and can be found in C:\Windows\System32. It is also available as an additional tool on the Windows 2000 CD-ROM. It has to be installed manually through \SUPPORT\TOOLS\SETUP.EXE. Make sure that REG.EXE is in the same directory where the BATCH file is located.

Batch file usage: This batch file only requires one parameter: the location of the eDirectory installation files.
Example: NDSNTREMOVE.BAT C:\NOVELL\NDS

Note: NDSNTREMOVE.BAT is the name of the batch file.  C:\NOVELL\NDS is the location of the dib.

WARNING:This file works well with eDirectory 8.5, 8.6, 8.7, and 8.8 but has not been fully tested in all environments. This procedure "scrubs" eDirectory and all associated files and references from the Windows Server (including the registry). It does not notify other servers in the eDirectory tree. You will need to manually remove server objects and any other Windows eDirectory related objects manually. Novell is not held liable for any problems that may occur as a result of running this batch file. Use at your own risk.

Additional Information

****** COPY AND PASTE THIS TEXT AND NAME IT.BAT IF YOU WANT TO AUTOMATE THE EDIRECTORY REMOVAL PROCESS USING A BATCH FILE *******

@ECHO OFF
REM This is a batch file to remove eDirectory for Windows
REM

set NDSR_ERROR=0
set NDSR_BADARG=""
set NDSR_PATH=
set NDSR_LOG=NDSRemove.log

REM We must have an argument - either a help specifier or the dhost
REM installation directory (i.e. c:\Novell\NDS).
REM Right now we only support 1 argument.

if "%2%" == "" goto continue1
set NDSR_BADARG=%2
goto displayUsage

:continue1
if "%1%" == "" goto displayUsage
if "%1%" == "h" goto displayUsage
if "%1%" == "-h" goto displayUsage
if "%1%" == "H" goto displayUsage
if "%1%" == "-H" goto displayUsage
if "%1%" == "help" goto displayUsage
if "%1%" == "-help" goto displayUsage
if "%1%" == "Help" goto displayUsage
if "%1%" == "-Help" goto displayUsage
if "%1%" == "?" goto displayUsage
if "%1%" == "-?" goto displayUsage
if "%1%" == "/?" goto displayUsage
if "%1%" == "/h" goto displayUsage
if "%1%" == "/H" goto displayUsage
if "%1%" == "/help" goto displayUsage
if "%1%" == "/Help" goto displayUsage
if "%1%" == "/HELP" goto displayUsage

REM This arg must be the DHost installation path - save it.
set NDSR_PATH=%1
goto startRemove

:startRemove
echo.
echo ********************************************************************
echo NDSNTRemove
echo ********************************************************************
echo.
echo Starting eDirectory Removal...
echo.
echo Path of installed NDS is: %NDSR_PATH%
echo This batch files DOES remove the NICI pieces, so you'll have to do
echo a reboot after this, before re-installing nici.
echo.
echo --------------------------------------------------------------------
echo Stop the eDirectory-related services
echo --------------------------------------------------------------------
echo.
echo Stopping NDS Server0 and W32 SMDR NT services...
echo.
START /b /wait net stop "NDS Server0"
START /b /wait net stop "W32 SMDR"
echo.
echo *** IMPORTANT ***
echo.
echo Continue ONLY after the DHost process has exited.
echo.
echo Please use the Windows Task Manager to verify that DHost has exited.
echo It may take a few minutes for DHost to stop running.
echo.
echo Do not continue until the DHost process is not running anymore.
echo You may have to shutdown the process manually if it doesn't automatically.
echo.
pause

echo.
echo --------------------------------------------------------------------
echo Remove the eDirectory-related registry entries
echo --------------------------------------------------------------------
echo.

reg delete HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\NDSonNT /F
set NDSR_ERROR=%errorlevel%
if %NDSR_ERROR%==2 echo HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\NDSonNT not found.
if %NDSR_ERROR%==0 echo Deleted: HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\NDSonNT
echo.

reg delete "HKLM\SOFTWARE\Novell\NDSonNT - 0" /F
set NDSR_ERROR=%errorlevel%
if %NDSR_ERROR%==2 echo HKLM\SOFTWARE\Novell\NDSonNT - 0 not found.
if %NDSR_ERROR%==0 echo Deleted: HKLM\SOFTWARE\Novell\NDSonNT - 0
echo.

reg delete "HKLM\SOFTWARE\Novell\Portable SMDR" /F
set NDSR_ERROR=%errorlevel%
if %NDSR_ERROR%==2 echo HKLM\SOFTWARE\Novell\Portable SMDR not found.
if %NDSR_ERROR%==0 echo Deleted: HKLM\SOFTWARE\Novell\Portable SMDR
echo.

reg delete"HKLM\SYSTEM\CurrentControlSet\Services\EventLog\Application\NDS Server" /F
set NDSR_ERROR=%errorlevel%
if %NDSR_ERROR%==2 echo HKLM\SYSTEM\CurrentControlSet\Services\EventLog\Application\NDS Server not found
if %NDSR_ERROR%==0 echo Deleted: HKLM\SYSTEM\CurrentControlSet\Services\EventLog\Application\NDS Server
echo.

reg delete"HKLM\SYSTEM\CurrentControlSet\Services\EventLog\Application\W32 SMDR" /F
set NDSR_ERROR=%errorlevel%
if %NDSR_ERROR%==2 echo HKLM\SYSTEM\CurrentControlSet\Services\EventLog\Application\W32 SMDR not found
if %NDSR_ERROR%==0 echo Deleted: HKLM\SYSTEM\CurrentControlSet\Services\EventLog\Application\W32 SMDR
echo.

reg delete "HKLM\SYSTEM\CurrentControlSet\Services\NDS Server0" /F
set NDSR_ERROR=%errorlevel%
if %NDSR_ERROR%==2 echo HKLM\SYSTEM\CurrentControlSet\Services\NDS Server0 not found
if %NDSR_ERROR%==0 echo Deleted: HKLM\SYSTEM\CurrentControlSet\Services\NDS Server0
echo.

reg delete "HKLM\SYSTEM\CurrentControlSet\Services\NICICCS" /F
set NDSR_ERROR=%errorlevel%
if %NDSR_ERROR%==2 echo HKLM\SYSTEM\CurrentControlSet\Services\NICICCS not found
if %NDSR_ERROR%==0 echo Deleted: HKLM\SYSTEM\CurrentControlSet\Services\NICICCS
echo.

reg delete "HKLM\SYSTEM\CurrentControlSet\Services\W32 SMDR" /F
set NDSR_ERROR=%errorlevel%
if %NDSR_ERROR%==2 echo HKLM\SYSTEM\CurrentControlSet\Services\W32 SMDR not found
if %NDSR_ERROR%==0 echo Deleted: HKLM\SYSTEM\CurrentControlSet\Services\W32 SMDR
echo.

echo.
echo --------------------------------------------------------------------
echo Delete the files
echo --------------------------------------------------------------------
echo.

echo SystemRoot = %SystemRoot%
echo Deleting %SystemRoot%\system32\gc080352.dll
del %SystemRoot%\system32\gc080352.dll /f /q
echo Deleting %SystemRoot%\system32\ldapsdk.dll
del %SystemRoot%\system32\ldapsdk.dll /f /q
echo Deleting %SystemRoot%\system32\ldapssl.dll
del %SystemRoot%\system32\ldapssl.dll /f /q
echo Deleting %SystemRoot%\system32\ldapx.dll
del %SystemRoot%\system32\ldapx.dll /f /q
echo Deleting %SystemRoot%\system32\NDSCons.exe
del %SystemRoot%\system32\NDSCons.exe /f /q
echo Deleting %SystemRoot%\system32\NDScpa.cpl
del %SystemRoot%\system32\NDScpa.cpl /f /q
echo Deleting %SystemRoot%\system32\nssl.dll
del %SystemRoot%\system32\nssl.dll /f /q
echo Deleting %SystemRoot%\system32\PKIAPI.dll
del %SystemRoot%\system32\PKIAPI.dll /f /q
REM For pre-Tao installs
echo Deleting %SystemRoot%\system32\gcmts.dll
del %SystemRoot%\system32\gcmts.dll /f /q
echo Deleting %SystemRoot%\system32\sal.dll
del %SystemRoot%\system32\sal.dll /f /q
echo.

echo Stopping the NICI driver...
net stop niciccs

REM We might need to sleep for a couple of seconds once NICI is shutdown before we try to delete it...

echo Deleting %SystemRoot%\system32\drivers\niciccs.sys
del %SystemRoot%\system32\drivers\niciccs.sys /f /q

echo Deleting %SystemRoot%\system32\Novell\NICI\*.*
del %SystemRoot%\system32\Novell\NICI\*.* /f /q
echo Deleting %SystemRoot%\system32\Novell\nds\*.*
del %SystemRoot%\system32\Novell\nds\*.* /f /q
echo.

echo SystemDrive = %SystemDrive%
echo Removing directory %SystemDrive%\Program Files\Common Files\Novell\ni
rmdir "%SystemDrive%\Program Files\Common Files\Novell\ni" /s /q
echo.

echo NDS path = %NDSR_PATH%
del %NDSR_PATH%\SMS\NLS\*.* /f /q
echo Removing directory %NDSR_PATH%\SMS\NLS
rmdir %NDSR_PATH%\SMS\NLS /s /q
echo Deleting %NDSR_PATH%\SMS\*.*
del %NDSR_PATH%\SMS\*.* /f /q
echo Removing directory %NDSR_PATH%\SMS
rmdir %NDSR_PATH%\SMS /s /q

echo Deleting %NDSR_PATH%\NLS\*.*
del %NDSR_PATH%\NLS\*.* /f /q
echo Removing directory %NDSR_PATH%\NLS
rmdir %NDSR_PATH%\NLS /s /q

echo Deleting %NDSR_PATH%\DIBFiles\*.*
del %NDSR_PATH%\DIBFiles\*.* /f /q
echo Removing directory %NDSR_PATH%\DIBFiles
rmdir %NDSR_PATH%\DIBFiles /s /q

echo Deleting %NDSR_PATH%\*.*
del %NDSR_PATH%\*.* /f /q
echo Removing directory %NDSR_PATH%
rmdir %NDSR_PATH% /s /q


echo.
echo ********************************************************************
echo NDSNTRemove Complete
echo ********************************************************************
echo.
goto realEnd

:displayUsage
if %NDSR_BADARG% == "" goto OKUsage
echo NDSNTRemove: Invalid command-line argument: %NDSR_BADARG%

:OKUsage
echo.
echo This command removes the locally installed NDS.
echo.
echo " Usage: NDSNTRemove [[-|/]h|help|?] | [drive:\DHostPath]"
echo ""
echo " [-|/]h|help|? displays this Usage statement "
echo " drive:\DhostPath where DHost is installed "
echo.
echo One argument must be specified. It can be either a help
echo specifier or the path to where Dhost is installed.
echo.
echo Example: To remove the NDS installation at c:\Novell\NDS,
echo type "NDSNTRemove c:\Novell\NDS" at the command prompt.
echo.
echo Example: To find out how to use this command,
echo type "NDSNTRemove /?" at the command prompt, or,
echo type "NDSNTRemove -h" at the command prompt
echo.
goto realEnd

:realEnd
set NDSR_ERROR=
set NDSR_BADARG=
set NDSR_PATH=
set NDSR_LOG=
REM This is the end

.
This script has worked for customers running eDir 886 on Windows 2008 r2
If the HKLM\System\CurrentcontrolSet\services\novellworkstation\ exists remove this as well.
Removed with the unininstall wizard (including nici) and be sure to deleted the nici folder
Do not re-install over RDP, even on Console 0.  Windows 2008 r2 will most likely fail.  Do the install at the console or if the install has to be done remotely do the install with VNC.
Formerly known as TID# 10058219