.bat to copy from network to logged in users program data isn't working. RRS feed

  • Question

  • The .bat works when I run it manually when logged in, but trying to set it to run as a GPO immediate task or even a task to run at logon isn't working.

    .bat is below

    @echo off
    xcopy /sy \\fs01\dept\Public\Java-Settings\* %systemdrive%\users\%username%\appdata\LocalLow\Sun\Java\Deployment\*

    Is it the variables that aren't allowing it to run at logon? Need those as the files being copied are setting site listings in java for a intranet web app and those are profile specific.

    • Moved by Bill_Stewart Sunday, December 16, 2018 10:33 PM Unanswerable
    Thursday, September 27, 2018 2:43 AM

All replies

  • Di you test this code before trying to use it?

    Please test the code.  Perhaps you have a typo.


    Thursday, September 27, 2018 4:02 AM
  • Yeah, it works. Running it manually will get it to grab the files from the server share and copy them to the local users appdata, it just doesnt work when used as a logon script or as a immediate task via gpo
    Thursday, September 27, 2018 4:11 AM
  • Perhaps GP is not working. 

    Note that logon scripts do not run immediately on newer versions of Windows.


    Thursday, September 27, 2018 4:15 AM
  • That might be it, I managed to get it to work with our third party app Desktop Authority finally using a round-about way.
    Thursday, September 27, 2018 5:09 AM