Deploying bat script from GPO for logonuser

AlvaPlayer 1 Reputation point
2021-12-22T08:33:13.293+00:00

Hi i have problem with deploying script via GPO. I made new Policy -> user configuration -> rules -> windows system settings -> scrypts -> startup -> add .
Script used:

md \192.168.1.10\F$\podpisy\%USERNAME%
robocopy \192.168.1.75\profileonline\%USERNAME%\AppData\Roaming\Microsoft\Signatures\ \192.168.1.10\F$\podpisy\%USERNAME%

It is working when i start it on local machine but don't want to work via GPO. It's main purpose is to create folder and copy all files from user (only user have acces to it) to another serwer and I want to deploy it to all users. Can somebody help me?

Windows for business | Windows Client for IT Pros | User experience | Other
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Limitless Technology 39,921 Reputation points
    2021-12-23T16:21:23.56+00:00

    Hi @AlvaPlayer

    The best trick to make this work has been explained in one of the threads.

    -Copy the .bat to a folder on the hard disk with a GPO.
    -Schedule an immediate task that executes that script only once and then deletes it.

    You can use the below threads to try the various steps discussed .

    Run .bat from GPO
    https://learn.microsoft.com/en-us/answers/questions/113038/run-bat-from-gpo.html

    Distribute a batch file by Group Policy management
    https://learn.microsoft.com/en-us/answers/questions/15333/distribute-a-bat-by-group-policy-management.html

    Hope this resolves your Query!!

    -----
    --If the reply is helpful, please Upvote and Accept it as an answer--


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.