Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Subtractive log via script

Status
Not open for further replies.

GordonPrice67

IS-IT--Management
Mar 12, 2012
5
US
I have a situation where I have a subset of users who need a particular scripted task run, and I would like to do it via login script, and log progress so I can remove the task from the login script when everyone has run it. I could just write user names to a list upon completion, but if you have more than a few names it is very hard to know if everyone has received it. Also, since this is a subset of all the users in the office, and also is tied to the machine, or at least the presence of a certain already installed pice of software, I kind of need a list to work against to start with, so I am thinking I could check the list for the presence of the current user, if there run the script, the remove the name from the list. But that means doing some array stuff, along with reading and writing the entire list for each run, and if I had a number of users running the script at the same time, I might run into some concurrent access issues. Another thought I had is to have a folder full of txt files of the user names. The script looks in that folder for a file to match current user, if found continue, and when done delete the txt fileof that user. When there are no more txt files the task can be removed from the login script, the txt files can be created via script using a seed text file list, or from an AD group, etc. and the txt file could even contain some extra information, like machine name or something if that was important.

All that said, I have always been more of a hack IT Manager (mostly CAD and BIM management really) so perhaps there is actually a best practice for this already that I am not aware of?

Any recommendations are greatly appreciated.

Thanks!
Gordon
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top