I wrote a little VB.net 2010 application and thought I would share it
Since I read in the McAfee agent documentation that you have to delete some registry values in order to use the McAfee Agent in an image deployment and me being lazy decided to write a program to automate this. Below is the source code.
If you would like to use this
1. download VB.net 2010 express edition.
2. Create a new Console Application
3. Paste in code
4. Make sure the computer in question has .Net 4.0 and Windows installer 3.1 installed on it.
It was tested for 32-bit but should work for 64-bit
I am not a programmer just took a class on it in college so there could be some code improvements.
If you see something i could add let me know
' This program worked for me on 32-bit clients I added 64-bit support but I didn't test to make sure it would work.
'This program was made for Mcafee Agents using default paths
strComputerName = Environment.MachineName ' get computer name
'Stop program if image
Call CheckIfServiceExists() ' checks if service exists if not terminate program
'Delete Registry Keys for Mcafee Agent
'Try to force collection send to epo only if service started attempt 3 times on third break loop and send error
'If loop prevention reached 3 times send error
'You could shorten this part just got lazy
Dim StrAgentGUID As String = "AgentGUID"
ElseIf Environment.Is64BitOperatingSystem = True Then
For Each service As ServiceController In services
If service.ServiceName.Contains("McAfeeFramework") Then
'Checks if 64-bit os or 32-bit to get installation path
Message was edited by: tonyu on 5/20/11 8:45:16 AM CDT
Message was edited by: tonyu on 5/20/11 8:47:26 AM CDT
Message was edited by: tonyu on 5/20/11 8:49:59 AM CDT
Message was edited by: tonyu on 5/20/11 8:54:34 AM CDT
McafeeAgentGUID.vb.zip 2.8 K