Help - Search - Members - Calendar
Full Version: Automount with ntfs-3g
InsanelyMac Forum > Apple World > Mac Programming and Development > AppleScript and Automator
muitommy
CODE
do shell script "command" password "password" with administrator privileges
do shell script "diskutil unmount /Volumes/WinXP"
do shell script "diskutil unmount /Volumes/Music"
do shell script "diskutil unmount /Volumes/Multimedia"
do shell script "mkdir /Volumes/WinXP"
do shell script "mkdir /Volumes/Music"
do shell script "mkdir /Volumes/Multimedia"
do shell script "/usr/local/bin/ntfs-3g /dev/disk2s1 /Volumes/WinXP -o ping_diskarb,volname=WinXP -o locale=en_US.UTF-8"
do shell script "/usr/local/bin/ntfs-3g /dev/disk1s1 /Volumes/Music -o ping_diskarb,volname=Music -o locale=en_US.UTF-8"
do shell script "/usr/local/bin/ntfs-3g /dev/disk0s1 /Volumes/Multimedia -o ping_diskarb,volname=Multimedia -o locale=en_US.UTF-8"


i save the above script as a application bundle and run it as a login item to achieve automount of my drive, but later on i find the disk identifier diskxsyare not the same everying i boot up, so my drive are mounted with a wrong volume name... how can i change the code so that i could make it correctly? or can i make the disk identifier restrict to a disk?

Thanks
A Nonny Moose
Are you trying to mount the drive or eject it? You're first ejecting it and then you're making the system create a folder with the exact same filenames you need to mount. Then you're trying to make these folders do something.

If they're connected to the Mac, it will mount at login.

To eject them, use AppleScript and make your life easier:

CODE
tell application finder
    activate
    eject / volumes / winxp
    eject / volumes / Music
    eject / volumes / Multimedia
end tell


Now tell me step by step what you want to do after ejecting the disks
U.C.
You guys really need to stop bothering with NTFS3G and try this


BTW Beta 3.3 dont work. Try Beta 3.2
muitommy
QUOTE(A Nonny Moose @ Nov 5 2007, 01:01 AM) *
Are you trying to mount the drive or eject it? You're first ejecting it and then you're making the system create a folder with the exact same filenames you need to mount. Then you're trying to make these folders do something.

If they're connected to the Mac, it will mount at login.

To eject them, use AppleScript and make your life easier:

CODE
tell application finder
    activate
    eject / volumes / winxp
    eject / volumes / Music
    eject / volumes / Multimedia
end tell


Now tell me step by step what you want to do after ejecting the disks

originally, i want to mount it using utf08 coding as you can see in my script,
and i'm using paragon ntfs now, but i would still want to know that solutions, thanks!! tongue.gif
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.