Jump to content

Drive Mapping


Recommended Posts

New to using AutoIt.

Have been looking over the help files and scripts and each one seems to have a little of what I am looking for.

I would like to create a script to run on users computers to list the mapped drives and send them to me in an e-mail.

I am looking to get help on some of the base code or suggestions to point me in the right direction.

thank you Rusty. :)

Link to comment
Share on other sites

Each department on my network has there own Logon scripts and through the years I have added manual mappings to individual user computers. I am upgrading our network and wanted to create a list of the drives that everyone is using. so when I create the new scripts we now have a wider range of covereage. plus I wanted to work with the autoit program more. Still trying to learn the code.

Link to comment
Share on other sites

Here is a script that will get the network drive and write to a text file.

$var = DriveGetDrive( "network" )
$log = "c:\temp\" & @username & ".txt"
MsgBox(0,"",$log)
FileOpen("c:\temp\" & @username & ".txt",1)
FileWriteLine($log, @username & ", " & @computername)
If NOT @error Then
    For $i = 1 to $var[0]
        $result= $var[$i] & DriveMapGet($var[$i])
        FileWriteLine($log, $result)
    Next
EndIf

You can replace the c:\temp by a network location, this way you can check the results. I don't think autoit can email the result direct. You may have to result to third party software like "mailsend" or Bmail

CheersNobby

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...