#25713 - 2002-07-23 08:56 PM
Re: ReadValue problems
|
NTDOC
Administrator
   
Registered: 2000-07-28
Posts: 11631
Loc: CA
|
Jens and Les,
WRONG you are...
Generally speaking that folder area is not accessable for Everyone, but the last folder 7.5 has EVERYONE FULL rights by design from Symantec.
Here is some sample code for ideas as well.
code:
; *** File Name: NAVPARNT.KIX *** v1.6 ; *** Date Created: 09-19-2001 1:06 am PST - By Ron Lewis ; *** Comments: Reassigns the NAV Parent Server based on IP Address ; *** NOTE: Code may need to be modified to include actions when valid IP is not known.
; *** Variables *** $crlf = chr(13)+chr(10) ;chr(13) is a Carriage Return and chr(10) is a line feed $NavHomeDir = READVALUE("HKEY_LOCAL_MACHINE\SOFTWARE\INTEL\LANDesk\VirusProtect6\CurrentVersion","Home Directory") $DataLocation = READVALUE("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders", "Common AppData") $PARENT = READVALUE("HKEY_LOCAL_MACHINE\SOFTWARE\Intel\LANDesk\VirusProtect6\CurrentVersion","Parent") $NoNavWarn = EXISTKEY("HKEY_LOCAL_MACHINE\SOFTWARE\INTEL\LANDesk\VirusProtect6\CurrentVersion\Quarantine") $CleanGRCx = 'attrib -r "$NavHomeDir\GRC.DAT"' $CleanGRCy = 'attrib -r "$DataLocation\Symantec\Norton AntiVirus Corporate Edition\7.5\GRC.DAT"'
IF @INWIN = 1 $SRVR = ReadValue("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\ProductOptions", "ProductType") IF $SRVR<>"WinNT" ; System is not a Workstation so assume it is a Server RETURN ENDIF ENDIF IF $NoNavWarn <> 0 $nul = MESSAGEBOX("Unable to locate the Norton AntiVirus program on this system. Please contact the Helpdesk to have the program installed or checked for problems with a previous installation.", "Norton AntiVirus Program Update", 16) GOTO END ENDIF
IF EXIST($NavHomeDir+"\GRC.DAT") SHELL $CleanGRCx DEL ($NavHomeDir+"\GRC.DAT") ENDIF IF EXIST("$DataLocation\Symantec\Norton AntiVirus Corporate Edition\7.5\GRC.DAT") SHELL $CleanGRCy DEL ("$DataLocation\Symantec\Norton AntiVirus Corporate Edition\7.5\GRC.DAT") ENDIF
SELECT CASE (SUBSTR(@IPADDRESS0,1,11)) = "122.100.243" AND $PARENT = "SERVER01" GOTO END CASE (SUBSTR(@IPADDRESS0,1,11)) = "123. 26.110" AND $PARENT = "SERVER02" GOTO END ; ETC.... ENDSELECT
SELECT CASE (SUBSTR(@IPADDRESS0,1,11)) = "122.100.243" $NavParent = "SERVER01" CASE (SUBSTR(@IPADDRESS0,1,11)) = "123. 26.110" $NavParent = "SERVER02" ; CASE ETC.... CASE 1 $NavParent = "SERVER01" ENDSELECT $GrcUpdateNew = '%comspec% /c copy "\\$NavParent\vphome\grc.dat" "$DataLocation\Symantec\Norton AntiVirus Corporate Edition\7.5\GRC.DAT" >nul' $GrcUpdateOld = '%comspec% /c copy "\\$NavParent\vphome\grc.dat" "$NavHomeDir" >nul'
IF @INWIN = 1 GOTO NTWIN ELSE GOTO WINX ENDIF GOTO END
:NTWIN IF (Exist($DataLocation+"\Symantec\Norton AntiVirus Corporate Edition\7.5\nul") = 1) $nul = MESSAGEBOX("Please wait... Norton AntiVirus Definitions are being updated on your system...", "Norton AntiVirus Program Update", 64, 10) SHELL $GrcUpdateNew SHELL '%comspec% /c NET STOP "Norton AntiVirus Client" >NUL' SHELL '%comspec% /c NET START "Norton AntiVirus Client" >NUL' GOTO END ELSE $nul = MESSAGEBOX("Please wait... Norton AntiVirus Definitions are being updated on your system...", "Norton AntiVirus Program Update", 64, 10) SHELL $GrcUpdateOld SHELL '%comspec% /c NET STOP "Norton AntiVirus Client" >NUL' SHELL '%comspec% /c NET START "Norton AntiVirus Client" >NUL' GOTO END ENDIF GOTO END
:WINX SHELL $GrcUpdateOld $nul = MESSAGEBOX("Notice: Norton AntiVirus Definitions were updated on your system. Please restart your computer to complete the Norton AntiVirus update once the logon script and any other applications have finished loading.", "Norton AntiVirus Program Update", 64) GOTO END
:END RETURN
|
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
0 registered
and 764 anonymous users online.
|
|
|