MePHiTiC Posted February 8, 2007 Share Posted February 8, 2007 I'm updating Symantec AV on a bunch of workstations. Currently the version range from 8 to 10.1. I found the following script on the forum and made a few adjustments to it; However I still have a s couple of questions. $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 _InstallSAV() ElseIf StringLeft($iVersion, 1) = "8" Then $ProdCode = "{848AC794-8B81-440A-81AE-6474337DB527}" ElseIf StringLeft($iVersion, 1) = "9" Then $ProdCode = "{848AC794-8B81-440A-81AE-6474337DB527}" ElseIf StringLeft($iVersion, 4) = "10.0" Then $ProdCode = "{5A633ED0-E5D7-4D65-AB8D-53ED43510284}" ElseIf StringLeft($iVersion, 4) = "10.1" Then EndIf Else _UninstallSAV() EndIf Else _InstallSAV() EndIf Func _UninstallSAV() @SystemDir & "\msiexec.exe /q /x " & $ProdCode EndFunc ;==>_UninstallSAV Func _InstallSAV() Run("CALL msiexec.exe /qr /i " & "\\192.168.1.1\data source$\software\norton antivirus corporate edition v.10.1\sav\Symantec AntiVirus.msi" & "NETWORKTYPE=1 SERVERNAME=" & $SRVNAME, @WorkingDir, @SW_HIDE) EndFunc ;==>_InstallSAV Basically the script checks for a version number then sets a product code based off of that version. My question is on the If $iVersion = "0.0.0.0" ... Should I have _InstallSAV() to install the new version and if so with the InstallSAV() further down in the script will it be installed twice? Last thing is for ElseIf StringLeft($iVersion, 4) = "10.1" ... If this is true then I don't want to uninstall or install ... How do I move on to the reset of the script? Is an EndIf the right thing to do? Thanks! MePH Link to comment Share on other sites More sharing options...
Moderators big_daddy Posted February 8, 2007 Moderators Share Posted February 8, 2007 Why not use the Client Remote Install feature in the System Center Console? Link to comment Share on other sites More sharing options...
MePHiTiC Posted February 8, 2007 Author Share Posted February 8, 2007 Why not use the Client Remote Install feature in the System Center Console?I'm also doing a bunch of other updates and tweaks ... This AV part was only a small part of that.MePH Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now