Re: Script to Copy Files from a Share to a Client Not Working

From: ptwilliams (ptw2001_at_hotmail.com)
Date: 10/13/04


Date: Wed, 13 Oct 2004 18:37:08 +0100

I'm very new to scripting, so I may be mistaken, but I believe that you are
instantiating a 'local' object there; which will probably not allow you to
copy from the network -if you've read this elsewhere, then go with that (I'm
just surmising based on what you've told me).

However, a mapped drive ought to sort it :)

-- 
Paul Williams
http://www.msresource.net
http://forums.msresource.net
______________________________________
"Louis Lokuta" <anonymous@discussions.microsoft.com> wrote in message 
news:052a01c4b135$d9d3b590$a401280a@phx.gbl...
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
>>
>>
>>.
>>
>
>
>.
> 


Relevant Pages

  • Re: "Recovered Files" Always in Trash
    ... What the script did was to set the permissions correctly on your invisible ... Temporary Items folder. ... Thanks for the advice and the script. ...
    (microsoft.public.mac.office.word)
  • Problem Creating HomeDirectories and Permissions using VBScript
    ... and assigning permissions to it in a VBScript script. ... it creates the setting for the folder inside the ...
    (microsoft.public.win2000.active_directory)
  • Re: Logon Script Elevated Privileges
    ... script within the GPO if you want, such as selecting from between user ... I'm using XCacls.vbs to create the permissions structure. ... > the root folder to create the folder, ... >> of a GPO using elevated privileges. ...
    (microsoft.public.windows.group_policy)
  • Re: Deny _WRITE_ access to a file
    ... > trying to talk about was a STARTUP script (if I'm not mistaken, ... > script runs as BUILTIN\SYSTEM). ... If it is possible to script a permissions change such that the ... folder remains read/write for everyone except for the restricted group who ...
    (microsoft.public.windows.server.security)
  • Re: Deny _WRITE_ access to a file
    ... > trying to talk about was a STARTUP script (if I'm not mistaken, ... > script runs as BUILTIN\SYSTEM). ... If it is possible to script a permissions change such that the ... folder remains read/write for everyone except for the restricted group who ...
    (microsoft.public.security)