Jump to content
Sign in to follow this  
Jon

DriveMap

Recommended Posts

Jon

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)?

Share this post


Link to post
Share on other sites
Chris_1013

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.

Share this post


Link to post
Share on other sites
Jos

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 Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
ezzetabi

What is the difference between this and Net use?

Share this post


Link to post
Share on other sites
Chris_1013

I don't think there is any difference, it'd just be nice to have it as a built in function in AU, rather than having to shell out to DOS and trap the error to check it worked.

:ph34r:

Share this post


Link to post
Share on other sites
jpm

I prefer the persistant as a parameter of the command too :ph34r:

Share this post


Link to post
Share on other sites
ezzetabi

internal versus external... like a bunch of functions.. :ph34r:

Ah... Ok. Just it seemed that there were something new I didnt understand.

Thanks :(

Share this post


Link to post
Share on other sites
Chris_1013

How soon do we get it? I want it yesterday :-)

Share this post


Link to post
Share on other sites
Jon

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.

Share this post


Link to post
Share on other sites
Chris_1013

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.

Share this post


Link to post
Share on other sites
SlimShady

Tip:

Use a blank string to disconnect/UnMap a networkdrive.

Share this post


Link to post
Share on other sites
Jon

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.

Share this post


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
Sign in to follow this  

×