I'm new to the game and I finished with symantecs help a batch file that uninstalled and reinstalled symantec corprate editoin 9.0. Now before i deploy this I want the batch file to look for the 9.0 version so I don't get caught in a loop. Because after I run my script it has to restart. Does anyone know what registry keys to look for and how I should type it into my script so it will look for the version I want install and if its installed leave it alone and if its not run the program???[X(]

Thank you
Evan Reeves
0 Comments   [ + ] Show Comments

Comments

Please log in to comment

Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.

Answers

0
hi evpcb
what script are you using? vbscript? for batch you have to can use the reg command and query the registry key for SAV9 which is
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{848AC794-8B81-440A-81AE-6474337DB527}\DisplayName="Symantec AntiVirus"

if you could put in detail what you want to do i may scrap up a vbsript for you to:
check if sav 9 is installed
uninstall if version not matched and install the correct version
suppress the reboot and instead shows a msg prompting users they need to restart

is this what you wanted to do?

regards
rick =)
Answered 04/19/2005 by: rikx2
Purple Belt

Please log in to comment
0
if its the version you want to check here it is
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{848AC794-8B81-440A-81AE-6474337DB527}\DisplayVersion="9.0.110"
Answered 04/19/2005 by: rikx2
Purple Belt

Please log in to comment
0
I'm not sure of the script we have but how would i put that registry key into my .bat file. How can I get it to look for the version i have and if installed have the batch file cancel the uninstall. Thanks for your help so far
Answered 04/20/2005 by: evpcb
Senior Yellow Belt

Please log in to comment
0
also the version is 9.0.3.1000
Answered 04/20/2005 by: evpcb
Senior Yellow Belt

Please log in to comment
0
we use vbscripting
Answered 04/20/2005 by: evpcb
Senior Yellow Belt

Please log in to comment
0
Ok I came to a bump in the road all the 9.0.0.0 versions have the same registry key but the display version is listed if you could point me in the right direction it would be apperciated. Thanks for your help so far.
Answered 04/20/2005 by: evpcb
Senior Yellow Belt

Please log in to comment
0
hi

try this one =)

sRegKey = "HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall\{0EFC6259-3AD8-4CD2-BC57-D4937AF5CC0E}" 'replace with correct UID for yiou correct version of SAV
sRegValue = sRegKey & "\DisplayVersion"
NewVersion = "9.0.0.0" ' replace with your correct version on SAV

MsgBox "Your Current Version of AntiVirus is" & vbnewline & vbnewline & (RegValueExists(sRegValue))

If NewVersion <> (RegValueExists(sRegValue)) Then
MsgBox "Your have the wrong version of Antivirus!"
' place command here if wrong version is found on workstation
Else
MsgBox "You have the correct version of AntiVirus!"
' place command here if correct version is found on workstation
End If


Function RegValueExists(sRegValue)
' Returns True or False based of the existence of a registry value.
Dim oShell, RegReadReturn
Set oShell = CreateObject("WScript.Shell")
RegValueExists = True ' init value
On Error Resume Next
RegReadReturn = oShell.RegRead(sRegValue)
If Err.Number <> 0 Then
RegValueExists = False
Else
RegValueExists = RegReadReturn
End If
On Error Goto 0
End Function


happy coding =)
rick
Answered 04/20/2005 by: rikx2
Purple Belt

Please log in to comment
0
i keep getting an sregkey not recognized error
Answered 04/20/2005 by: evpcb
Senior Yellow Belt

Please log in to comment
0
hi.. can you post the actual error and in what line.. also post the code you edited..
Answered 04/20/2005 by: rikx2
Purple Belt

Please log in to comment
0
'sRegKey' is not recognized as an internal or external command,
operable program or batch file.
'sRegValue' is not recognized as an internal or external command,
operable program or batch file.
'"\DisplayVersion"' is not recognized as an internal or external command,
operable program or batch file.
'NewVersion' is not recognized as an internal or external command,
operable program or batch file.
) was unexpected at this time.
Answered 04/20/2005 by: evpcb
Senior Yellow Belt

Please log in to comment
0
hi evpcb,

you pasted it on your batch file? this one is a vbscipt code.. try saving it with a .vbs / .v4s extension along with your changes..

regards
rick
Answered 04/20/2005 by: rikx2
Purple Belt

Please log in to comment
0
i'm getting a syntax error
Answered 04/22/2005 by: evpcb
Senior Yellow Belt

Please log in to comment
Answer this question or Comment on this question for clarity