Posted on 2006-03-20
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

Question by:gokhanoz
    LVL 23

    Accepted Solution

    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

    Author Comment

    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?
    LVL 23

    Expert Comment

    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.
    LVL 23

    Expert Comment

    Thanks for the quick points!  Happy to help.

    Featured Post

    6 Surprising Benefits of Threat Intelligence

    All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

    Join & Write a Comment

    I guess it is not common knowledge to most Wintel engineers/administrators: If you have an SNMP-based monitoring system in your environment (and it's common to have SNMP or Syslog) it's reasonably easy to enable monitoring of the Windows Event logs,…
    This may not be a text book method to resolve VSS backup issues but it seemed to have worked on few of the Windows 2003 servers we had issues while performing a Volume Shadow Copy backup. If you have issues while performing a shadow copy backup usin…
    It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
    In this sixth video of the Xpdf series, we discuss and demonstrate the PDFtoPNG utility, which converts a multi-page PDF file to separate color, grayscale, or monochrome PNG files, creating one PNG file for each page in the PDF. It does this via a c…

    734 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    20 Experts available now in Live!

    Get 1:1 Help Now