Registered member login:
Register Now
Altirigos » Altiris Administrators » General » Uninstall Agents, Clients, etc...

» Current Poll
Do you leave the Aclient enabled?
YES - 82.31%
107 Votes
NO - 17.69%
23 Votes
Total Votes: 130
You may not vote on this poll.
» Stats
Members: 9,498
Threads: 11,753
Posts: 55,312
Top Poster: Nick (4,981)
Welcome our newest member, Junior
» Online Users: 64
5 members and 59 guests
andykn, Brandon, jdelator, Junior, wlahay
Most users online at once 294, 06-30-2007 at 12:24 PM.
» March 2010
S M T W T F S
28 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 123
Reply
Old 01-27-2006, 05:49 PM   #1 (permalink)
 
dominique's Avatar
 
Status: Sticky...
Join Date: 03-04-2005
Location: Culver City, CA
Age: 53
Posts: 3,394


Uninstall Agents, Clients, etc...

Hello,

Is it possible to uninstall all agents and clients at once?
Should I write a line for each of them?
Do we have an exhaustive list of agent, clients which could be installed by Altiris?

Thanks,
Dom
dominique is offline   Reply With Quote
Old 01-27-2006, 06:21 PM   #2 (permalink)
 
Nick's Avatar
 
Status: Altiris Architect (Site Founder)
Join Date: 01-01-2005
Location: RDU, North Carolina, USA
Posts: 4,981


Dom,

The AeXAgentUtil.exe /clean is supposed to remove all agents as well as related registry keys from the system with the NSAgent on it prior to removing the NSAgent itself.

I have seen cases where this isn't always the case though. There are a couple of scripts running around on the forums. You can find it HERE.

Another method that I have used is to go to each package for the various agent uninstalls and copy the command line for those jobs then create a script.
__________________
Scire potentia est (knowledge is power)
Nick is offline   Reply With Quote
Old 01-27-2006, 06:26 PM   #3 (permalink)
 
dominique's Avatar
 
Status: Sticky...
Join Date: 03-04-2005
Location: Culver City, CA
Age: 53
Posts: 3,394


Nick,

Thanks. I found 10 of them through the differents packages installer.

I have check the AeXAgentUtil.exe /clean it is really not efficient, for about 600 machines only 52 were cleaned properly the first run. By doing the same process 5 times I reached 300 machines...

All others registries, and agent remains... it seems you need a 100% clean network when you are processing, any failure or inteference during the process kill and skip things....

Thanks,
Dom
dominique is offline   Reply With Quote
Old 01-27-2006, 06:28 PM   #4 (permalink)
 
dominique's Avatar
 
Status: Sticky...
Join Date: 03-04-2005
Location: Culver City, CA
Age: 53
Posts: 3,394


Quote:
Originally Posted by Nick
Dom,

The AeXAgentUtil.exe /clean is supposed to remove all agents as well as related registry keys from the system with the NSAgent on it prior to removing the NSAgent itself.

I have seen cases where this isn't always the case though. There are a couple of scripts running around on the forums. You can find it HERE.

Another method that I have used is to go to each package for the various agent uninstalls and copy the command line for those jobs then create a script.
I do not have access to HERE link!!! I thinh it is in the script forum am i right??


dominique, you do not have permission to access this page. This could be due to one of several reasons:
  1. Your user account may not have sufficient privileges to access this page. Are you trying to edit someone else's post, access administrative features or some other privileged system?
  2. If you are trying to post, the administrator may have disabled your account, or it may be awaiting activation.
Thanks,
Dom

Last edited by dominique; 01-27-2006 at 07:01 PM.. Reason: add comment
dominique is offline   Reply With Quote
Old 01-28-2006, 09:24 AM   #5 (permalink)
 
Nick's Avatar
 
Status: Altiris Architect (Site Founder)
Join Date: 01-01-2005
Location: RDU, North Carolina, USA
Posts: 4,981


Opps. Sorry about that Dom. The location where that post is on the moderators forum. I keep making that mistake with regards to that post.

I've copied the script here for you to use. You'll obviously need to modify it for your environment. Sorry for the bad link earlier.

Here is a scrub script that you can push out to your managed machines, to uninstall/reinstall and/or redirect them to a new server while you rebuild your existing box, if you so desire.

You'll need to do a few things, such as change the server names to your own, change the GUIDs at the end of the script to match your own, and prep copies of "AeXAgentUtil.exe" & "AeXNSC.exe" into a folder named "AltirisTeamSourceFiles$" on your source server.

'ScrubScript.vbs
'By XXXXXXXXXXXX
' with error handling and logging by XXXXXXXXXXXX
Option Explicit
On Error Resume Next
Dim wshShell, objFso, eFLdr, tFldr
Dim strWindir, objFolder, objFile
Dim strComputerName, strFileDateTime
Dim dtmThisDay, dtmThisMonth, dtmThisYear
Dim dtmThisHour, dtmThisMinute, dtmThisSecond
Dim strFileName, strMessage
Dim strUserName, strUserDomain, strUserProfile
Dim strLogonServer, strTemp, strTmp
Dim strMissingFileSource, strLogCollectionShare
Dim strSource, strDestination, strCMD
strMissingFileSource = "\\migrationsrv\AltirisTeamSourceFiles$\"
strLogCollectionShare = "\\migrationsrv\AltirisTeamScriptLogs$\"
set wshShell = CreateObject("WScript.Shell")
Set objFso = CreateObject("Scripting.FileSystemObject")
'Create folder structure for holding logs for this script, if necessary:
strWindir = wshShell.ExpandEnvironmentStrings("%Windir%\")
If NOT (objFso.FolderExists(strWindir & "AltirisTeamInfo-DoNotDelete")) then _
Set objFolder = objFso.CreateFolder(strWindir & "AltirisTeamInfo-DoNotDelete")
If NOT (objFso.FolderExists(strWindir & "AltirisTeamInfo-DoNotDelete" & "\ScriptLogs")) then _
Set objFolder = objFso.CreateFolder(strWindir & "AltirisTeamInfo-DoNotDelete" & "\ScriptLogs")
If NOT (objFso.FolderExists(strWindir & "AltirisTeamInfo-DoNotDelete" & "\ScriptLogs\ScrubScript")) then _
Set objFolder = objFso.CreateFolder(strWindir & "AltirisTeamInfo-DoNotDelete" & "\ScriptLogs\ScrubScript")
'Create and open log file for this execution of this script:
strComputerName = wshShell.ExpandEnvironmentStrings("%ComputerName%" )
dtmThisDay = Day(Now)
If (Len(dtmThisDay) = "1") Then dtmThisDay = "0" & dtmThisDay
dtmThisMonth = Month(Now)
If (Len(dtmThisMonth) = "1") Then dtmThisMonth = "0" & dtmThisMonth
dtmThisYear = Year(Now)
dtmThisHour = Hour(Now)
If (Len(dtmThisHour) = "1") Then dtmThisHour = "0" & dtmThisHour
dtmThisMinute = Minute(Now)
If (Len(dtmThisMinute) = "1") Then dtmThisMinute = "0" & dtmThisMinute
dtmThisSecond = Second(Now)
If (Len(dtmThisSecond) = "1") Then dtmThisSecond = "0" & dtmThisSecond
strFileDateTime = "--" & _
dtmThisYear & "-" & _
dtmThisMonth & "-" & _
dtmThisDay & "--" & _
dtmThisHour & "-" & _
dtmThisMinute & "-" & _
dtmThisSecond
strFileName = strComputerName & "--ScrubScript" & strFileDateTime & ".txt"
Set objFile = objFSO.CreateTextFile(strWindir & "AltirisTeamInfo-DoNotDelete" & "\ScriptLogs\ScrubScript\" & _
strFileName,TRUE)
'***Start of Logging
strMessage = "START OF LOG: " & strFileName & "."
objFile.Writeline strMessage : CheckError
objFile.Writeline " " : CheckError
'Copy log to share on NS server to indicate script started:
strMessage = " 001: Copy log to share on NS server to indicate script started."
objFile.Writeline strMessage : CheckError
'Create Server folder structure for holding logs for this script, if necessary:
If NOT (objFso.FolderExists(strLogCollectionShare & "ScriptLogs")) then _
Set objFolder = objFso.CreateFolder(strLogCollectionShare & "ScriptLogs")
If NOT (objFso.FolderExists(strLogCollectionShare & "ScriptLogs\ScrubScript")) then _
Set objFolder = objFso.CreateFolder(strLogCollectionShare & "ScriptLogs\ScrubScript")
strSource = strWindir & "AltirisTeamInfo-DoNotDelete" & "\ScriptLogs\ScrubScript\" & _
strFileName & "-START"
strDestination = strLogCollectionShare & "ScriptLogs\ScrubScript\"
strCMD = "xcopy.exe " & strSource & " " & strDestination & " /V /Y /Q"
WshShell.Run strCMD, 2, True 'Run minimized and wait
'Diagnostic information
strMessage = " 010: Diagnostic information:"
objFile.Writeline strMessage : CheckError
strUserName = wshShell.ExpandEnvironmentStrings("%UserName%")
strUserDomain = wshShell.ExpandEnvironmentStrings("%UserDomain%")
strUserProfile = wshShell.ExpandEnvironmentStrings("%UserProfile%")
strLogonServer = wshShell.ExpandEnvironmentStrings("%LogonServer%")
strTemp = wshShell.ExpandEnvironmentStrings("%Temp%")
strTmp = wshShell.ExpandEnvironmentStrings("%Tmp%")
strMessage = _
" UserName = " & strUserName & "; " & _
"UserDomain = " & strUserDomain & "."
objFile.Writeline strMessage : CheckError
strMessage = _
" UserProfile = " & strUserProfile & "."
objFile.Writeline strMessage : CheckError
strMessage = _
" LogonServer = " & strLogonServer & "."
objFile.Writeline strMessage : CheckError
strMessage = _
" Temp = " & strTemp & "."
objFile.Writeline strMessage : CheckError
strMessage = _
" Tmp = " & strTmp & "."
objFile.Writeline strMessage : CheckError
strMessage = _
" MissingFileSource = " & strMissingFileSource & "."
objFile.Writeline strMessage : CheckError
strMessage = _
" LogCollectionShare = " & strLogCollectionShare & "."
objFile.Writeline strMessage : CheckError
objFile.Writeline " " : CheckError
'Begin meaningful ScrubScript execution:
strMessage = " 020: Begin meaningful ScrubScript execution."
objFile.Writeline strMessage : CheckError
'**********
'Make sure the files needed to install and uninstall the Altiris client
' are present on the local system before proceeding further.
strMessage = " 030: Make sure the files needed to install and uninstall the Altiris client"
objFile.Writeline strMessage : CheckError
strMessage = " are present on the local system before proceeding further."
objFile.Writeline strMessage : CheckError
'Check for aexagentutil.exe:
If (objFso.FileExists("c:\windows\temp\aexagentutil.e xe")) then
strMessage = " 031: The file c:\windows\temp\aexagentutil.exe is present locally."
objFile.Writeline strMessage : CheckError
Else
strMessage = " 032: The file c:\windows\temp\aexagentutil.exe is not present locally."
objFile.Writeline strMessage : CheckError
strSource = strMissingFileSource & "\aexagentutil.exe"
strDestination = "c:\windows\temp\"
strCMD = "xcopy.exe " & strSource & " " & strDestination & " /V /Y /Q"
strMessage = " 033: Copying the file locally with the following command:"
objFile.Writeline strMessage : CheckError
strMessage = " " & strCMD & "."
objFile.Writeline strMessage : CheckError
WshShell.Run strCMD, 2, True : CheckError 'Run minimized and wait
If (objFso.FileExists("c:\windows\temp\aexagentutil.e xe")) then
strMessage = " 035: The file c:\windows\temp\aexagentutil.exe is now present locally."
objFile.Writeline strMessage : CheckError
Else
strMessage = " 036: The file c:\windows\temp\aexagentutil.exe is still not present locally."
objFile.Writeline strMessage : CheckError
strMessage = " Continuing regardless."
objFile.Writeline strMessage : CheckError
End If
End If
'Check for aexnsc.exe:
If (objFso.FileExists("c:\windows\temp\aexnsc.exe")) then
strMessage = " 041: The file c:\windows\temp\aexnsc.exe is present locally."
objFile.Writeline strMessage : CheckError
Else
strMessage = " 042: The file c:\windows\temp\aexnsc.exe is not present locally."
objFile.Writeline strMessage : CheckError
strSource = strMissingFileSource & "\aexnsc.exe"
strDestination = "c:\windows\temp\"
strCMD = "xcopy.exe " & strSource & " " & strDestination & " /V /Y /Q"
strMessage = " 043: Copying the file locally with the following command:"
objFile.Writeline strMessage : CheckError
strMessage = " " & strCMD & "."
objFile.Writeline strMessage : CheckError
WshShell.Run strCMD, 2, True : CheckError 'Run minimized and wait
If (objFso.FileExists("c:\windows\temp\aexnsc.exe")) then
strMessage = " 045: The file c:\windows\temp\aexnsc.exe is now present locally."
objFile.Writeline strMessage : CheckError
Else
strMessage = " 046: The file c:\windows\temp\aexnsc.exe is still not present locally."
objFile.Writeline strMessage : CheckError
strMessage = " Continuing regardless."
objFile.Writeline strMessage : CheckError
End If
End If
eFldr = "C:\Program Files\Altiris\eXpress"
tFldr = "C:\windows\temp"
'Remove Altiris AClient from the command line, if AClient.exe is present
If (objFso.FileExists("c:\program files\altiris\AClient\AClient.exe")) then
strMessage = " 051: The file c:\program files\altiris\AClient\AClient.exe is present locally."
objFile.Writeline strMessage : CheckError
strMessage = " 052: Remove Altiris AClient from the command line using the following command:"
objFile.Writeline strMessage : CheckError
strMessage = " wshShell.Run 'c:\program files\altiris\AClient\AClient.exe -remove -silent', 2, True"
objFile.Writeline strMessage : CheckError
wshShell.Run """c:\program files\altiris\AClient\AClient.exe"" -remove -silent", 2, True : CheckError
Else
strMessage = " 053: The file c:\program files\altiris\AClient\AClient.exe is not present locally."
objFile.Writeline strMessage : CheckError
strMessage = " The AClient will not be removed using c:\program files\altiris\AClient\AClient.exe."
objFile.Writeline strMessage : CheckError
End If
'Remove Altiris Agent from the command line
strMessage = " 055: Remove Altiris Agent from the command line using the following command:"
objFile.Writeline strMessage : CheckError
strMessage = " wshShell.Run 'c:\windows\temp\aexagentutil.exe /uninstallagents /clean', 2, True"
objFile.Writeline strMessage : CheckError
wshShell.Run "c:\windows\temp\aexagentutil.exe /uninstallagents /clean", 2, True : CheckError 'Run minimized and wait
'Delete c:\program files\altiris\eXpress folder, if necessary
strMessage = " 060: Delete c:\program files\altiris\eXpress folder, if necessary."
objFile.Writeline strMessage : CheckError
if (objFso.FolderExists("c:\program files\altiris\express")) then
objFso.DeleteFolder eFldr : CheckError
end if
'Delete 25 Altiris registry keys
strMessage = " 070: Delete 25 Altiris registry keys."
objFile.Writeline strMessage : CheckError
wshShell.Run "reg.exe delete HKLM\Software\Altiris /f", 2, True : CheckError 'Run minimized and wait

wshShell.Run "reg.exe delete HKLM\SOFTWARE\Classes\Altiris.AeXSynchAgent.Schedu ledTaskHandler /f", 2, True : CheckError 'Run minimized and wait
wshShell.Run "reg.exe delete HKLM\SOFTWARE\Classes\Altiris.AeXSynchAgent.Schedu ledTaskHandler.1 /f", 2, True : CheckError 'Run minimized and wait
wshShell.Run "reg.exe delete HKLM\SOFTWARE\Classes\AeXTaskSynchAgent.AeXSynchEx ecution /f", 2, True : CheckError 'Run minimized and wait
wshShell.Run "reg.exe delete HKLM\SOFTWARE\Classes\AeXTaskSynchAgent.AeXSynchEx ecution.1 /f", 2, True : CheckError 'Run minimized and wait
wshShell.Run "reg.exe delete HKLM\SOFTWARE\Classes\Altiris.AeXNetwork.Monitor /f", 2, True : CheckError 'Run minimized and wait
wshShell.Run "reg.exe delete HKLM\SOFTWARE\Classes\Altiris.AeXNetwork.Monitor.1 /f", 2, True : CheckError 'Run minimized and wait
wshShell.Run "reg.exe delete HKLM\SOFTWARE\Classes\Altiris.AeXNetwork.Profile /f", 2, True : CheckError 'Run minimized and wait
wshShell.Run "reg.exe delete HKLM\SOFTWARE\Classes\Altiris.AeXNetwork.Profile.1 /f", 2, True : CheckError 'Run minimized and wait
wshShell.Run "reg.exe delete HKLM\SOFTWARE\Classes\Altiris.AeXNetwork.Receiver /f", 2, True : CheckError 'Run minimized and wait
wshShell.Run "reg.exe delete HKLM\SOFTWARE\Classes\Altiris.AeXNetwork.Receiver. 1 /f", 2, True : CheckError 'Run minimized and wait
wshShell.Run "reg.exe delete HKLM\SOFTWARE\Classes\Altiris.AeXNetwork.Sender /f", 2, True : CheckError 'Run minimized and wait
wshShell.Run "reg.exe delete HKLM\SOFTWARE\Classes\Altiris.AeXNetwork.Sender.1 /f", 2, True : CheckError 'Run minimized and wait
wshShell.Run "reg.exe delete HKLM\SOFTWARE\Classes\Altiris.AeXNetwork.Settings /f", 2, True : CheckError 'Run minimized and wait
wshShell.Run "reg.exe delete HKLM\SOFTWARE\Classes\Altiris.AeXNetwork.Settings. 1 /f", 2, True : CheckError 'Run minimized and wait
wshShell.Run "reg.exe delete HKLM\SOFTWARE\Classes\Altiris.AeXNetwork.Transport /f", 2, True : CheckError 'Run minimized and wait
wshShell.Run "reg.exe delete HKLM\SOFTWARE\Classes\Altiris.AeXNetwork.Transport .1 /f", 2, True : CheckError 'Run minimized and wait
wshShell.Run "reg.exe delete HKLM\SOFTWARE\Classes\Altiris.AeXPackageDelivery /f", 2, True : CheckError 'Run minimized and wait
wshShell.Run "reg.exe delete HKLM\SOFTWARE\Classes\Altiris.AeXPackageDelivery.1 /f", 2, True : CheckError 'Run minimized and wait
wshShell.Run "reg.exe delete HKLM\SOFTWARE\Classes\Altiris.AeXSWDAgent.Schedule dTaskHandler /f", 2, True : CheckError 'Run minimized and wait
wshShell.Run "reg.exe delete HKLM\SOFTWARE\Classes\Altiris.AeXSWDAgent.Schedule dTaskHandler.1 /f", 2, True : CheckError 'Run minimized and wait
wshShell.Run "reg.exe delete HKLM\SOFTWARE\Classes\Altiris.Synch /f", 2, True : CheckError 'Run minimized and wait
wshShell.Run "reg.exe delete HKLM\SOFTWARE\Classes\Altiris.Synch.1 /f", 2, True : CheckError 'Run minimized and wait
wshShell.Run "reg.exe delete HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uni nstall\{2851123E-5786-41BE-A3F1-A9B21E499EEB} /f", 2, True : CheckError 'Run minimized and wait
wshShell.Run "reg.exe delete HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uni nstall\{92F2A534-C3E4-4B18-BEBD-329F5E848C8B} /f", 2, True : CheckError 'Run minimized and wait
'Recreate and reconfigure Altiris Agent from the command line
strMessage = " 080: Recreate and reconfigure Altiris Agent from the command line using the following command:"
objFile.Writeline strMessage : CheckError
strMessage = " wshShell.Run 'c:\windows\temp\aexnsc.exe -a -s ns=migrationsrv.altiris.lab NOSTARTMENU NOTRAYICON /ADDREMOVE /s', 2, True"
objFile.Writeline strMessage : CheckError
wshShell.Run "c:\windows\temp\aexnsc.exe -a -s ns=migrationsrv.altiris.lab NOSTARTMENU NOTRAYICON /ADDREMOVE /s", 2, True : CheckError 'Run minimized and wait
'Delete 3 Altiris files from c:\windows\temp folder, if necessary
strMessage = " 087: Delete 3 Altiris files from c:\windows\temp folder, if necessary."
objFile.Writeline strMessage : CheckError
if (objFso.FileExists("c:\windows\temp\AexAgentUtil.e xe")) then
objFso.DeleteFile("c:\windows\temp\AeXAgentUtil.ex e") : CheckError
end if
if (objFso.FileExists("c:\windows\temp\AeXNSC.exe")) then
objFso.DeleteFile("c:\windows\temp\AeXNSC.exe") : CheckError
end if
if (objFso.FileExists("c:\windows\temp\ScrubScript.vb s")) then
objFso.DeleteFile("c:\windows\temp\ScrubScript.vbs ") : CheckError
end if
'Finish meaningful ScrubScript execution:
strMessage = " 090: Finish meaningful ScrubScript execution."
objFile.Writeline strMessage : CheckError
dtmThisDay = Day(Now)
If (Len(dtmThisDay) = "1") Then dtmThisDay = "0" & dtmThisDay
dtmThisMonth = Month(Now)
If (Len(dtmThisMonth) = "1") Then dtmThisMonth = "0" & dtmThisMonth
dtmThisYear = Year(Now)
dtmThisHour = Hour(Now)
If (Len(dtmThisHour) = "1") Then dtmThisHour = "0" & dtmThisHour
dtmThisMinute = Minute(Now)
If (Len(dtmThisMinute) = "1") Then dtmThisMinute = "0" & dtmThisMinute
dtmThisSecond = Second(Now)
If (Len(dtmThisSecond) = "1") Then dtmThisSecond = "0" & dtmThisSecond
strFileDateTime = "--" & _
dtmThisYear & "-" & _
dtmThisMonth & "-" & _
dtmThisDay & "--" & _
dtmThisHour & "-" & _
dtmThisMinute & "-" & _
dtmThisSecond
'***End of Logging
objFile.Writeline " " : CheckError
strMessage = "END OF LOG: " & strComputerName & "--ScrubScript" & strFileDateTime & "."
objFile.Writeline strMessage : CheckError
objFile.Close
'Copy log to share on NS server:
'Create Server folder structure for holding logs for this script, if necessary:
If NOT (objFso.FolderExists(strLogCollectionShare & "ScriptLogs")) then _
Set objFolder = objFso.CreateFolder(strLogCollectionShare & "ScriptLogs")
If NOT (objFso.FolderExists(strLogCollectionShare & "ScriptLogs\ScrubScript")) then _
Set objFolder = objFso.CreateFolder(strLogCollectionShare & "ScriptLogs\ScrubScript")
strSource = strWindir & "AltirisTeamInfo-DoNotDelete" & "\ScriptLogs\ScrubScript\" & _
strFileName
strDestination = strLogCollectionShare & "ScriptLogs\ScrubScript\"
strCMD = "xcopy.exe " & strSource & " " & strDestination & " /V /Y /Q"
WshShell.Run strCMD, 2, True 'Run minimized and wait
'Delete folder structure for holding logs for this script:
If (objFso.FileExists(strWindir & "AltirisTeamInfo-DoNotDelete" & "\ScriptLogs\ScrubScript\" & _
"*.*")) then _
Set objFile = objFso.DeleteFile(strWindir & "AltirisTeamInfo-DoNotDelete" & "\ScriptLogs\ScrubScript\" & _
"*.*")
If (objFso.FolderExists(strWindir & "AltirisTeamInfo-DoNotDelete" & "\ScriptLogs\ScrubScript")) then _
Set objFolder = objFso.DeleteFolder(strWindir & "AltirisTeamInfo-DoNotDelete" & "\ScriptLogs\ScrubScript")
If (objFso.FolderExists(strWindir & "AltirisTeamInfo-DoNotDelete" & "\ScriptLogs")) then _
Set objFolder = objFso.DeleteFolder(strWindir & "AltirisTeamInfo-DoNotDelete" & "\ScriptLogs")
If (objFso.FolderExists(strWindir & "AltirisTeamInfo-DoNotDelete")) then _
Set objFolder = objFso.DeleteFolder(strWindir & "AltirisTeamInfo-DoNotDelete")
'Sleep for 30 seconds
Wscript.Sleep 30000
'Release objects
Set objFSO = Nothing
Set objFolder = Nothing
Set objFile = Nothing
Set WshShell = Nothing
Sub CheckError
Dim strMessage, strErrNumber, strErrDescription
If Err = 0 Then Exit Sub
strErrNumber = Hex(Err)
strErrDescription = " "
If strErrNumber = "8002009" Then strErrDescription = "Error Setting Default Printer"
If strErrNumber = "80020005" Then strErrDescription = "Type mismatch"
If strErrNumber = "800401E4" Then strErrDescription = "Syntax error"
If strErrNumber = "80040E14" Then strErrDescription = "One or more errors occurred during processing of command"
If strErrNumber = "80040E37" Then strErrDescription = "Table does not exist"
If strErrNumber = "80041001" Then strErrDescription = "Call Failed"
If strErrNumber = "80041010" Then strErrDescription = "Spelling mistake in a keyword"
If strErrNumber = "80041021" Then strErrDescription = "Syntax error in WMI winmgmts \\"
If strErrNumber = "80070002" Then strErrDescription = "File not found"
If strErrNumber = "80070005" Then strErrDescription = "Access denied"
If strErrNumber = "80070035" Then strErrDescription = "The network PATH cannot be found"
If strErrNumber = "80070043" Then strErrDescription = "The network NAME cannot be found"
If strErrNumber = "80070055" Then strErrDescription = "The local device name is already in use"
If strErrNumber = "8007007B" Then strErrDescription = "The filename, directory or volume is incorrect"
If strErrNumber = "800704B0" Then strErrDescription = "The specified device name is invalid"
If strErrNumber = "800704B2" Then strErrDescription = "An attempt was made to remember a device ......."
If strErrNumber = "800704B3" Then strErrDescription = "No network provider accepted the given network path"
If strErrNumber = "800704CA" Then strErrDescription = "This network connection does not exist"
If strErrNumber = "800704C3" Then strErrDescription = "Multiple Connections to a server or shared resource..."
If strErrNumber = "800704CF" Then strErrDescription = "The network location cannot be reached"
If strErrNumber = "8007052E" Then strErrDescription = "Logon Failure: unknown user name or bad password"
If strErrNumber = "80070709" Then strErrDescription = "The Printer name is invalid"
If strErrNumber = "80070961" Then strErrDescription = "This network connection has files open or requests pending"
If strErrNumber = "80071329" Then strErrDescription = "Object Already Exists"
If strErrNumber = "8007202B" Then strErrDescription = "A referral was returned from the server"
If strErrNumber = "80072030" Then strErrDescription = "There is no such object on the server"
If strErrNumber = "80072032" Then strErrDescription = "LDAP syntax error. Possibly a missing element e.g. cn="
If strErrNumber = "80072035" Then strErrDescription = "The server is unwilling to process the request"
If strErrNumber = "8007203A" Then strErrDescription = "The server is not operational"
WScript.echo "ERROR:"
WScript.echo Err.Number & " " & strErrNumber & "; " & strErrDescription
strMessage = "ERROR: " & Err.Number & " " & strErrNumber & "; " & strErrDescription
objFile.Writeline " "
objFile.Writeline strMessage
objFile.Writeline " "
Err.Clear
End Sub
__________________
Scire potentia est (knowledge is power)
Nick is offline   Reply With Quote
Old 01-28-2006, 08:14 PM   #6 (permalink)
 
dominique's Avatar
 
Status: Sticky...
Join Date: 03-04-2005
Location: Culver City, CA
Age: 53
Posts: 3,394


Nick,


Thanks I will test the script asap after my updates are done. it is a great script, I will adapt it.

no problem for the link only people who are doing nothing do not make mistake: "nothing done ... no mistake"

Thanks,
Dom
dominique is offline   Reply With Quote
Old 02-23-2009, 02:46 PM   #7 (permalink)
 
Status: Super Altiris Admin
Join Date: 03-06-2006
Location: Calgary Alberta Canada
Posts: 487


Not having much if any experience with VBS, is tehre a script I can just run that will remove all old NS agents and reg files without having to create this folder and that and change GUIDS and such?

I am having so many issues with old agents in an environment I am trying to replace.


Bill
Bill Sullivan is offline   Reply With Quote
Old 02-23-2009, 05:50 PM   #8 (permalink)
 
Status: Super Altiris Admin
Join Date: 10-28-2005
Location: Colorado
Posts: 1,364


Here's what I wrote. Make sure to change the UNC path to the AeXAgentUtil.

Code:
@echo off
Echo.
Echo Removing AClient . . .
Start /Wait "" "C:\program files\altiris\aclient\aclient.exe" /remove /silent 
DEL /s /q "C:\AClient.cfg"
DEL /s /q "C:\WINDOWS\system32\drivers\AlKernel.sys"
DEL /s /q "C:\WINDOWS\Temp\alsmb.exe"
RD /s /q "C:\Program files\Altiris\AClient\" 
REG DELETE HKLM\SYSTEM\CurrentControlSet\Services\AClient /f
REG DELETE HKLM\SYSTEM\CurrentControlSet\Enum\Root\LEGACY_ACLIENT /f
REG DELETE HKLM\SYSTEM\ControlSet001\Enum\Root\LEGACY_ACLIENT /f
REG DELETE HKLM\SYSTEM\ControlSet001\Services\AClient /f
REG DELETE HKLM\SYSTEM\ControlSet001\Services\SharedAccess\Parameters\FirewallPolicy\StandardProfile\AuthorizedApplications\List /f /v "C:\Program Files\Altiris\AClient\AClntUsr.EXE"
REG DELETE HKLM\SYSTEM\CurrentControlSet\Services\SharedAccess\Parameters\FirewallPolicy\StandardProfile\AuthorizedApplications\List /f /v "C:\Program Files\Altiris\AClient\AClntUsr.EXE"
Echo done.
Echo.
Echo Removing Altiris Agent . . .
\\server\altiris\AeXAgentUtil.exe /UninstallAgents
\\server\altiris\AeXAgentUtil.exe /Clean
DEL /q "C:\Program Files\Altiris\Altiris Agent"
reg delete "HKLM\Software\Altiris\Altiris Agent" /f /va
reg delete "HKLM\Software\Classes\AppID\{5E038245-CF81-44BE-8018-9A2981B9DC9B}" /f /va
Echo done.
:END
exit
__________________
Brandon
Brandon is online now   Reply With Quote
Old 02-23-2009, 06:00 PM   #9 (permalink)
 
Status: Super Altiris Admin
Join Date: 03-06-2006
Location: Calgary Alberta Canada
Posts: 487


ahh thats nice. I will try this out asap.

Thanks a bunch

Bill


Worked Great. Thanks a bunch for that
!!!!!!

Last edited by Bill Sullivan; 02-23-2009 at 06:28 PM..
Bill Sullivan 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 12:54 PM.


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