Summary

Title:Silent install on clean system does not target any Max installs
Category:Install/Uninstall
Status:Open
Posted By:licensing@creamelectricart.com ( Steve York )
Date Created:10 April 2019

Problem

Description:

We are following the documentation here:

https://ephere.com/plugins/autodesk/max/ornatrix/docs/6/Installing_and_Uninstalling.html#SilentBatch-Installation

Previously this would work fine, however we noticed this now only works for computers we had previously silently installed with v4. With v6 of the plugin, if the machine has never had a previous install of Ornatrix for Max, it will not target any of the Max installs on the machine, so while the silent install completes without error, it also does not install the plugin for any version of Max present on the machine.

This is the command we are using (where all variables are replaced with the applicable version):

msiexec.exe /i Ornatrix-3dsmax-%PRODUCT_VERSION%-win64_%PKG_INSTALLER_VERSION%.msi" /quiet /qn /norestart MAX_INSTALL_PATH_%AUTODESK_VERSION%="C:\Program Files\Autodesk\3ds Max %AUTODESK_VERSION%"

We tried adding:

ENABLE_MAX_%AUTODESK_VERSION%=1

To explicitly try to target a particular Max version, however this did not work either.

When opening the installer manually on a machine that was previously silently installed successfully (using v4), we see the following:

Ornatrix previously installed

So it is targeting the Max installs correctly.

When opening the installer manually on a machine that was previously had no installs of Ornatrix, we see the following:

Ornatrix not previously installed

It fails to automatically target any Max installs.

The documentation says "By default all 3dsmax versions present on the computer will be targeted, so one needs to exclude the versions not to target.". This does not seem to be true anymore, for either silent or manual installs.

We have had to revert to scripting our own manual install, however we would much prefer to just use the msi installer like we did before.

Any help solving this issue would be appreciated.

Steps to Reproduce:

Simply run a silent install on a machine that has never had a previous install of Ornatrix for Max. E.g.:

msiexec.exe /i Ornatrix-3dsmax-6-1-5-19133-win64_342032302038313333.msi" /quiet /qn /norestart MAX_INSTALL_PATH_2017="C:\Program Files\Autodesk\3ds Max 2017"

No versions of Max are targeted on the machine. Install reports no error, but no Max plugins are installed.

I just tried and it worked.

A few notes:

* There is an extra " in your example commands, I suppose this is just a copy/paste error, your actual commands are correct.

* When I tried it the first time from the normal Command Prompt, what happened was exactly what you described: no errors reported, but the plugin was not installed. Actually, I suppose that with the /quiet and /qn options it is normal that no error is displayed. Maybe %errorlevel% should not be 0 on failure, I didn't check that.

However, I also added the /l*v option to create a log file, and there I found that installation failed because Command Prompt didn't have administrator rights. When I started the same command from an Administrator Command Prompt, installation worked fine.

So I suggest you verify that you are running the installation from an Administrator Command Prompt. OTOH, I don't think this has ever changed, the installer has always required administrator rights to run, so if it used to work for you in the past, I don't know why it stopped with newer Ornatrix versions.

* It's a good idea to add

/l*v OrnatrixInstall.log

to your command line so you always get a log file that you (or we) can examine in case of failure.

* You don't need to pass MAX_INSTALL_PATH_2017, if Max was properly installed the installer will get the path from the registry.

 

Ivan Kolev (Software Developer, EPHERE Inc.)

E-mail: ivan.kolev at ephere dot com

Discord: ikolev

Hi Ivan,

Thanks so much for getting back to us.

I can confirm that the extra " is just a typo, we don't have that in our actual install script.

I can also confirm that we are always running the installation from an Administrator Command prompt.

Can you confirm that you were testing on a machine that had never had Ornatrix installed before? We do not have this problem on machine which previously had an install of v4, only on new machines.

I did actually use the /log option before, but there was nothing in the log that seemed to suggest an error, and the return code was 0.

I will check again with /l*v and see if it reports anything useful.

Ok so I just did some more testing.

On a machine where we previously installed Ornatrix v4 for Max, for 2017, 2018 and 2019, I am able to install silently the latest version of Ornatrix and it targets those versions.

I have now installed Max 2020 on that same machine and re-ran the installer. It does NOT target Max 2020 and will not install the plugins for it. It returns a 0 code (success).

The command I used was:

msiexec.exe /i "C:\deploy\Ornatrix-3dsmax-6-1-5-19133-win64_342032302038313333.msi" /quiet /qn /norestart /l*v "%TEMP%\ornatrix_6-1-5-19133_2017-test.log"

I am attaching the log file - hopefully it may give a clue to the issue.


Attached Files:

>ornatrix_6-1-5-19133_2017-test.log (332298 bytes),

At the end of the log file I see: "Windows Installer reconfigured the product"

This means you ran the installer over an existing installation. I'm not sure how will that work, I think in that case the feature selection from the original installation is not changed, so if you didn't have 2020 back then it will not be enabled when you reconfigure the installation. I suppose passing ENABLE_MAX_2020=1 should help in this case, you may experiment with it if you want. But in general, I don't think it is a good idea to run a scripted installation to reconfigure an existing one. Better always run it to make a clean install, and reconfigure manually when needed.

I didn't try on a machine that has never had Ornatrix installed. I have a clean VM but it also doesn't have any Max installed, so it would take me some time to reproduce your exact scenario. I prefer to first examine a log file for the installation that is failing for you, in that precise scenario.

Ivan Kolev (Software Developer, EPHERE Inc.)

E-mail: ivan.kolev at ephere dot com

Discord: ikolev

I did some more testing.

In the case of re-installing the software, 'ENABLE_MAX_20XX=1' does nothing (if it was not already targeted in a previous v4 install).

After manually uninstalling, then re-running the silent install, it would correctly target all versions of Max. We will add in an uninstall of the msi to our install script. This I think will fix the machines that have had a previous install, but for our other machines that have never had an install of Ornatrix, we can't uninstall the software when it has never been installed.

Can you please try in a clean VM when you get a chance please? We received a number of new render nodes, and it does not work to silent install on them because they have never previously had an installation of Ornatrix. We don't have any machines now that are 'clean', since we ended up running the installer on all the new nodes, then copying all the required files (because nothing installed). So we no longer have a machine where we can produce a log that has had no previous installs.

Indeed, ENABLE_MAX_20xx=1 doesn't help to force install a feature. It can only disable it when set to 0. I didn't find any way to add a feature to an existing installation from the command line.

I tried with a clean VM, even without 3dsMax installed. I used the MAX_INSTALL_PATH_2020 variable to simulate having Max.

It didn't work, and then I realized that our documentation incorrectly refers to "MAX_INSTALL_PATH_20XX" while the actual variable used by the installer is MAX_PATH_20xx.

When I fixed that, Ornatrix for Max 2020 got properly installed into the location I had specified in the variable (the files were copied there).

But I'm not sure if this was related to your problem, because if you had Max properly installed, the incorrect variable should have simply had no effect, and the installer should have found the actual Max location from the registry.

If you currently have the plugin properly installed for all the machines you need, then I suggest we forget this issue for now. And for any future installations please keep in mind these two details: use the correct MAX_PATH_20xx variable (if you need that all, i.e. you don't have Max installed or for some reason registry lookup doesn't work) and use the /l*v option to get a detailed log to investigate in case of problems.

Ivan Kolev (Software Developer, EPHERE Inc.)

E-mail: ivan.kolev at ephere dot com

Discord: ikolev

Hi Ivan,

Thanks so much for the follow up. Now that we have the correct variable name for the v6 installer (MAX_PATH_20xx) and we know we need to uninstall before trying to target new installs of Max, it seems to be working fine, but I am yet to test again on a fresh install.

I can confirm that Max was properly installed, and that according to the log file generated, it had no trouble finding the Max install paths for all versions, it just wasn't targeting any installs of Max. Hopefully having the right variable was all that was needed.