Jump to content

Thoughts about login scripts

Recommended Posts

Knocked-up a quick script to simplify the maintenance of login-scripts.

Basically, we have a number of departments, some of which have only selective access to certain areas of the servers. (Nothing unusual there..) Maintaining a separate login-script for each of these departments was getting to be a pain, yet was preferable to using a single script, which would confuse the users by placing inaccessible drive-mappings on their machines. So thought it might be a lot simpler to map all drives from a common script, then check each for accessibility and remove those for which a directory-listing is denied.

; ******** DriveZap.au3 ************ 


while $letters[$ct]<>"-"
 $letters[$ct]=$letters[$ct] & ":"
 if $share <> "" then
  $handle=filefindfirstfile($share & "\*") 
  if $handle < 0 then

This method works, but might not be the most efficient one possible. It relies on the "./.." entries being visible if the folder contains no other files. Thoughts on this, anyone?

Edited by IanR
Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...