Hi,
With both old school P2V and the new converter tool, we have to uninstall about 10 HP agents/tools from "Add/Remove Programs", manually uninstall the HP Network Configuration Utility, and delete two registry keys that "Add/Remove Programs" does not remove after the conversion is completed.
Does anyone have any sweet scripts or tools to do all this automatically?
Thanks
SlickBag
Here it is:
1) Create a new batch file (p2vcleaner.bat for example). The contents are listed below.
2) Create a new REG file (must be called p2vcleaner.reg). The contents are listed below.
3) Download snetcfg.exe off the Internet (http://www.jsifaq.com/docs/files/76011/snetcfg.zip)
4) Put all three files in the same directory on your freshly P2Ved VM (c:\p2vscripts for example)
5) Run the batch file.
6) Manually uninstall any HP tools that the batch file choked on.
7) Delete the P2VScripts directory.
😎 Reboot
BATCH File:
@ECHO OFF
ECHO.
ECHO HP Physcial to Virtual Cleaner Utility
ECHO Author: SlickBag
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"...
"%PROGRAMFILES%\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"...
"%PROGRAMFILES%\Compaq\Cpqacuxe\hpuninst.exe" /s
ECHO Removing the "HP Array Configuration Utility CLI"...
"%PROGRAMFILES%\Compaq\Hpacucli\hpuninst.exe" /s
ECHO Removing the "HP Array Diagnostic Utility"...
"%PROGRAMFILES%\Compaq\hpadu\hpuninst.exe" /s
ECHO Removing the "HP ProLiant Integrated Management Log Viewer"...
"%PROGRAMFILES%\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"...
"%PROGRAMFILES%\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.......requires a reboot...
MsiExec.exe /X\{A4D04B1A-DCF1-4C8C-8FFE-07D145812742}
ECHO Removing the "HP Network Congifuration Utility"....requires a reboot...
snetcfg.exe -v -u cq_cpqteam
: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
REG File:
Windows Registry Editor Version 5.00
Let me know how it works.
SlickBag
I just tried it on a DL360 G2 running Win2k and it worked perfectly!
Thanks SlickBag! wish I could give you points!
Saaaweeeet!
Awesome!
Now we just need to find a place to host it, so we don't have to search for this thread every time we lose it.
Thanks Jase for the tip to use the UNINSTALL strings from the registry.
Old trick... Been around since Win95.
I'm just glad I could help!
... this kind of stuff is exactly what I want to run automated with this tool
http://sanbarrow.com/moa2/a3.jpg
Finally got a chance to run the batch file and it worked for me as well. Thanks again.
LT
Great. Thanks for the feedback.
Thanks for wrapping this up.
My hardware guy decided to update some HP support packs on a bunch of HP Blades. He didn't know that, months ago, several of these systems were migrated to VM's.
I got rid of the HP stuff back then, but his "list" wasn't correct, and he installed the latest support pack on a couple VM's.
Needless to say, this helped me out quit a bit.
You have put the script together nicely.
Many thanks!
Jase
BTW, there's one that the script did miss:
HP Proliant Integrated Management Log Viewer. The uninstall string is in the script, but it didn't work for me.
I modified this portion...[code]ECHO Removing the "HP ProLiant Integrated Management Log Viewer"...
"%PROGRAMFILES%\Compaq\Cpqimlv\hpuninst.exe" /s[/code][code]ECHO Removing the "HP ProLiant Integrated Management Log Viewer"...
MsiExec.exe /X\{B03AAFA3-07B7-4D93-8ECD-12B977BF861E}[/code]
became:[code]ECHO Removing the "HP ProLiant Integrated Management Log Viewer"...
MsiExec.exe /X\{B03AAFA3-07B7-4D93-8ECD-12B977BF861E}[/code]
And BTW, if you put \[ code ] and \[ /code ] around text (without the spaces) it will show up as code in your posts...
Kewl - thanks for the tip about the code. I also made a few more changes to cleanup the output at the directory removal stage:
\[Code]
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
to this:
\[Code]
ECHO Deleting old HP and Compaq directories that are no longer needed...
rd /s/q c:\hp >Nul: 2>&1
rd /s/q c:\compaq >Nul: 2>&1
rd /s/q c:\cpqsystem >Nul: 2>&1
rd /s/q "%PROGRAMFILES%\compaq >Nul: 2>&1
rd /s/q "%PROGRAMFILES%\hp >Nul: 2>&1
rd /s/q %SYSTEMROOT%\system32\CPQMgmt >Nul: 2>&1
...little trick I picked up from Terminal Server scripts...
Slickbag.
Well didn't work
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
to this:
ECHO Deleting old HP and Compaq directories that are no longer needed...
rd /s/q c:\hp >Nul: 2>&1
rd /s/q c:\compaq >Nul: 2>&1
rd /s/q c:\cpqsystem >Nul: 2>&1
rd /s/q "%PROGRAMFILES%\compaq" >Nul: 2>&1
rd /s/q "%PROGRAMFILES%\hp" >Nul: 2>&1
rd /s/q %SYSTEMROOT%\system32\CPQMgmt >Nul: 2>&1
Thanks!
Hmmm...
I am looking at the uninstall string for the IML on a server running the 7.5 agents and it shows
"%PROGRAMFILES%\Compaq\Cpqimlv\hpuninst.exe" /s[/code]
Jase - do you know what version of the agents you had on the box that did not work with this? I am currently downloading the 7.7 version to see what that shows as the uninstall string. I also checked a server running version 7.3 and it was the same - so either you have an older version or you are at the newest version which changes the uninstall.
Slickbag
I'll have to touch base with the my hardware guy...
I'm pretty sure it is the latest though...
LOL!
From the installer notes of the latest IML:
Installation Notes
Installation is now based on the Microsoft Installer (MSI). If you wish to downgrade from this version of the service to version 5.3.0.0 or earlier, use "Add or Remove Programs" to uninstall this version of the utility before installing the earlier version.
So I guess your uninstall string is correct for the version that comes with the 7.7 agents. Lovely...
SlickBag
Here is an updated Batch file - fixed some logic errors I had and added what Jase found:
@ECHO OFF
ECHO.
ECHO HP Physcial to Virtual Cleaner Utility
ECHO Author: Nelson Kaeppel
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
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"...
"%PROGRAMFILES%\Compaq\CpqLpcc\hpuninst.exe" /s
ECHO Removing the "HP ProLiant Remote Monitor Service"...
%SYSTEMROOT%\system32\hpuninst.exe /s
If NOT Exist "%PROGRAMFILEs%\HPWBEM\IPMI" GOTO NOIPMI
ECHO Removing the "HP ProLiant IPMI WMI Provider"...
MsiExec.exe /X\{DF6412FA-0E25-4B23-9E80-116C061B4FD1}
:NOIPMI
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"...
"%PROGRAMFILES%\Compaq\Cpqacuxe\hpuninst.exe" /s
ECHO Removing the "HP Array Configuration Utility CLI"...
"%PROGRAMFILES%\Compaq\Hpacucli\hpuninst.exe" /s
ECHO Removing the "HP Array Diagnostic Utility"...
"%PROGRAMFILES%\Compaq\hpadu\hpuninst.exe" /s
ECHO Removing the "HP ProLiant Integrated Management Log Viewer"...
If NOT Exist "%PROGRAMFILES%\Compaq\Cpqimlv\hpuninst.exe" GOTO NEWLFV
"%PROGRAMFILES%\Compaq\Cpqimlv\hpuninst.exe" /s
GOTO HPAGENTS
:NEWLFV
MsiExec.exe /X\{B03AAFA3-07B7-4D93-8ECD-12B977BF861E}
:HPAGENTS
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 NODATAPROTECT
ECHO Removing the "HP Protect Your Data"...
C:\hp\hpsmh\data\htdocs\DataProtection\UnInstall.exe
:NODATAPROTECT
If NOT Exist "C:\Program Files\HP\hponcfg\hpuninst.exe" GOTO NOMP
ECHO Removing the "HP Lights-Out Online Configuration Utility"...
"%PROGRAMFILES%\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"...
If NOT Exist "C:\Program Files\InstallShield Installation Information\{3754251E-100C-47D4-AB86-DC34047EE3C4}\setup.exe" GOTO NEWDIAG
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
GOTO CHECKCONVERTER
:NEWDIAG
ECHO Newer, good version...
MsiExec.exe /X\{04DDF575-93A4-4682-A4F1-ABD29ECDFE04}
:CHECKCONVERTER
If NOT Exist "%PROGRAMFILES%\VMware\VMware Converter\InstMsi.exe" GOTO NOCONVERTER
ECHO Removing the "VMware Converter"...requires a reboot...
MsiExec.exe /X\{A4D04B1A-DCF1-4C8C-8FFE-07D145812742}
:NOCONVERTER
ECHO Removing registry keys for services without a "Removal Option"...
regedit /s p2vcleaner.reg
ECHO Removing the "HP Network Congifuration Utility"...requires a reboot...
snetcfg.exe -v -u cq_cpqteam
ECHO Deleting old HP and Compaq directories that are no longer needed...
rd /s/q c:\hp >Nul: 2>&1
rd /s/q c:\compaq >Nul: 2>&1
rd /s/q c:\cpqsystem >Nul: 2>&1
rd /s/q "%PROGRAMFILES%\compaq" >Nul: 2>&1
rd /s/q "%PROGRAMFILES%\hp" >Nul: 2>&1
rd /s/q %SYSTEMROOT%\system32\CPQMgmt >Nul: 2>&1
ECHO.
PAUSE
SlickBag
Hmmm....
Does not seem to work very well with the HP 7.7 agents installed. It generated a whole bunch of errors, and left about 5 things in "Add/Remove Programs" still. When I went in to manually remove them they generated some funky errors.
You may want want to hold off on using the batch file if you are running 7.7 (or even maybe 7.6) agents on your source servers.
SlickBag