I wrote a script that does exactly what your trying to do, while I can't give you the script, I can tell you a bit about how I get my variables, we have both SEP 11 and SEP 12 machines as well as 32/64 and XP thru Server 2008 R2, so it's similar to your environment.
If the OS is X86 then I read the following registry keys to get the path to the HomeDirectory and what Product Version I'm working with:
("HKEY_LOCAL_MACHINE\SOFTWARE\Symantec\Symantec Endpoint Protection\AV", "Home Directory")
("HKEY_LOCAL_MACHINE\SOFTWARE\Symantec\Symantec Endpoint Protection\SMC", "ProductVersion")
if OS is X64 then read these keys into variables:
("HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Symantec\Symantec Endpoint Protection\AV", "Home Directory")
("HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Symantec\Symantec Endpoint Protection\SMC", "ProductVersion")
To find the Sylink file, I use this:
If $ProductVersion < "12.0.0000.000" Then
$PathToSylink = $HomeDirectory
ElseIf $ProductVersion > "12.0.0000.000" Then
$PathToSylink = "%AllUsersProfile%\Symantec\Symantec Endpoint Protection\CurrentVersion\Data\Config"
Endif
Along with the great information you've received from the all posts above, it appears that you should have enough to get you going.
As a side note, if tamper protection is enabled, you will probably need to incorporate the Sylink Drop utility into your script.
Good luck and if your script is not proprietary, you may consider posting it here so that we can see the work you have already done and can offer suggestions for filling in any gaps.
-Mike