Question Locked

Batch Script, how do i get this to run for each user

0 helpful
4 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

the code:

@echo on
IF EXIST C:\Documents and Settings\%username%\NetHood\Test (
goto end
) ELSE (
REGEDIT [ /s ] modifiedStartMenu.reg
mkdir C:\Documents and Settings\%username%\NetHood\Test
)
:end
pause

I know some things can be removed such as the pause but how can i get this to run for the specific user that is logged on??

4 replies

by kevin7frg

Are you in a domain? Then just add the script to the users profile in active directory. This will run it everytime they login.

by robo_dev

do you mean how to deploy it (e.g. through a login script?) or do you mean how to get the program to invoke for multiple users?

by jfaulk

invoke for multiple users.

i would like this to be located in the "all users" start up folder. that way when each user (40+ on the one machine) logs in the script will check for a folder and if its there, end the program, or run the regedit and modify the start menu the way i want. then when that same user logs on again it finds the folder and ends.

This discussion is closed to new replies.