Hi I am currently trying to complete ascript I have that will mount a share$, create an alias on the desktop renamed, and then hide the share$.
I have completed all the script except for the part that will hide the share$ (on the desktop) I can use the line below to hide all connected shares$, but that is not what I want, I need to keep the other shares$ visible, I have tryed to track down the solution for this, for the last 4 hours, but cant seam to work it out, any help would be great.
(this line will hide all shares$ on the desktop)
set desktop shows connected servers of Finder preferences to false
– My code so far
set serverName to "192.16.0.1"
set shareName to "SHARED$"
tell application "Finder"
activate
if exists disk shareName then
display dialog "Server already mounted" buttons "Ok" default button 1 with icon 2
else
mount volume "cifs://" & serverName & "/" & shareName
end if
make new alias file to alias (":volumes:" & "SHARED$") at desktop with properties {name:"Share Contents Will Be Deleted Every 2 Days alias"}
-- I need to chage the line below to hide the SHARED$ share only.
set desktop shows connected servers of Finder preferences to false
end tell