Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Permission Denied on file copy

Status
Not open for further replies.

lance59

IS-IT--Management
Mar 6, 2007
50
0
0
US
We are trying to copy the new GRC.dat file to all our machines to update the Managed Server to the new server and to make sure all computers are managed. We are doing this through Group Policy Startup Scripts. We get "Permission Denied" on this:

oFSO.CopyFile strSourceFile, strDestination, OverwriteExisting

Any help will be appreciated.

<job id="main">
<script language="VBScript">

WScript.Echo "VBScript"

Set oFSO = CreateObject("Scripting.FileSystemObject")

CopyGRC

Wscript.Echo "Done"

'********************************************************************************************************************************************
'Copy GRC.dat to the Target Machine

Function CopyGRC


Const OverwriteExisting = True
Set oFSO = CreateObject("Scripting.FileSystemObject")
Set objShell = WScript.CreateObject("WScript.Shell")
strSourceFile = "\\ufadata\shared\scriptfiles\GRC.DAT"
strDestination = objShell.ExpandEnvironmentStrings("%ALLUSERSPROFILE%") & "\" & "Application Data\Symantec\Symantec AntiVirus Corporate Edition\7.5\"
oFSO.CopyFile strSourceFile, strDestination, OverwriteExisting
Wscript.Echo "GRC.DAT is copied over"
End Function
'**********************************************************************************************************************************************

</script>
</job>
 
Thanks, but no help as we are trying to do this with a startup script. We don't want to have to manually do this to all 400 plus computers.

Also we are doing this under computer startup scripts rather than user startup scripts so it is running as Local System Account rather than the users account.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top