How far have you got with this? which bit are you stuck on?
You can easily create a batch file and then define this as the user's logon script in a group policy, if that is what you want to do.
As to running only at first logon, there's nothing native in GP to set that, but you could easily do this within your batch file by creating a file on the system when the script completes, and testing for the existence of this file at the begining of the script.
[code:1]
IF exist c:\flags\MyFlag.flg goto END
foo
bar
more script stuff
echo %username% > c:\flags\MyFlag.flg
net time \\%computername% >> c:\flags\MyFlag.flg
:END
[/code]
If you need it to run once per user on each machine they log onto, you could vary this to create a flag file unique to the user (by name, or maybe putting the flag in the user's profile).
If you only want it to run once for the user ever, then you need to write the flag to a share they can always see (their home drive would be a prime candidate for this)
It all depends on what you really want to achieve.


LinkBack URL
About LinkBacks
Reply With Quote