Tuesday 4 September 2012

Automatic EPM Uninstaller

Uninstalling EPM can be a bit of a pain. Or rather doing a clean uninstall is. The procedure generally is:

1. From start menu, uninstall EPM system.
2. Go through each of the "Application Developer Homes" start menu items and uninstall each one from highest numbered to lowest.
3. Uninstall WebLogic.
4. Uninstall WebTier.
5. Uninstall Oracle Common Home
5. Uninstall any remaining items.
6. Delete start menu items.

And for step 7 manually go through each Oracle directory and delete all the files. Then go through the registry and delete all the Hyperion registry keys. That's step 8.

Or you can speed up steps 7 and 8 by using the script below to complete the uninstallation.

Uninstall_Hyperion.bat:



echo "Please make sure you have uninstalled all you can from the start menu before proceeding!"
echo "This script must be run from a command prompt, from the directory where the script resides."

REM "Set environment variables, to help us clean up these directories"

call setEnv.bat

pause

REM "Delete contents of MIDDLEWARE_HOME (including directories)"

del /s /q %MIDDLEWARE_HOME%\*.*

net stop "COM+ System Application"
net stop "Distributed Transaction Coordinator"
net stop "VMware Tools Service"

del /s /q %MIDDLEWARE_HOME%\*.*
rd /s /q %MIDDLEWARE_HOME%

net start "COM+ System Application"
net start "Distributed Transaction Coordinator"
net start "VMware Tools Service"

REM "Delete contents of ORACLE_HOME (including directories)"

del /s /q %ORACLE_HOME%\*.*
rd /s /q %ORACLE_HOME%

REM "Delete contents of C:\Program Files\Oracle (including directories)"

del /s /q "C:\Program Files\Oracle\*.*"
rd /s /q "C:\Program Files\Oracle"

REM "Delete Oracle files in user profile folder"

del /q %USERPROFILE%\.oracle.instance
del /q %USERPROFILE%\set_hyphome.bat

REM "Delete Oracle registry entries"

regedit /s Uninstall_Hyperion.reg

REM "If it exists, delete FR Studio path"

IF NOT "%FRPATH%"=="" (
 del /s /q %FRPATH%
 rd /s /q %FRPATH%
)

REM "Delete environment variables"

SET APS_HOME=
SET ARBORPATH=
SET ESSBASEPATH=
SET ESSLANG=
SET EPM_ORACLE_HOME=
SET ORACLE_HOME=
SET HYPERION_HOME=
SET MIDDLEWARE_HOME=
SET MW_HOME=

setx APS_HOME "" /M
setx ARBORPATH "" /M
setx ESSBASEPATH "" /M
setx ESSLANG "" /M
setx EPM_ORACLE_HOME "" /M
setx ORACLE_HOME "" /M
setx HYPERION_HOME "" /M
setx MIDDLEWARE_HOME "" /M
setx MW_HOME "" /M

REM "Prune non-existent directories from the path"

pathed.exe -p
pathed.exe -s -p

echo "Manually delete or rename the InstallShield entries:"
REM explorer "C:\Program Files\common files\InstallShield\"

pause



Uninstall_Hyperion.reg:



Windows Registry Editor Version 5.00

[-HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE]

[-HKEY_LOCAL_MACHINE\SOFTWARE\wow6432node\oracle]

[-HKEY_CURRENT_USER\Software\Brio\Hyperion\Oracle]



You can also download the batch file here and the registry file here.

Remember to delete the databases on your RDB server as well. Please note the above scripts do not remove the services from appearing in the "services.msc" control. Also this requires pathed.exe to reside in the same directory, and "SETX" to be installed (usually from the resource kit).

2 comments:

  1. Great help. Thanks. 2 more things though. Make sure you create the setEnv.bat file in the same folder with these 2 lines...

    set MIDDLEWARE_HOME=D:\Oracle\Middleware
    set ORACLE_HOME=%MIDDLEWARE_HOME%\EPMSystem11R1

    And remove Oracle Hyperion SmartView and Oracle Hyperion Essbase clients from Add/Remove Programs

    ReplyDelete
    Replies
    1. Thanks for the feedback. I think the setEnv.bat file posted a way back should be able to pick those up environment variables automatically (http://hyperipwn.blogspot.co.nz/2012/08/environment-variables.html) but that script has been updated extensively by me offline since I posted it.

      I cannot currently update it so it is probably much easier for people to hard-code the variables, as you have done.

      Once I am back from my travelling I will create a full follow-up to this post with the updated scripts and incorporate your comments.

      Thanks again.

      Delete