• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 226
  • Last Modified:

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


0
gokhanoz
Asked:
gokhanoz
  • 3
1 Solution
 
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
 
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

Featured Post

Nothing ever in the clear!

This technical paper will help you implement VMware’s VM encryption as well as implement Veeam encryption which together will achieve the nothing ever in the clear goal. If a bad guy steals VMs, backups or traffic they get nothing.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now