Jump to content

DriveMap


Jon
 Share

Recommended Posts

  • Administrators

I got a DriveMap/UnMap function working - nice and easy to implement an people are always asking for it:

DriveMap( "drive", "remote folder" [, "user" [, "password"]] )

Should I add a "persistant" parameter or create a "DriveMapPersistant" AutoitSetOption instead (might be easier)?

Link to comment
Share on other sites

Wow, I've been searching for a way to implement this (through calls to Rundll or something) without luck, and you just go and do it! I'd say, add it as a parameter on the function would be my personal preference, since you may want it on or off for different scenarios.

Link to comment
Share on other sites

  • Developers

Should I add a "persistant" parameter or create a "DriveMapPersistant" AutoitSetOption instead (might be easier)?

Nice... I would prefer to have the Persistant as a parameter on the command ... , more or less like the Net Use command... Edited by JdeB

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

  • Administrators

In a few hours when I get home to broadband land and can upload it. I need to add extended error codes too.

###Function###

DriveMapAdd

###Description###

Maps a network drive.

###Syntax###

DriveMapAdd( "drive", "remote folder" [, flags [, "user" [, "password"]]] )

###Parameters###

drive

The drive letter to map, for example "O:" or "Z:". If you pass a blank string for this parameter a connection is made but not mapped to a specific drive.

remote folder

The remote folder to connect to in the form "\\server\share".

flags

[optional]

A combination of the following:

0 = default

1 = Persistant mapping

8 = Show authentication dialog if required

user

[optional] The username to use to connect. In the form "username" or "domain\usersname".

password

[optional] The password to use to connect.

Link to comment
Share on other sites

Sounds good, being without Broadband is always a bitch :-)

Couple of questions... At the top of the post you mention UnMap, will there be a seperate function to do this?

Also, I don't quite understand this:

If you pass a blank string for this parameter a connection is made but not mapped to a specific drive.

Link to comment
Share on other sites

  • Administrators

Sounds good, being without Broadband is always a bitch :-)

Couple of questions... At the top of the post you mention UnMap, will there be a seperate function to do this?

Also, I don't quite understand this:

You can make a connection that has no drive letter. Like doing "net use \\server\share". It can be useful in certain cirmcumstances.

There is a DriveMapDel as well. And possibly a DriveMapGet later on.

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...