tipnmo Posted November 15, 2006 Share Posted November 15, 2006 I have a windows xp pro fileserver/htpc with 1tb of hdd space. Unfortunately i did a poor job foreseeing the expansion of my fileserver, so i am stuck in ntfs, with 8!!! shared folders. Now i am getting really sick having to reconnect to 8 shared volumes every time i disconnect from my home network. Is there a way to automatically mount all my shared volumes when i connect to my home network via ethernet (hardly use wifi at home.) I have come across how to automount on start up, but half the time i am starting up my computer out of my home network. Oh btw my computer is a MBP, with 10.4.8 Eventually i would like to ditch xp for ubuntu/debian/suse, and use an LVM partitioning layout to bring some order to the chaos. But that wont be for some time (as i am waiting tell i upgrade to 2 tb, and still have much to learn about LVM, and the various filesystems) Link to comment Share on other sites More sharing options...
Kevlar Posted November 15, 2006 Share Posted November 15, 2006 Write an apple script to do it.. Put the applescript in your dock, once you connect, click the applescript and bingo... Perform the following steps to create an AppleScript application that automatically mounts a network volume. 1. Double-click the hard drive icon on the desktop. 2. Double-click the Applications folder. 3. Double-click the AppleScript folder. 4. Double-click the Script Editor application. 5. Type the following into the Script Editor window. tell application "Finder" open location "afp://user:password@server/share" open location "afp://user:password@server/share2" open location "afp://user:password@server/share3" open location "afp://user:password@server/share4" open location "afp://user:password@server/share5" open location "afp://user:password@server/share6" open location "afp://user:password@server/share7" open location "afp://user:password@server/share8" end tell Note: Replace user with the desired username, password with that user's password, server with the server IP address, and share with the name of the shared volume. 6. Click the File menu and choose Save As. 7. Type the desired name of the script in the Save As field. 8. Select the desired location for this file from the Where drop-down menu. 9. Choose Application from the File Format drop-down menu. 10. Ensure the Startup Screen setting does not have a check mark in front of it. 11. Click the Save button. The application will appear in the location selected above. 12. Close any open windows and close any programs to return to the desktop. 13. Navigate to the location to which the AppleScript application was saved. 14. Drag the Applescript to your Dock 15. Click the Applescript in your Dock Link to comment Share on other sites More sharing options...
tipnmo Posted November 15, 2006 Author Share Posted November 15, 2006 thats a great idea, thanks i didnt even think about writing a script. However, i use samba and path finder so i am assuming i should use: tell application "Path Finder" open location "smb://user:password@server/share" Link to comment Share on other sites More sharing options...
tipnmo Posted November 15, 2006 Author Share Posted November 15, 2006 worked great, thanks again Link to comment Share on other sites More sharing options...
Kevlar Posted November 16, 2006 Share Posted November 16, 2006 Yea, any server protocol that OS X supports should work fine with the script, AFP or SMB. Glad I could be of some help. Link to comment Share on other sites More sharing options...
avioli Posted December 18, 2006 Share Posted December 18, 2006 is there a way to specify the workgroup? Link to comment Share on other sites More sharing options...
SLy CaT Posted December 19, 2006 Share Posted December 19, 2006 is there a way to specify the workgroup? try this: smb://username:password@workgroup/servername/sharename i have all my home computers on the same workgroup... so i can't exactly test it =\ and i'm just grabbing this from a tutorial to install a printer via samba XD. apparently it might not work depending on windows security. but thanks for the script kevlar. works great in automater. Link to comment Share on other sites More sharing options...
Rammjet Posted December 19, 2006 Share Posted December 19, 2006 I would also try the following method: First, connect to a share, but leave out the password: smb://username@workgroup/servername/sharename When it connects, it will ask for a password. Check the box to save your password in your keychain. When the share mounts, make an alias on the desktop. Drag the share folder to the Desktop, but before releasing it, first press and hold the Command and Option keys. Then release the folder. This makes an alias. Now, whenever you reconnect to your network, double-click the share folder and it will reconnect to the server and then open the folder - might take a couple of seconds. If you don't want the share on your Desktop, open a Finder window. Drag the share folder to the bottom left pane in the Finder window. Again, when you reconnect to your network and then click on the folder, it will take a few seconds to reconnect the share and open the folder. Lastly, you can use the Sharepoints Automounter program. It is getting a little old, but still works: http://www.hornware.com/sharepointsautomounter/ Link to comment Share on other sites More sharing options...
Recommended Posts