Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Mariner19

macrumors newbie
Original poster
Jun 8, 2019
25
4
South Carolina, USA
I have never attempted this, but can Applications / Programs such as MS Office & Adobie CS5 be kept on a separate HDD instead of the OS HDD? Might be a dumb question, but I have to ask. lol
 

Nermal

Moderator
Staff member
Dec 7, 2002
20,636
4,036
New Zealand
All well-written apps can be run from any drive. A handful of apps - and Microsoft and Adobe are sometimes guilty of this - will only run from the drive that they were first "installed" to.
 
  • Like
Reactions: a2jack

Longkeg

macrumors 6502a
Jul 18, 2014
565
283
The Nation’s (US) Oldest City
Though the app/program might run from a different drive keep in mind that the first time it was launched it probably wrote preference files and other “under the hood” stuff back to various places on the main drive. Not a big issue. If you plug the drive into a different computer to use the app you may find that any customization you did on the original machine won’t be there. It will behave like a newly installed app.
 
  • Like
Reactions: Krevnik

Senor Cuete

macrumors 6502
Nov 9, 2011
421
30
A well-mannered application is supposed to store the app's preferences in the application bundle (what appears as an application in the Finder) so a good app should keep its preferences when you move it to another drive. However some unethical companies like Microsoft and especially ADOBE store all kinds of files (including ones that are invisible) in various places in your Library and ~/user/library/... because they are paranoid about potential piracy or some other bull****. This makes it very difficult to uninstall these programs - almost like malware.
 

Red Menace

macrumors 6502a
May 29, 2011
578
226
Colorado, USA
A well-mannered application is supposed to store the app's preferences in the application bundle (what appears as an application in the Finder) so a good app should keep its preferences when you move it to another drive.
Uhhh, no - an application should never write anything to an application bundle. That would risk being rejected from the App Store and possibly break code signing. There is a standard API for application preferences, which are normally kept in the user's ~/Library/Preferences folder.
 

KALLT

macrumors 603
Sep 23, 2008
5,361
3,378
As a rule of thumb: if you cannot choose the location during setup, then you probably cannot put the app anywhere else. This applies in particular to apps that are supplied as installer packages (.pkg), unless the installer lets you choose a location, and Mac App Store apps. You should not move those apps to different locations. Apps that can be installed by drag and drop can generally be installed anywhere and also moved around, unless those apps tell you otherwise (some will complain upon start).

“Proper” Cocoa apps are position independent and write their generated files in the user or local library (the latter only if permitted).

Unfortunately, I know several apps that are technically capable to run from anywhere but still must be installed in /Applications for whatever reason. Microsoft Office supplies its own updater app, so I suspect that this is what will likely prevent you from putting the Office apps anywhere else.
 

Senor Cuete

macrumors 6502
Nov 9, 2011
421
30
I looked at my Mac and the application that I wrote stores its preferences in:
~/User/Library/Containers/com.Appname/Data/preferences/com.Appname.plist
This property list also contains other data. So you're right. If you use NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; to access the preferences in the usual location this is where they will be. I still think that doing what Adobe, Microsoft and Google do, putting all kinds of files, including invisible ones in non-standard locations sux.

I copied this application to another drive and it works perfectly.
 
Last edited:

Senor Cuete

macrumors 6502
Nov 9, 2011
421
30
Also I see that the path should be: ~/Library/Containers/com.Appname/Data/preferences/com.Appname.plist

the "~/" meaning relative to the current user's directory, not an absolute path, right?
 

Red Menace

macrumors 6502a
May 29, 2011
578
226
Colorado, USA
Also I see that the path should be: ~/Library/Containers/com.Appname/Data/preferences/com.Appname.plist
the "~/" meaning relative to the current user's directory, not an absolute path, right?

Correct.
The items in the Containers folder are the sandboxed references to the regular folders. A non-sandboxed application would use the ~/Library/Preferences folder directly.

EDIT:
The Cocoa APIs take care of using the correct folder, which is one of the reasons to use them.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.