Notifications
Clear all

[Closed] Which service pack is installed

Hey,
my script needs to know which service pack of max 9 is installed.
a call to maxversion() gives the same values for Max with SP1 and without sp.

how could i get this information?

Thanks very much,

affa

5 Replies

I don’t think you can get that info directly from MaxScript, but you could check the file size on 3dsmax.exe easily enough. That should be a fixed, predictable byte count for each service pack. You’d just have to figure out what the size is per service pack.

Here’s how to check that:

getFileSize maxexe

FYI: Up through 3ds Max 5, you could directly access this info using maxVersion(). 3ds Max 5.0 RTM was 5000, while 3ds Max 5.1 was 5100.

3ds Max 6 and above do not report anything but the original version number, even after the service packs. Thus, 3ds Max 9 RTM/SP1/SP2 all report 9000 as the version.

I’m not sure why they stopped this…it did make bug workarounds much easier.

in theory, the service pack data would be in the MAX_PRODUCT_VERSION_SP headers (SDK) define. Of course, this isn’t actually exposed to MaxScript.

Note that 3ds Max 5.1 wasn’t a ‘service pack’ per se, though. It was a minor revision. The distinction is all sorts of vague, but there you go.

It would be nice if service pack was exposed through, say, the maxOps interface; that seems to have all the other 3ds Max product identification bits (but not a maxVersion() equivalent.)

1 Reply
(@johnswafford)
Joined: 11 months ago

Posts: 0

You’re right…none of the service packs have ever changed the maxVersion() returned value. Now that I think about it, after the 5.1 update there was a “3ds Max 5.1 Service Pack 1” that added the Intel P4 optimizations. It wasn’t detectable via maxVersion() either.

So that’s actually the point when Autodesk dropped the minor versions for service packs.

ok, i think i found a nice solution.
i look for the version of the 3dsmax.exe via dotnet as follows:

	
local versinfo = dotnetclass "System.Diagnostics.FileVersionInfo"
local myFI = versinfo.GetVersionInfo  (pathConfig.appendPath (pathConfig.GetDir #maxroot) "3dsmax.exe")
local versions = filterString myFI.FileVersion "."

and then check if the version is smaller than 9.2 for v9 SP2.

thanks for your help