HP Physical to Virtual Cleaner Utility

I came across a very interesting forum on Vmware as I’m performing a migration of an old server which contains HP software & Hardware as for example a G5;

https://communities.vmware.com/thread/70682
My very thanks to the vmware commuty for this awesome script !

I came across a lot of driver problems and sadly I got out removing software and drives manually but luckily for you my friend I got the script and you will not have to do all this stuff when converting physical – to virtual

With no further a due here it goes the script:

@ECHO OFF
ECHO.
ECHO HP Physcial to Virtual Cleaner Utility
ECHO Author: your name here[/i]
ECHO.
ECHO.
ECHO *******************************************************
ECHO * This batch file semi-automates the removal of the HP
ECHO * software (agents and drivers) from a Virtaul server
ECHO * that has been virtualized using P2V Helper, VMware
ECHO * Converter, or similar software from an HP or Compaq
ECHO * physical server.  This batch file assumes relatively
ECHO * newer versions of the support software, and may not
ECHO * completely remove all the software for older versions.
ECHO *******************************************************
ECHO.
ECHO.
ECHO USE AT YOUR OWN RISK!!!
ECHO.
ECHO *****************************
ECHO Type “ctrl-c” to quit now!!!
ECHO *****************************
ECHO.
ECHO USE AT YOUR OWN RISK!!!
ECHO.
Pause
cls

If NOT Exist “%SYSTEMROOT%\system32\atiiiexx.dll” Goto HP
ECHO Removing the “ATI Display Driver”…
rundll32 %SYSTEMROOT%\system32\atiiiexx.dll,_InfEngUnInstallINFFile_RunDLL@16 -inf_class:DISPLAY -clean

:HP
ECHO Removing the “HP ProLiant Legacy Port Configuration Component”…
“C:\Program Files\Compaq\CpqLpcc\hpuninst.exe” /s

ECHO Removing the “HP ProLiant Remote Monitor Service”…
%SYSTEMROOT%\system32\hpuninst.exe /s

ECHO Removing the “HP Version Control Agent”…
C:\hp\hpsmh\data\cgi-bin\vcagent\vcaremov.exe /silent C:\hp\hpsmh\data\cgi-bin\vcagent\vcagent.inf

ECHO Removing the “HP Array Configuration Utility”…
“C:\Program Files\Compaq\Cpqacuxe\hpuninst.exe” /s

ECHO Removing the “HP Array Configuration Utility CLI”…
“C:\Program Files\Compaq\Hpacucli\hpuninst.exe” /s

ECHO Removing the “HP Array Diagnostic Utility”…
“C:\Program Files\Compaq\hpadu\hpuninst.exe” /s

ECHO Removing the “HP ProLiant Integrated Management Log Viewer”…
“C:\Program Files\Compaq\Cpqimlv\hpuninst.exe” /s

ECHO Removing the “HP Insight Management Agents”…
%SYSTEMROOT%\system32\CPQMgmt\aguninst.exe /s

If NOT Exist C:\hp\hpsmh\data\htdocs\DataProtection\UnInstall.exe GOTO OLDAGENTS
ECHO Removing the “HP Protect Your Data”…
C:\hp\hpsmh\data\htdocs\DataProtection\UnInstall.exe

:OLDAGENTS
If NOT Exist “C:\Program Files\HP\hponcfg\hpuninst.exe” GOTO NOMP
ECHO Removing the “HP Lights-Out Online Configuration Utility”…
“C:\Program Files\HP\hponcfg\hpuninst.exe” /s

:NOMP
ECHO Removing the “HP System Management Homepage”…
RunDll32 C:\PROGRA1\COMMON1\INSTAL1\PROFES1\RunTime\11\00\Intel32\Ctor.dll,LaunchSetup “C:\Program Files\InstallShield Installation Information\{3C4DF0FD-95CF-4F7B-A816-97CEF616948F}\setup.exe” -l0x9  -removeonly

ECHO Removing the “HP Insight Diagnostics  Online Edition for Windows”…
ECHO Older, problematic version…
RunDll32 C:\PROGRA1\COMMON1\INSTAL1\engine\6\INTEL31\Ctor.dll,LaunchSetup “C:\Program Files\InstallShield Installation Information\{3754251E-100C-47D4-AB86-DC34047EE3C4}\setup.exe” -l0x9 UNINSTALL
ECHO Newer, good version…
MsiExec.exe /X\{04DDF575-93A4-4682-A4F1-ABD29ECDFE04}

If NOT Exist “%PROGRAMFILES%\VMware\VMware Converter\InstMsi.exe” GOTO NOCONVERTER
ECHO Removing the “VMware Converter” if left behind from VMware Convertor job…
MsiExec.exe /I\{A4D04B1A-DCF1-4C8C-8FFE-07D145812742}

:NOCONVERTER
ECHO Removing registry keys for services without a “Removal Option”…
regedit /s p2vcleaner.reg

ECHO Deleting old HP and COmpaq directories that are no longer needed…
rd /s/q c:\hp
rd /s/q c:\compaq
rd /s/q c:\cpqsystem
rd /s/q “%PROGRAMFILES%\compaq
rd /s/q “%PROGRAMFILES%\hp
rd /s/q %SYSTEMROOT%\system32\CPQMgmt

ECHO.
PAUSE

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s