Hello Butter and welcome to the board.

In general you should never hard code any paths unless you have no other way to get around it.

I would not recommend setting up Symantec NAV Servers on Domain Controllers, but hey if you're strapped for cash or resources I guess you have to do what you can.

Here is an example script that should allow you to copy the correct GRC to the correct client type regardless of the version being 7.x, 8.x, 9.x however the script ( DOES NOT SUPPORT Windows 9x )

You can review this code and modify for Windows 9x or see what is going on and modify your code to something similar.

Also note that users MUST have local admin rights in order to copy the GRC.DAT file with this method during logon, or you would need to modify the ACL on that folder to allow non Admins to copy files there which is a much more difficult task.

This script can also function as an Admin script to allow you to select a remote client and push a GRC.DAT file to them.
 
Code:
Break On

Dim $SO
$SO=SetOption('Explicit','On')
$SO=SetOption('NoVarsInStrings','On')
 
SetNAVParent()
 
Function SetNAVParent(optional $System)
Dim $_,$Remote,$AVKey,$HKLMSMWCV,$ReadClientType,$NavParent,$CP,$SP,$OSVer,$CommonAppData,$WinDir,$DestPath
Dim $ClientParent,$DomainCheck,$HKLMSMWNTCV,$Server,$Source
If $System <> ""
$Remote = $System
$Remote = Join(Split($Remote, '\'), '', 3)
$Remote = IIf($Remote <> '', '\\' + $Remote + '\', $Remote)
Else
$Remote = ""
EndIf
$HKLMSMWCV = 'HKLM\Software\Microsoft\Windows\CurrentVersion'
$HKLMSMWNTCV = 'HKLM\Software\Microsoft\Windows NT\CurrentVersion'
$AVKey = 'HKLM\SOFTWARE\Intel\LANDesk\VirusProtect6\CurrentVersion'
$CommonAppData = ReadValue($Remote+$HKLMSMWCV + '\Explorer\Shell Folders','Common AppData')
$ReadClientType = ReadValue($Remote+$AVKey,'ClientType')
If $ReadClientType = 4 Exit 10 EndIf
$NavParent = ReadValue($Remote + $AVKey,'Parent')
$OSVer = ReadValue($Remote + $HKLMSMWNTCV, 'CurrentVersion')
$WinDir = ReadValue($Remote + $HKLMSMWNTCV,'SystemRoot')
$DomainCheck = ReadValue($Remote + $HKLMSMWNTCV + '\Winlogon','DefaultDomainName')
$Server = ReadValue($Remote + 'HKLM\SYSTEM\CurrentControlSet\Control\ProductOptions', 'ProductType')
If $Server<>'WinNT'
$CP = 'name of Nav Parent for Servers'
Else
Select
Case $DomainCheck = 'DOMAIN1'
$CP = 'name of Nav Parent for Clients in DOMAIN1'
Case $DomainCheck = 'DOMAIN2'
$CP = 'name of Nav Parent for Clients in DOMAIN2'
Case $DomainCheck = 'DOMAIN3'
$CP = 'name of Nav Parent for Clients in DOMAIN3'
Case 1
$CP = 'name of Nav Parent for Clients in DOMAINx'
EndSelect
EndIf
If InStr($Remote,'\\')
$CommonAppData = $Remote+SubStr($WinDir,1,1)+ '$' + Right($CommonAppData,-2)
$WinDir = $Remote+SubStr($WinDir,1,1)+ '$' + Right($WinDir,-2)
EndIf
If $OSVer = '4.0'
$DestPath = $WinDir+'\Profiles\All Users\Application Data\Symantec\Norton AntiVirus Corporate Edition\7.5'
Else
$DestPath = $CommonAppData+'\Symantec\Norton AntiVirus Corporate Edition\7.5'
EndIf
Select
Case $ReadClientType = 1 $ClientParent = $CP
Case $ReadClientType = 2 $ClientParent = $CP
Case $ReadClientType = 4 Exit 10
EndSelect
$Source = '\\' + $CP + '\VPHOME\GRC.DAT'
Copy $Source $DestPath
EndFunction


 
The following keys control the Client vs Server relationship

HKEY_LOCAL_MACHINE\SOFTWARE\INTEL\LANDesk\VirusProtect6\CurrentVersion\ClientType

1 = Connected Client
2 = Stand-alone Client
4 = Server

If it is a Server, then look under the following key:

HKEY_LOCAL_MACHINE\SOFTWARE\INTEL\LANDesk\VirusProtect6\CurrentVersion\Parent

If it is blank, then it is a Primary Server