Executing multiple instances of 3ds Max with dynamic environment variables

loocas | 3ds Max,technical | Saturday, October 5th, 2013

The title sounds a bit complicated, but basically what I needed to achieve was having multiple installations of 3ds Max on my machines and running them as needed.

The problems started when I needed to also include certain .dlls in the Environment for Max to recognize. I store my plugins and plugin libraries outside of Max’s root folder for easier portability, updateability and maintenance.

So, to sum it up, I needed to add to my %PATH% env var “C:\duber\3ds Max 2014\dlls” when running 3ds Max 2014, or “C:\duber\3ds Max 2011\dlls” when running 3ds Max 2011 and so on.

This sounds easier than it actually is, since we cannot assign various Env Vars to shortcuts in Windows (or as far as I know we can’t, please correct me if I’m wrong), which’d solve this issue rather elegantly.

What I had to do instead was to create a .cmd file (a Windows command batch file) with a few simple commands in it and execute that file instead of 3ds Max directly.

Basically put this text into your .cmd file:

@echo off
SET PATH=%path%;C:\duber\3ds Max\2013_x64\dlls
START "" "C:\Program Files\Autodesk\3ds Max 2013\3dsmax.exe"

This will make sure to copy all the global %PATH% variables to the local, current, %PATH% group and include a special directory where all your .dlls are stored so that 3ds Max can see them when starting up.

The last line calls the 3dsmax.exe with no parameters (the first set of quotes).

Link to this start3dsMax2013.cmd file instead to the 3dsmax.exe and you’re all set.

Enjoy. :)

P.S.: Of course you can apply this very same principle to any other program you like, not just 3ds Max.


  1. Have you tried to create a symbolic link and put it in the usual 3dsmax directory?

    Comment by Matteo — October 5, 2013 @ 16:40

  2. Hey Matteo, that’s an interesting suggestion. I haven’t tried it, but I wonder, what happens with the symbolic links when you overwrite the source files? Also, this way is more convenient when adding new plugins and dlls into the environment, as you simply copy them wherever you need and re-launch 3ds Max.

    Comment by loocas — October 6, 2013 @ 09:11

  3. Hi Lukas (I hope that’s you name eheh),

    I think you can try with a source folder “C:\duber\” and some directories symbolic links pointing to it (“C:\duber\3ds Max 2011\dlls”, “C:\duber\3ds Max 2014\dlls”).

    This way working in the source folder will be the same as working inside one of the symbolic directories (and the other way around is also true).

    Let me know if you have the chance to try this solution, I am curious :)

    Comment by Matteo — October 6, 2013 @ 20:15

  4. Hi, Matteo,

    I’m not sure I understand the setup properly. What files are you going to sym link and where?

    Comment by loocas — October 8, 2013 @ 09:27

  5. I’ll make you an example then.

    Run the console (Windows console) and write:
    mklink /D “C:\duber\3ds Max 2011\dlls” “C:\duber\”

    This command will create a new symbolic link named “dlls” in “C:\duber\3ds Max 2011\”.
    This symbolic link will point to the contents of the “C:\duber\” folder.

    Once you get how it works you can then make one symbolic link for each 3dsmax installation:
    mklink /D “C:\duber\3ds Max 2012\dlls” “C:\duber\”
    mklink /D “C:\duber\3ds Max 2013\dlls” “C:\duber\”
    and so on..

    Comment by Matteo — October 8, 2013 @ 16:14

  6. Ah, this way, yes, of course! This makes sense and is also a pretty interesting solution. Thanks for pointing that out. :)

    Comment by loocas — October 20, 2013 @ 20:29

RSS feed for comments on this post. TrackBack URI

Leave a comment

Powered by WordPress | Theme by Roy Tanck