SEP – agent upgrade script

SEP agent upgrade can be a real pain, mainly because of the double reboot requirement. In production you can do it only during the maintenance windows, meaning at night. Scripting is your best friend in this case, unless off course you are a night person πŸ™‚

My environment is a mix of Windows 2003 and 2008, therefore VBScript is still the best choice to ensure interoperability. Script is needed to uninstall existing SEP11 version. Reboots and installation of the new version can be executed with no script, just usual Windows tools. All you need to do is copy required files and run these commands in the command line:

at 03:00 C:\Software\sep11uninstall.vbs
at 03:15 shutdown.exe -r -f -c "Planned restart to complete SEP11 uninstall" -t 10
at 03:35 C:\Software\setup.exe
at 03:50 shutdown.exe -r -f -c "Planned restart after SEP12 is installed" -t 10


Here I have:

Let’s talk aboutΒ the sep11uninstall.vbs script – sep11uninstall
[Sorry, I couldn’t attach vbs extension, therefore made a doc file, so please copy paste it to a text file and change extension to .vbs].

Script was originally created by David Gardner. Thank you David πŸ™‚ I just made several improvements.

Line 18: creates a log file on the C drive, useful track what was going on.
Line 29: automatic SEP uninstallation command.
Lines 36-43: manual SEP uninstallation commands.

	IDs(0) = "c:\windows\system32\msiexec.exe /x{73CA0462-DD49-495D-A6E5-AC4CF6F5FAC1} /quiet /norestart"
	IDs(1) = "c:\windows\system32\msiexec.exe /x{E8B5E073-4FB3-4976-B4A8-0DF3CE91E744} /quiet /norestart"
	IDs(2) = "c:\windows\system32\msiexec.exe /x{76B2BC31-2D96-4170-9C44-09E13B5555F3} /quiet /norestart"
	IDs(3) = "c:\windows\system32\msiexec.exe /x{3BAB4914-9CC1-4CC2-A3DA-56EF62DFD373} /quiet /norestart"
	IDs(4) = "c:\windows\system32\msiexec.exe /x{C1B0BDC8-0624-4036-90D1-F7DF0EE8C96D} /quiet /norestart"
	IDs(5) = "c:\windows\system32\msiexec.exe /x{FF9F3663-0357-4132-AD8C-2BC1397D88AF} /quiet /norestart"
	IDs(6) = "c:\windows\system32\msiexec.exe /x{2EFCC193-D915-4CCB-9201-31773A27BC06} /quiet /norestart"
	IDs(7) = "c:\windows\system32\msiexec.exe /x{530992D4-DDBA-4F68-8B0D-FF50AC57531B} /quiet /norestart"

they are needed to ensure that all possible versions are uninstalled even if the line 29 was not successful. We need to clean the system completely. For example sometimes I was able to find several versions being installed together πŸ™‚
In general I was really surprised finding how many different SEP11 versions exist in our environment. And I can’t guarantee that the list is full πŸ™‚
 
Few words about at command – this is a built in scheduler, very simple and nice utility. Each line has execution time assigned, in my case at around 3AM. I do an assumption there that uninstall and install procedures can not take more then 15 minutes. Surely you should change times according to your needs.

That’s it. Any questions, let me know πŸ™‚

Advertisements

Leave a Comment here

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s