Using logon script to copy file to logged on user's My documents folder\subdirectory
Posted on 2008-10-11
With group policy on win2003 AD, I need a batch file to copy files with
a user logon script. I need to copy the *same* file to two places when the user logs on to the PC
The \\server has full read for everyone, so permissions on server share is not an issue
First snippet copies the file to C:\windows and sets full access for all
(this part of the batch runs fine)
copy \\server\share\file.txt C:\windows\file.txt
cacls \windows\file.txt /t /c /g everyone:f
Next I need to copy the file to a subdirectory in the currently logged on user;s My documents folder
WHen this part of the batch file runs, it stops with "Access denied"
copy \\server\share\file.txt %homepath%\my documents\directory
Since the logged on user has full rights to my documents, I'm not sure why access would be denied.
tried %userprofile% too, same results..