We help IT Professionals succeed at work.

Script

gokhanoz
gokhanoz asked
on
Medium Priority
238 Views
Last Modified: 2010-04-18
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


Comment
Watch Question

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

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts

Author

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?
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.
Thanks for the quick points!  Happy to help.
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.