Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Currently I have a logon.bat script that runs when users logon to a computer with their domain account. The problem is only users with the logon script specified in their profile (user's properties -> Profile -> Logon script) actually run the script. Needless to say, I forget to specify the logon and newly created users. How do I set it so that the scripts runs when ANY user logs on whether they have the script specified or not?

share|improve this question
Are you trying to run that script only if they login on to a particular PC, or any PC? – Usta Jun 8 '12 at 21:06

It would probably be better to set it through group policy as a logon script in the user section of the GPO. You can set it at the domain level so everyone within the domain no matter what gets it.

share|improve this answer
Using GPO is the way to go. It is the preferred method these days. More on howto at Petri's site:… – uSlackr Jun 8 '12 at 20:50

For future use: Create one (or more) users in AD and fill in their generic values. Then copy that user when you create a new account. This will save you a lot of work if you need to create new accounts and makes it harder to forgot fields.

As for the question: You can select multiple users in AD and add the login script to them, all at once. If you need to add user specific stuff (such as homedirs) then you can user $username and it will be filled in with the right value per user. This should allow you to fix it all in one go (assuming they all forgotten users use the same login script)

E.g. ( \fileservername\my_homedirs\$username ).

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.