Hey all,
I’m working on a plugin and I’m wondering if there’s a reliable way to get the path to the InDesign installation directory (the folder where the app is actually installed).
I’m currently able to get the user’s home directory using the os module, which is great for accessing things like user shortcut sets and other data stored in roaming folders.
https://developer.adobe.com/indesign/uxp/reference/uxp-api/reference-js/Modules/os/OS/
This lets me build directory paths relative to the home directory, for example:
{
name: "shortcuts",
paths: {
win32:
"\\AppData\\Roaming\\Adobe\\InDesign\\Version {version}\\{locale}\\InDesign Shortcut Sets\\",
darwin:
"/Library/Application Support/Adobe/InDesign/Version {version}/{locale}/InDesign Shortcut Sets/",
},
The issue I’m running into is that I want to access the default shortcut sets, which are stored in the application’s installation directory, like so:
{
name: 'default_shortcuts',
paths: {
win32: "\\Program Files\\Adobe\\Adobe InDesign {year}\\Presets\\InDesign Shortcut Sets\\{locale}\\",
darwin: "/Applications/Adobe InDesign {year}/Presets/InDesign Shortcut Sets/{locale}/",
}
},
Right now, it seems like I have to guess where the user has installed InDesign, which isn’t ideal.
Is there a reliable way (via scripting, UXP, or any other method) to programmatically get the InDesign installation directory, so I can build a path to the default shortcuts folder regardless of where the app is installed?
Any insights or suggestions would be much appreciated!
Thanks!