Registered member login:
Register Now
Altirigos » Notification Server and Solutions » Notification Server » CLEAN - Uninstallation of Altiris Agent - CLEAN

» Current Poll
What version of DS will you use to migrate to Windows 7?
DS 6.x - 77.50%
31 Votes
DS 7.x - 22.50%
9 Votes
Other - 0%
0 Votes
Total Votes: 40
You may not vote on this poll.
» Stats
Members: 8,068
Threads: 10,728
Posts: 51,477
Top Poster: Nick (4,939)
Welcome our newest member, stevej
» Online Users: 14
0 members and 14 guests
No Members online
Most users online at once 294, 06-30-2007 at 12:24 PM.
» July 2009
S M T W T F S
282930 1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31 1
Reply
Old 12-23-2008, 03:11 PM   #1 (permalink)
 
dominique's Avatar
 
Status: Sticky...
Join Date: 03-04-2005
Location: Culver City, CA
Age: 52
Posts: 3,394


CLEAN - Uninstallation of Altiris Agent - CLEAN

Hello,

I am trying to uninstall automatically all altiris agents using the KB1995 but I have one item I could not get to work:
Quote:
HKEY_LOCAL_MACHINE > SOFTWARE > Classes > All sub items beginning with Altiris.
Any idea to automate this as the Reg Delete from Microsoft is not using a wildcard...
I was thinking about a REG QUERY first and then using the result in a loop but if anybody has done it before I would appreciate to know how they did it?

Thanks,
__________________
Thanks
Dom
http://www.altirigos.com

"Helping somebody else may help you"
dominique is offline   Reply With Quote
Old 01-06-2009, 04:50 AM   #2 (permalink)
 
Status: Junior Altiris Admin
Join Date: 10-30-2008
Location: Glasgow
Posts: 28


I knocked together a VERY quick Autoit script, which you're more than welcome to use :-)

It's a slight variation on the official KB, as it gets rid of all of the Altiris registry entry, and the uninstall is done over 3 runs, rather than 1..

This is based on Juice tech tip 2249 (I can't post the link yet as I don't have enough postings)


Forgive my code - I am teh suck, or something...

Dim $Exe
Dim $Syntax
Dim $BAT
Dim $RegKey
Dim $Dir

$Dir = "C:\Program Files\Altiris\ALTIRIS AGENT"
$Exe = $Dir & "\AeXAgentUtil.exe"

; Check file exists first, exit if not.
If FileExists($Exe) = 0 then
msgbox(16, "File error", $Exe & " not found. Exiting", 2)
EXIT
EndIf


; Got this far, so here we go..

; Generate the uninstall BAT file
$Syntax = "@ECHO OFF" & @CRLF
$Syntax = $Syntax & Chr(34) & $EXE & Chr(34) & " /DeleteDevices" & @CRLF
$Syntax = $Syntax & Chr(34) & $EXE & Chr(34) & " /UninstallAgents" & @CRLF
$Syntax = $Syntax & Chr(34) & $EXE & Chr(34) & " /Clean" & @CRLF


$BAT = @TempDir & "\CleanAlt.bat"
$Write = FileOpen($BAT, 2)
FileWriteLine($Write, $Syntax)
FileClose($Write)
RunWait($BAT, @TempDir, @SW_HIDE)
FileDelete($BAT)

; Get rid of Altiris registry entry
RegDelete("KEY_LOCAL_MACHINE\SOFTWARE\Altiris")


; Get rid of Altiris* Classes
For $i= 1 to 65535
$RegKey = "HKEY_LOCAL_MACHINE\SOFTWARE\Classes"
$RegVal = RegEnumKey($RegKey, $i)
If @error <> 0 then ExitLoop
If StringMid($RegVal, 1, 7) = "Altiris" then
RegDelete($RegKey & "\" & $RegVal)
EndIf
Next


; Get rid of AppID
RegDelete("HKEY_LOCAL_MACHINE\SOFTWARE\Classes\App ID\{5E038245-CF81-44BE-8018-9A2981B9DC9B}")

; Get rid of AEX*.* under Windows directory
FileDelete(@WindowsDir & "\AeX*.*")

; Get rid of the Agent Program folder
DirRemove($Dir, 1)
gerardsweeney is offline   Reply With Quote
Old 01-06-2009, 08:15 PM   #3 (permalink)
 
dominique's Avatar
 
Status: Sticky...
Join Date: 03-04-2005
Location: Culver City, CA
Age: 52
Posts: 3,394


Excellent thanks a lot
__________________
Thanks
Dom
http://www.altirigos.com

"Helping somebody else may help you"
dominique is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Powered by vBadvanced CMPS v3.0 RC2

All times are GMT -4. The time now is 08:01 PM.


Powered by vBulletin® Version 3.7.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
vB.Sponsors
Altirigos