Notifications
Clear all

[Closed] max version detection ?

Just to further elaborate on what ZeBoxx said, you can query the local appdata path using SHGetFolderPath or SHGetSpecialFolderPath, with CSIDL_LOCAL_APPDATA as an argument.

While this doesn’t give the precise location to max’s storage area, it’s a starting point, from which you can ask the user for the remainder, while providing a default response (for the eng version, perhaps).

That’s actually part of the problem. “Local Settings” is a hidden folder by default; showing up only if the user has set up their Explorer preferences to show hidden files/folders, or by starting the browsing action with that folder as the initial folder.

Installing plugins for max is fun

Hmmm… perhaps the newer versions of max store the per-user path in the registry? Presumably in the HKCU hive. Might be worth checking.

1 Reply
(@zeboxx2)
Joined: 1 year ago

Posts: 0

Not that I have found, I’m afraid. There are several 3ds Max(-related) entries in HKCU.
The main one is:

HKEY_CURRENT_USER\Software\Autodesk\3DSMAX\10.0

Unfortunately, however, none of its subkeys contain any information with regards to the user path.

The other entries are related to the FLI/FLC file format and that sort of thing.
A quick search for “9 – 32bit\enu” in the entire registry actually fails to result in any hit.

I might have missed something, but there’s certainly nothing even in the SDK help file with regards to writing plugin installers and the user folder.

So… writing a plugin or script that would continue installation upon 3ds Max startup (obviously, for plugins, that would require a 3ds Max restart after ‘installation’, unless your plugin is hot-loadable) might be the best route after doing a well-educated guess using the information available (i.e. local_appdata + known strings for 32bit/64bit + enu).

Just to note, though – this only applies if you really, really want to write to the user folders for some reason. E.g. if you have an absolute need or desire to install plugins only for the current user, or want to pre-write a config file (PlugCfg) only for the current user, etc. In the many years of 3ds Max use and poking at plugins, I have yet to find one that actually installed for the current user only; at best, a “Current User” installation would make Start Menu shortcuts only show up for that user, but the plugin would still be installed for All Users. It’s not a big deal, imho – it is, however, a curiosity and it does semi-prevent doing clean ‘current user’ installs if you do want to do them.

Page 2 / 2