Script

Hi. My aim is to copy the specific file to the specific users desktops from WIN2003 Standart Edition (operating as domain controller)to XP desktops.

Like this:

Suppose that I have client in my domain whose computer name is account1 and operators user name is op1.
The file path which client must get the file from the server is \\mainserver\c\%clients_user_name%\application1.exe

%clients_user_name% is the point which I'm missing here.

I think the script must like that;

copy \\mainserver\c\%clients_user_name%\application1.exe c:\application1.exe

and upon exit another script should delete the file from the clients computer.

I know that I have to add that script into the user configuration > windows settings > scripts > log_on

Thanks in advance


gokhanozAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

TheCleanerCommented:
the variable is %username%

but you'll need to create a share on the mainserver called something and give them rights to read that share, as well as create username folders in that share with the application1.exe, then the syntax would be:

copy \\mainserver\SHARENAME\%username%\application1.exe

so a user called jsmith would login and it would run:

copy \\mainserver\SHARENAME\jsmith\application1.exe c:\application1.exe
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
gokhanozAuthor Commented:
Ok thanks for your reply. If I run this script from the clients computer, It's working well but It's not working as the group policy login script. Why? Is it because of the policy setting?
0
TheCleanerCommented:
The script should work if it's in the User Config login script section.  Did you add it correctly?  Putting a script in place is a little tricky in GP.

Basically (the way I do it, cause it always works):

1.  go to the log on scripts section of the GPO and double click on logon
2.  Click Show Files, then Drag/drop the batch file/script into that location from wherever it is at
3.  Close that window, then Click ADD
4.  Click Browse, then just double click that script you just put in the directory

That's it.
0
TheCleanerCommented:
Thanks for the quick points!  Happy to help.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Windows Server 2003

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.