Re: Script to Copy Files from a Share to a Client Not Working
From: Louis Lokuta (anonymous_at_discussions.microsoft.com)
Date: 10/13/04
- Next message: Jerold Schulman: "Re: HOWTO? Write a script which automatically adds user account to distribution group"
- Previous message: Anony: "Re: Communication ports for workstation to join Domain"
- In reply to: ptwilliams: "Re: Script to Copy Files from a Share to a Client Not Working"
- Next in thread: ptwilliams: "Re: Script to Copy Files from a Share to a Client Not Working"
- Reply: ptwilliams: "Re: Script to Copy Files from a Share to a Client Not Working"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 13 Oct 2004 08:03:51 -0700
Paul,
Thanks again. I have the permissions applied now, so that
worked great. The script is in place and is executing as
well, but I'm still having a script error when the actual
copy attempts to take place.
I get two different messages: either permission denied
or path not found. Permission denied is bogus, because I
have the rights and if I copy the file from a disk or
flash drive to the local drive, it works fine.
Path not found is bogus too, because the path is there.
The copy is instructing the file located on a SERVER to
be copied to a client, but now I've noticed the WSH
script I found in the MSDN collection seems to only
indicate that it works for local file coping (not from
server).
Is this true?? How can I copy it from the network to the
client?
Here is my code:
Dim FSO
Set FSO = CreateObject("Scripting.FileSystemObject")
FSO.CopyFile "\\CALLISTO\VOL1\Public\make32vs.bat", "%
systemdrive%\Program Files\Masm"
Is there a problem in the share name? Server name? Syntax?
Should I be using UNC conventions to access the source
file on the server, or the mapped drive letter?
Louis
>-----Original Message-----
>No problem Louis!!!
>
>Navigate to:
>
>\GPO\Computer Configuration\ Windows Settings\ Security
Settings\ File
>System
>
>Right-click and choose Add file...
>
>In here, add the path to the folder that you want to set
the permissions on
>and then grant the permissions in the following dialog.
>
>
>
>* Note. If you can, use system variables, e.g. %
SYSTEMROOT%, etc.
>
>--
>
>Paul Williams
>
>http://www.msresource.net
>http://forums.msresource.net
>______________________________________
>"Louis Lokuta" <anonymous@discussions.microsoft.com>
wrote in message
>news:3dde01c4b011$d7679940$a401280a@phx.gbl...
>Paul,
>
>Thank you so much for the reply. I didn't know about the
>File System GPO attribute. Unfortunately, I'm not
familiar
>with it. Can you give me a quick run down on how to
>configure this folder permission?
>
>
>
>>-----Original Message-----
>>The script will run in user-context (that's using the
>credentials of the
>>user logging on) if it's a logon/logoff script.
>>
>>The script will run as SYSTEM if it's a startup/shutdown
>script.
>>
>>You'll need a logon script, so will need to either copy
>the file elsewhere
>>(probably not suitable for your solution) or set the
>permissions on the
>>folder that you wish to write this file to. If you
>require the latter, use
>>the File System section of a GPO to set the appropriate
>permissions on that
>>folder.
>>
>>--
>>
>>Paul Williams
>>
>>http://www.msresource.net
>>http://forums.msresource.net
>>______________________________________
>><anonymous@discussions.microsoft.com> wrote in message
>>news:2af701c4ad43$c0fe6c90$a601280a@phx.gbl...
>>Hello,
>>
>>I'm attempting to write a VB login script for
>>distribution in a GPO to take a file off of a shared
>>network drive, and copy it to a directory on the client.
>>
>>I'm using the following code that I found in the MSDN
>>collection:
>>
>>Dim FSO
>>Set FSO = CreateObject("Scripting.FileSystemObject")
>>FSO.CopyFile "K:\Public\make32vs.bat", "c:\Program
>>Files\Masm"
>>
>>When the script runs, I get an error on line #3, the
part
>>where the copy starts. It says 'permission denied'. The
>>script is setup to run when a user (who is a member of
>>the Users) group logs in. They do not have write
>>permission to the C:\Program Files folder, so I'm
>>assuming this is the cause of the problem. However, I
was
>>told that when scripts are distributed in a GPO, that
the
>>run under the "SYSTEM" account which has full
permissions
>>to everything. Is this wrong? How can I make this script
>>work?
>>
>>Also, the file that is being copied already exists on
the
>>local machine; I want to overwrite it. Will it get
>>overwritten when the copy takes place, or do I have to
>>put in another line in the code to take care of that?
>>
>>Please help!!!
>>Thanks in Advance,
>>Louis
>>
>>
>>.
>>
>
>
>.
>
- Next message: Jerold Schulman: "Re: HOWTO? Write a script which automatically adds user account to distribution group"
- Previous message: Anony: "Re: Communication ports for workstation to join Domain"
- In reply to: ptwilliams: "Re: Script to Copy Files from a Share to a Client Not Working"
- Next in thread: ptwilliams: "Re: Script to Copy Files from a Share to a Client Not Working"
- Reply: ptwilliams: "Re: Script to Copy Files from a Share to a Client Not Working"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|