Re: Checking if a Volume is Mounted
Re: Checking if a Volume is Mounted
- Subject: Re: Checking if a Volume is Mounted
- From: Rick Bargerhuff aka cougar <email@hidden>
- Date: Wed, 05 Feb 2003 17:17:21 -0500
Hey Christopher!
In OS 9.2.2, how would I check if a remote volume is mounted to the
desktop?
I need to check if a volume is mounted, and if it is not, mount it.
Ok, what type of volume? What you could do is...
Save the below script as an Application and make sure it stays open.
What it will do, it will try to mount the volume.
The reason we try to mount the volume is, if the volume is already
mounted, it will error. So we use a try block.
Right now, it is set to run every 60 seconds (1 minute). So hopefully
this works for you. This is for a volume being
mounted using SMB protocol. For another protocol, you will need to get
the connection syntax, i.e. SMB is
smb://user:password@server_ip/what_tomount.
Good luck & let me know if this is successful for you.
Rick Bargerhuff aka cougar
Programmer / Developer
Multi-platform Technician / Specialist / Web Designer
Personal Email: email@hidden
Personal Website :
http://mywebpages.comcast.net/cougar718
-- Server Configuration (You must fill these out before running the
application
property server_name : " "
property server_ip : " "
property user_of_machine : " "
property user_password : " "
property share_to_mount : " "
on idle()
my mount_volume()
return 60
end idle
on mount_volume()
try
mount volume "smb://" & user_of_machine & ":" & user_password & "@" &
server_ip & "/" & share_to_mount
end try
end mount_volume
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.