Sign in to follow this  
Followers 0
Hoot

Symantec V 10 Upgrade Process

6 posts in this topic

Hello,

I'm looking for an elusive script that has cost a few thousand Admins worldwide (or more!) a lot of pulled hair, screams of anguish , bitten knuckels and quite possibly some tears (in a quiet closet somewhere).

My story goes back to the time where one could install or upgrade a newer product seamlessly over another .... however when it comes to Symantec AV version 10 this is where the story abruptly stops.

Any admin whos gone down this road of pain is probably nodding his head knowingly right now - its called "The (non-working) Upgrade" Symantec Version 10 from legacy 7.6 clients.

My problem is a big one - I'm working in an enterprise environment where I need to script an unsupported tool from Symantec called "NoNAV" (this tool removes all traces of Symantec AV products from a machine)

I need to do the following:

1) Remove the existing older AV client using Symantecs NoNAV utility code here (http://www.mickelson.org/ files/ zips/ nonav.zip).

2) Prompt the users for a system restart message

3) Possibly upon restart continue with the upgrade process.

I'm not understating myself here when I say that if this could be solved using AutoIT then its some comprehensive serious exposure worldwide for this super app! (after all no-one else has managed a script for it yet!!)

I'm totally new to scripts and I'm looking for some solid expert advice (please! ) on this very cumbersome uninstall that I'm convinced can be done quite easily with AutoIT....problem is I dont know where to strt.

Appreciate any input

Hoot.

Share this post


Link to post
Share on other sites



The first part of your script should check to see if the computer is running an old version of symantec. So that this works everytime we should check the registry for the install path, then check the file version on DefWatch.exe.

So now that we know if we are running an older version or not. Now we need to uninstall the old version, so we turn to NoNav. So we don't interupt the users we need to configure the NoNav.bat file so there are no prompts and to keep it from rebooting.

The NoNav.bat options should look something like this:

@set REMOVE_SYMEVENT=0
@set REMOVE_LIVEUPDATE=0
@set REMOVE_DEFS=0
@set WARN_FIRST=0
@set REBOOT=0

So now we need to run NoNav.bat and wait for it to finish. After it is finished we start a timer for however long you are wanting to wait for it to prompt for the reboot. Before we reboot the computer we need to make sure and add our script to the runonce reg key that way it will run again. Then its as simple as installing the new version of symantec!

Share this post


Link to post
Share on other sites

Hi guys,

This is a very bad attempt at trying to get the first part of this script up and running...hoping some real experts will jump on board and guide me through?


;Check for Norton AntiVirus Corporate Edition
    UpdateProgress("Searching for legacy Norton AntiVirus Corporate Editions", "5")
    $UninstallString = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{BD12EB47-DBDF-11D3-BEEA-00A0CC272509}", "UninstallString")
    If $UninstallString == "MsiExec.exe /I{BD12EB47-DBDF-11D3-BEEA-00A0CC272509}" then
        $Version = "Norton AntiVirus Corporate Edition"
        UpdateProgress("Uninstalling " & $Version, "15")
        UninstallAntiVirus($UninstallString, $Version)
        $PreviousFound = 1
    EndIf
    
    If $PreviousFound == "0" then
        UpdateProgress(" ", "15")   
        MsgBox(4096, "Error", "No Norton AntiVirus Corporate Edition software detected on this computer.")
    EndIf
    Return
EndFunc
    ElseIf $Version == "Norton AntiVirus Corporate Edition" then
        RunWait("MsiExec.exe /q /X{BD12EB47-DBDF-11D3-BEEA-00A0CC272509} REMOVE=ALL REBOOT=ReallySuppress")
    EndIf
    Return
EndFunc

.... Error: "Else" statement with no matching "If" statement - what am I doing wrong??

Cheers.

Hoot


            
        

        
            
                

    
        
            
        
    


            
        

        
            
                
                
                
            
            
                
            
        
        
    

    
        
            Share this post
            
Link to post
            
            
            

            
                Share on other sites
                

    
        
            

    

        
            

    

        
            

    

        
            

    

        
    

            
        
    


    

                    
                
                    
                    
                    






    
    
        
Don N   

    
        
    
             0
    
        
    

        
            
                Polymath
            
            

            
                

    
        
    

            
            Active Members
            
            
                

    
        
    
             0
    
        
    

                216 posts
                
                

            
        
    
    
        


    

    
        
            
            
                
            
            
        

        
    #4 · 
            Posted 
            
            
            
        
    

    


            
        
            
.... Error: "Else" statement with no matching "If" statement - what am I doing wrong??
;Check for Norton AntiVirus Corporate Edition
    UpdateProgress("Searching for legacy Norton AntiVirus Corporate Editions", "5")
    $UninstallString = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{BD12EB47-DBDF-11D3-BEEA-00A0CC272509}", "UninstallString")
    If $UninstallString == "MsiExec.exe /I{BD12EB47-DBDF-11D3-BEEA-00A0CC272509}" then
        $Version = "Norton AntiVirus Corporate Edition"
        UpdateProgress("Uninstalling " & $Version, "15")
        UninstallAntiVirus($UninstallString, $Version)
        $PreviousFound = 1
    EndIf
    
    If $Version == "Norton AntiVirus Corporate Edition" then
        RunWait("MsiExec.exe /q /X{BD12EB47-DBDF-11D3-BEEA-00A0CC272509} REMOVE=ALL REBOOT=ReallySuppress")
    Else
        UpdateProgress(" ", "15")   
        MsgBox(4096, "Error", "No Norton AntiVirus Corporate Edition software detected on this computer.")
    EndIf
    Return
EndFunc

That should work, you had an if and an elseif with 2 endifs, also not sure if having the serial number posted is a good idea but w/e guess that doesnt really matter :)


_____________________________________________________"some people live for the rules, I live for exceptions"Wallpaper Changer - Easily Change Your Windows Wallpaper

Share this post


Link to post
Share on other sites

I was thinking something more along the lines of this:

$sPath = RegRead("HKLM\SOFTWARE\Symantec\InstalledApps", "NAVNT")

If FileExists($sPath & "DefWatch.exe") Then
    $iVersion = FileGetVersion($sPath & "DefWatch.exe")
    If $iVersion = "0.0.0.0" Then
        MsgBox(4096, "Error", "No version information is available for this file.")
    ElseIf StringLeft($iVersion, 2) = "10" Then
        MsgBox(4096, "", "This computer already has version 10 installed.")
    Else
        _UninstallSAV()
    EndIf
Else
    _InstallSAV()
EndIf

Func _UninstallSAV()
    MsgBox(4096, "Uninstall", "We decided to uninstall an old version.")
EndFunc  ;==>_UninstallSAV

Func _InstallSAV()
    MsgBox(4096, "Install", "We decided to install the new version.")
EndFunc  ;==>_InstallSAV

Share this post


Link to post
Share on other sites

Yeah thanks dude it works a lot neater than my script. Am I to assume that I'll pad it out to do the following ..

Func _UninstallSAV()

Call NoNAV to remove old client

EndFunc ;==>_UninstallSAV

Func _InstallSAV()

Call MsiExec to Install newer version.

EndFunc ;==>_InstallSAV

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0