Apple Intelligence is now available on iPhone, iPad, and Mac!

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Can I prevent mounted volume Finder windows opening on startup?

I look after a studio with about 10 Macs, some of which are running OSX 10.4.11. We automatically mount 3 network volumes containing client data at startup. The Finder always opens a window for each volume but I want to prevent this from happening.
In Finder preferences I can prevent the volume icons from appearing on the desktop but the Finder still opens a window for each one at startup when the volumes are mounted..
How can I control this action?

G5, Mac OS X (10.4.11)

Posted on Oct 21, 2009 1:51 AM

Reply
11 replies

Oct 21, 2009 6:08 AM in response to Limnos

Thanks, but this is not the solution I need.

I still need to mount these volumes on startup but what I don't want is for the Finder to *automatically open a window for each volume* on my desktop. I will access these volumes in the usual way from the sidebar of a new window *that I choose to open* when necessary.

I hope that makes more sense!

Oct 21, 2009 7:26 PM in response to ITbloke

This is a hack, but you can try to use xtool to close the windows. I place the following script in my login items. You may want to put in a delay of some sort.

You may also try iKey.
I use iKey to remap the keys. It has a little more function then youpi key. For many years, I used youpi key before switching to iKey.


You might like iKey/youpi key. I have my frequently used applications set to f keys. The same f key starts an application and switches to the application.

Youpi key is free. It works fairly well for me in MAC OS 10.4 although not officially supported. There is a commercial version you can buy, called iKey.

http://www.versiontracker.com/dyn/moreinfo/macosx/11485&vid=75326



This applescript could use some clean up. I do not think you need the first two lines.

do shell script "/usr/sbin/system_profiler SPDisplaysDataType | grep 'Resolution'" -- get info
tell the result to set {DisplayWidth, DisplayHeight} to {word 2, word 4} -- get resolution
--move mouse {DisplayWidth div 2, DisplayHeight div 2} -- center mouse
(*
move mouse {670, 13} --sound
click mouse
move mouse {673, 96} --sound level
click mouse
*)
move mouse {555, 282} -- center mouse
click mouse
(*
First, there is the XTools scripting addition, which will give AppleScript the ability to move the mouse.

http://www.lestang.org/osax/XTool/
XTool-2.0-src.dmg.tgz

Installation :
Drag XTool.osax from insite the image to one of the following locations (create the directory if it does not exist) :
a : ~/Library/ScriptingAdditions/
b : /Library/ScriptingAdditions/
c : /System/Library/ScriptingAdditions/
I have it in directory /System/Library/ScriptingAdditions/
My other two directories do not exit: ~/Library/ScriptingAdditions/ &
/Library/ScriptingAdditions/
. Next, you will need to place a script application into your login items (System Preferences > Accounts > Login Items) that will move the mouse when you log in:
*)


----------------------

This script will give you the location of the pointer. I assigned it to a function key with iKey. So, place the cursor of the x then press the function key to get where you need to click.

do shell script "/usr/sbin/system_profiler SPDisplaysDataType | grep 'Resolution'" -- get info
tell the result to set {DisplayWidth, DisplayHeight} to {word 2, word 4} -- get resolution
set {xWidth, yHeight} to position of the mouse
display dialog ¬
"DisplayWidth= " & DisplayWidth & ¬
" DisplayHeight=" & DisplayHeight & return & ¬
" xWidth=" & xWidth & ¬
" yHeight=" & yHeight
--move mouse {DisplayWidth div 2, DisplayHeight div 2} -- center mouse

---------------

You could try sending command + w to the finder. You can get the idea ... See this example, some work needed by reader!!!:
on open dropped_items
-- Write a message into the event log.
log " --- Starting on " & ((current date) as string) & " --- "
-- set see to alias "Macintosh-HD:Users:mac:Desktop:app.html"
-- set dropped_items to {see}

set the_app to "Safari"


repeat with dropped_item_ref in dropped_items
--set UrlBase to "xzzx FILE://" & POSIX path of dropped_item_ref
--display dialog UrlBase

-- Activate
activate application the_app

-- Open the URL
tell application the_app
open dropped_item_ref
-- print dropped_item_ref
tell application "System Events"
tell process the_app
delay 3
-- click menu item "Print..." of menu "File" of menu bar 1
keystroke "p" using command down
delay 1
keystroke return
delay 10
keystroke "w" using command down

end tell
end tell

--quit
end tell

end repeat
end open

Message was edited by: rccharles

Oct 22, 2009 1:26 AM in response to rccharles

Thanks, rccharles.

This is very comprehensive and you've put a lot of useful detail in your post. I can't help feeling though that it's a bit like using a sledgehammer to crack a nut. There must be a simpler way to prevent windows from opening!

As I've never used iKey or xTool I'm reluctant to use it as my solution. It needs to be rolled out to about 5 other machines in the studio without risk of a glitch.

Oct 22, 2009 10:50 AM in response to ITbloke

This hint might be a start. It minimizes all the finder windows.
http://www.macosxhints.com/article.php?story=20061228162454404

-------------
As an aside, check out iKey. I have the common programs I use assigned to function keys. I have F4 assigned to Firefox. When I want to start FireFox, I press F4. When I want to switch to firefox, I press F4! Starting & switching to an application in Mac OS are the same thing in Mac OS.
Here is an example..
http://discussions.apple.com/message.jspa?messageID=10361085#10361085

Oct 22, 2009 12:43 PM in response to rccharles

This closes the named windows with standard Mac OS stuff... Just place this applescript in your login items

on run
-- Write a message into the event log.
log " --- Starting on " & ((current date) as string) & " --- "

delay 1

tell application "Finder"
set windowNames to windows whose name contains "Applications"
repeat with wNames_ref in windowNames
close wNames_ref
end repeat
end tell
end run

Can I prevent mounted volume Finder windows opening on startup?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.