You cannot. SketchUp will only load version specific files by default. It would need to be modified with an extension (and sometimes is by educational ITs etc.,) to load from a version independent plugin folder. (This is often a shared plugin folder on a network server.)
So (for default stratup extension loading,) you are stuck with the version specific %AppData%
plugins path after v2014. And the version specific %ProgramFiles%
path for v2013 and earlier.
Incorrect. There are major permissions differences. If the user does not have administrative privileges, access to %ProgramFiles%
plugin folders can be restricted. Also with %ProgramData%
plugins folders, writing to those folders at runtime (for settings files, etc.) can be blocked.
This is why the plugins folders were moved into the user’s %AppData%
path beginning with v2014. (It is where Microsoft intends user specific application data to be stored.)
You will have to rely upon pathstrings stored in the Environment variables, (%AppData%
, %ProgramData%
, etc.,) or access the registry for installation path strings (if your installer engine allows this.)
See: Environment variable - Wikipedia
You really didn’t explain this external installer issue in the original post, and we don’t know what installer engine you are using.
Installer locations can be read from the registry at:
For 64bit app on 64bit WIN, or 32bit app on 32bit WIN. (SketchUp v2015 or higher.)
HKEY_LOCAL_MACHINE\SOFTWARE\SketchUp
For 32bit app on 64bit WIN
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\SketchUp
For versions prior to v2013, the “InstallLocation” attributes are under the “Google” key, not a generic “SketchUp” key. For example, version 8 on my 64bit WIN would be:
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Google\Google SketchUp 8\InstallLocation
That is problematic for older versions, and still may not be fixed in the current version. Each SketchUp installation is fighting over the SKP file association, and the double-click shell open command path.
It would be better to enumerate the set of SketchUp installations and ask which ones to install the plugin for. (Of, course only listing those version that your plugin is compatible with.)