Sign in to follow this  
Followers 0
FuryCell

Mount Functions

18 posts in this topic

#1 ·  Posted (edited)

Here are the Mount Functions i just made . they let you mount a path as a drive. It includes three functions , _Mount , _UnMount , and _MountList.check out the example below.

#Include <MountInclude.au3>
_Mount (@MyDocumentsDir,"Z:"); Mounts the my documents dir as drive Z
Sleep (30000)
_UnMount("Z:"); UnMounts Z Drive

Enjoy! :(

Edit: Fixed some bugs with _MountList () and removed some stuff that was left behind from debugging

Edit:Oops! :( Uploaded wrong MountInclude.au3

Mount_Example.au3

MountInclude.au3

Edited by SolidSnake

HKTunes:Softpedia | GoogleCodeLyricToy:Softpedia | GoogleCodeRCTunes:Softpedia | GoogleCodeMichtaToolsProgrammer n. - An ingenious device that turns caffeine into code.

Share this post


Link to post
Share on other sites



Nice... :( I can use this to mount drives a bit faster then going through Windows Explorer, less clicking..

Thanks..

Share this post


Link to post
Share on other sites

Updated. See Post above.

P.S. GaFrost , I am going to try drive info now and thanks Busysignal and Kjactive for commenting on my post.


HKTunes:Softpedia | GoogleCodeLyricToy:Softpedia | GoogleCodeRCTunes:Softpedia | GoogleCodeMichtaToolsProgrammer n. - An ingenious device that turns caffeine into code.

Share this post


Link to post
Share on other sites

You might be interested in the DriveInfo in my signature.

<{POST_SNAPBACK}>

I Tried your DriveInfo script but i can't figure out how to map a local Drive however.

This might be useful when we have our network set up.we have been putting it off for so long :">!


HKTunes:Softpedia | GoogleCodeLyricToy:Softpedia | GoogleCodeRCTunes:Softpedia | GoogleCodeMichtaToolsProgrammer n. - An ingenious device that turns caffeine into code.

Share this post


Link to post
Share on other sites

Wasn't meant for local dir mapping, I couldn't map local dirs at work anyways, as an admin over many servers i need a quick way to map unmap drives depending on what i was working on, usally have most of the drive letters used up.


SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Share this post


Link to post
Share on other sites

Wasn't meant for local dir mapping, I couldn't map local dirs at work anyways, as an admin over many servers i need a quick way to map unmap drives depending on what i was working on, usally have most of the drive letters used up.

I'm just wondering if you really need to use drive letters for most of what you're doing, gafrost. My team manages all NAS servers for a very large distributed organization, so we're constantly hitting their fileshares, etc. Unless you have a particular need to access something via a drive letter, just access it via its UNC.

I only map drive letters to things that I need ongoing, consistent access to, or that the UNC is too long to remember or type into the Run dialog. Although I do map the X-Z drives to things occasionally, but rarely do I need more than 3 or 4 drives mapped aside from the ones I normally use for shared documents, etc.


My UDFs: ExitCodes

Share this post


Link to post
Share on other sites

I'm just wondering if you really need to use drive letters for most of what you're doing, gafrost. My team manages all NAS servers for a very large distributed organization, so we're constantly hitting their fileshares, etc. Unless you have a particular need to access something via a drive letter, just access it via its UNC.

I only map drive letters to things that I need ongoing, consistent access to, or that the UNC is too long to remember or type into the Run dialog. Although I do map the X-Z drives to things occasionally, but rarely do I need more than 3 or 4 drives mapped aside from the ones I normally use for shared documents, etc.

The reason for mounting the drives is I mount the share as an admin, do what I need to do then unmount.


SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Share this post


Link to post
Share on other sites

#10 ·  Posted (edited)

The reason for mounting the drives is I mount the share as an admin, do what I need to do then unmount.

Right, but I'm curious what can be done by mapping it to a drive letter that can't be done via UNC? I know you can see the drive size and free space in My Computer when it's mapped, and some utilities (and the Command Prompt ) require a drive letter.

I know it has a lot to do with personal preference. I work with people who do the same thing. No one has ever made me aware of a reason to map a drive that was significant enough to make me want to do it consistently. I'm not trying to pick a fight, I'm just curious.

Edited by c0deWorm

My UDFs: ExitCodes

Share this post


Link to post
Share on other sites

Right, but I'm curious what can be done by mapping it to a drive letter that can't be done via UNC? I know you can see the drive size and free space in My Computer when it's mapped, and some utilities (and the Command Prompt ) require a drive letter.

I know it has a lot to do with personal preference. I work with people who do the same thing. No one has ever made me aware of a reason to map a drive that was significant enough to make me want to do it consistently. I'm not trying to pick a fight, I'm just curious.

Np, we're not allowed to log into our systems as admins, so to get to some of the shares that only admins have access to or to update shares that only admins can I map it as an admin.


SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Share this post


Link to post
Share on other sites

Np, we're not allowed to log into our systems as admins, so to get to some of the shares that only admins have access to or to update shares that only admins can I map it as an admin.

My company does the same thing. We have one account for our daily work on our machines and a separate account for servers. I can, however, go to start, run, type the UNC, and it will prompt me for the login. I enter it in the domain\username format, but you can also use the username@domain format, and it will allow you access. There is no need to map a drive simply because you need to use an alternate username... Although I suppose if your "normal" account has readonly access to a share and you need to write something you would need to do that, or you could access that data using the root drive share, such as \\server\c$ or \\server\d$. You will have to type the root drive share into the Run dialog, login, then finish the path if you want to go deeper into the tree, but it's still faster and easier than mapping drives.

Just a thought.


My UDFs: ExitCodes

Share this post


Link to post
Share on other sites

Hey... I just saw these functions. I just have created the need for the mounting and unmounting of drives through script.

I have rarely used mounted drives in the past, but I need to do it now to make everything easier here at this company until I get the server up.

The problem I am having is that when someone restarts one of the computers whether it be the one mapped to or one of the mapped one's it messes up the connection. Sometimes I can just goto My Computer dbl click the drive, and it asks for the username and password, but recently it seems to want me to have to disconnect the drive and reconnect it before asking me again for the username and password.

I guess my question is this: Does either of your programs (SolidSnake and gafrost) allow for the username and password to be submitted through your UDF's?

I am sorry I havent tried any of these apps before asking my question, but I dont really have a test computer setup that I can try it on yet.

Thanks for everyone's time,

JS


AutoIt Links

File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out.

ComputerGetInfo UDF's Updated! 11-23-2006

External Links

Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more)

Share this post


Link to post
Share on other sites

Hey... I just saw these functions. I just have created the need for the mounting and unmounting of drives through script.

I have rarely used mounted drives in the past, but I need to do it now to make everything easier here at this company until I get the server up.

The problem I am having is that when someone restarts one of the computers whether it be the one mapped to or one of the mapped one's it messes up the connection. Sometimes I can just goto My Computer dbl click the drive, and it asks for the username and password, but recently it seems to want me to have to disconnect the drive and reconnect it before asking me again for the username and password.

I guess my question is this: Does either of your programs (SolidSnake and gafrost) allow for the username and password to be submitted through your UDF's?

I am sorry I havent tried any of these apps before asking my question, but I dont really have a test computer setup that I can try it on yet.

Thanks for everyone's time,

JS

Not sure exactly the problem your running into, but the script I wrote allows you to select reconnect at logon and use different user name and password.

Gary


SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Share this post


Link to post
Share on other sites

Not sure exactly the problem your running into, but the script I wrote allows you to select reconnect at logon and use different user name and password.

Gary

Thanks for the reply... I havent always been completely up on the networking end of computers. I have been more hardware/software so its hard for me to explain exactly whats going on with the connection between the shared drive and the host computer.

I think I have a test environment setup so I will try out the scripts and see what I can do. I may have to set it as a startup script and what not to make sure the "reconnect at logon" actually works as it should because right now its not working the way I have understood it to do so. The drive becomes unavailable after one of the computers are restarted (just that computers drive).

I'll let you know if I have any more questions/problems, and I will also try to be more specific if possible.

JS


AutoIt Links

File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out.

ComputerGetInfo UDF's Updated! 11-23-2006

External Links

Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more)

Share this post


Link to post
Share on other sites

Is there any way I could modify this functions to mount folders as removable drives? Not to get all these Recycle and System Volume Information?

Share this post


Link to post
Share on other sites

Seems there is no way... Are there any other functions that support mounting as removable?

Share this post


Link to post
Share on other sites

Thanks you all for help :whistle:

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  
Followers 0