Startup volumes

Hello All,
Is there a way to list: any bootable volume on the desktop or get the info from startup disk control panel. I would like to use these strings to install applications.
Thank you in advance,
Damon

: Hello All,
: Is there a way to list: any bootable volume on the desktop or get the info
: from startup disk control panel. I would like to use these strings to
: install applications.
Here’s one way, but it could probably stand some error checking.

set bootableVols to {}
tell application "Finder" 
   set theVolumes to name of every disk
   repeat with i in theVolumes 
      try 
         folder (i & ":System Folder") 
         set bootableVols to bootableVols & i 
      end try 
   end repeat
end tell
result --> name of each disk/volume with a System Folder

This simply looks at each volume to see if it contains a System Folder at
root level, but the presence of a System Folder doesn’t necessarily
guarantee that it’s bootable, so this may not suit your needs.
– Rob

In case of any system folder that doesn’t have the exact name “System Folder”, what do you think about this?

set bootableVols to {}
set DiskList to list disks
tell application "Finder"
	repeat with theDisk in DiskList
		set FolderList to every folder of disk (theDisk as text)
		repeat with theFolder in FolderList
			if (file "System" of theFolder exists) and (file "Finder" of theFolder exists) then
				set bootableVols to bootableVols & theDisk
				exit repeat -- in case of multiple system folders on same disk
			end if
		end repeat
	end repeat
end tell

: In case of any system folder that doesn’t have the exact name “System
: Folder”, what do you think about this?
: set bootableVols to {}
: set DiskList to list disks
: tell application “Finder”
: repeat with theDisk in DiskList
: set FolderList to every folder of disk (theDisk as text)
: repeat with theFolder in FolderList
: if (file “System” of theFolder exists) and (file
: “Finder” of theFolder exists) then
: set bootableVols to bootableVols & theDisk
: exit repeat – in case of multiple system folders on same disk
: end if
: end repeat
: end repeat
: end tell

I’m not sure why a System Folder would not be named System Folder,
and I’d be surprised if the computer would boot under these conditions
(at least here in the USA).

Putting that aside, your script appears to be more thorough. :slight_smile:

– Rob

: I’m not sure why a System Folder would not be named System
: Folder, and I’d be surprised if the computer would boot under
: these conditions (at least here in the USA).
: Putting that aside, your script appears to be more thorough. :slight_smile:
: – Rob

You can get the information from Apple System Profiler, but it’s pretty slow:
tell application “Apple System Profiler”
set x to properties
set y to system folder volumes of x
activate
quit
end tell
y
Marc K. Myers
Marc@AppleScriptsToGo.com
AppleScriptsToGo
4020 W.220th St.
Fairview Park, OH 44126
(440) 331-1074

[2/2/02 12:54:30 PM]