run once logon script

  • Thread starter Thread starter Guest
  • Start date Start date
Howdie!
How do I craft a logon script/batch file to run only once applied through the
GPO ?

You can't, as Group Policy logon/startup scripts will always execute on
startup. But you can have a workaround: execute the script and after its
initial completion, create a textfile or whatever to check for when
executed once more. By checking then for the file, you'll be able to
tell whether the script got executed before or not.

cheers,

Florian
 
Thanks for an answer. You would think that MS would have some facility to do
this. Do you have a rcommendation as to where the semaphore text file should
be created, it will be run by multiple workstations/users ?
 
khmmc said:
Thanks for an answer. You would think that MS would have some facility to do
this. Do you have a rcommendation as to where the semaphore text file should
be created, it will be run by multiple workstations/users ?
It should be out of the way, not on users desktops :-). Obviously, if it
needs to run once per user it should go into something specific to that
user, like "documents and settings\%username%" or something. Or if it
just needs to run once per machine, wherever you think it will be
safest. You can also have the script write to a file or create a file on
a server so you'll know when all of the machines/users have run it.

....kurt
 
Howdie!
Thanks for an answer. You would think that MS would have some facility to do
this. Do you have a rcommendation as to where the semaphore text file should
be created, it will be run by multiple workstations/users ?

Kurt did already advise you well. I'd create the file somewhere the user
doesn't see it. You could also create a hidden share (append a $ at the
end of the share name) with write-rights and create for all users - add
let the script createthat file there (maybe by naming the file with the
user's %username%).

cheers,

Florian
 
Excellent tip.... I was trying to accomplish this myself and such an
obvious technique never entered my mind.... Thanks!!!

Regards,
Hank Arnold
 
Back
Top