#19919 - 2002-04-15 11:30 AM
Win2K copy command problem
|
Anonymous
Anonymous
Unregistered
|
Hi folks
I've got a problem with a very simple script I'm running with W2K - it works fine with Win98. The problem lies with the copy command - it just doesn't work! I'm using Kix2001 & W2K professional. Here's the problem part of the script:
:WIN2K copy "c:\test.dat" "C:\Documents and Settings\All Users\Application Data\Symantec\Norton AntiVirus Corporate Edition\7.5" IF EXIST ("C:\Documents and Settings\All Users\Application Data\Symantec\Norton AntiVirus Corporate Edition\7.5\test.dat") MessageBox("Your anti-virus software has been configured.","Norton AntiVirus 7.6 Configuration",64,10) else MessageBox("There has been a problem. Your anti-virus software has NOT been configured. Please report this fault to the person who supplied this package.","Norton AntiVirus 7.6 Configuration",48) endif goto end
I've tried different folders, different quotes, checked permissions with no joy at all...
Please help, boffins...
Gill
|
|
Top
|
|
|
|
#19920 - 2002-04-15 11:39 AM
Re: Win2K copy command problem
|
cellnet
Starting to like KiXtart
Registered: 2002-02-26
Posts: 115
Loc: Sweden
|
try to use %ALLUSERPROFILE% = C:\Documents and Settings\All Users\ or: $path="C:\Documents and Settings\All Users\Application Data\Symantec\Norton AntiVirus Corporate Edition\7.5\"
copy "c:\test.dat" "$path"
Not sure why, but It works
\erik
|
|
Top
|
|
|
|
#19921 - 2002-04-15 11:45 AM
Re: Win2K copy command problem
|
Anonymous
Anonymous
Unregistered
|
Thanks cellnet, That works fine now!! Gill
|
|
Top
|
|
|
|
#19923 - 2002-04-15 06:49 PM
Re: Win2K copy command problem
|
NTDOC
Administrator
   
Registered: 2000-07-28
Posts: 11634
Loc: Space
|
You should never assume a hard coded drive, whenever possible use a variable or read from the Registry. Remember, NT/2000/XP may not be installed on the C: drive, so hard coded entries to C: would fail. By default this location has EVERYONE FULL NTFS rights.
Here is another method of determing location.
code:
$DataLocation = READVALUE("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders", "Common AppData") $NavGRC = "$DataLocation\Symantec\Norton AntiVirus Corporate Edition\7.5\"
|
|
Top
|
|
|
|
#19927 - 2002-04-15 09:43 PM
Re: Win2K copy command problem
|
Anonymous
Anonymous
Unregistered
|
I've been using the following lines for 9x, NT/2k for the Norton GRC.DAT file
code:
If @inwin=1 If Exist ("C:\Documents and Settings\All Users\Application Data\Symantec\Norton AntiVirus Corporate Edition\7.5") Shell '%COMSPEC% /C XCOPY "\\BETHESDA\Apps$\NAV\GRC.DAT" "C:\Documents and Settings\All Users\Application Data\Symantec\Norton AntiVirus Corporate Edition\7.5" /D /H /I /R /Y > NUL' EndIf Else If Exist ("C:\Program Files\Norton AntiVirus\") Shell '%COMSPEC% /C XCOPY "\\BETHESDA\Apps$\NAV\GRC.DAT" "C:\Program Files\Norton AntiVirus\" /D /H /I /R /Y > NUL' EndIf EndIf
|
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
1 registered
(Allen)
and 1014 anonymous users online.
|
|
|