AutoCAD Revit LT 2021 Issues

This one should be silly easy. I do however suck so bad at double qoutations …

im trying to get this line to work with a deployment: setup.exe /t /qb /language en-us /c RLT: INSTALLDIR"%programfiles%\Autodesk"

Now this works just fine in a command line. But not so much in Powershell.

Execute-Process - Path “Setup.exe” -Parameters “/t /qb /language en-us /c RLT: INSTALLDIR”%programfiles%Autodesk" does not resolve correctly.

I am sure its just a mather of quoting it correctly im just staring myself blind on this one :s

I see a few problems, maybe just typos while you were typing up your post.

  • You have a space between your dash/hyphen and the Path switch.
  • You close your quotes after INSTALLDIR and then try to close again after Autodesk
  • Your %programfiles% variable is missing the backslash to separate it from Autodesk

To help with keeping quotes straight, I would suggest a couple of things:

  • Use single quotes whenever possible. Single quotes are used for strings that contain nothing that needs to be resolved, where double quotes are called for when they do.
    -Path 'Setup.exe' will work because it’s nothing but a string.
    But if you include the $dirFiles variable, you’d need double quotes. -Path "$dirFiles\Setup.exe" because the variable needs to be resolved at runtime.
  • Be careful when copying/pasting quotes. You may end up with ‘smart quotes’ that Powershell no likey.

Assuming your syntax is correct regarding what Revit wants for install switches, this looks better:

Execute-Process -Path 'Setup.exe' -Parameters “/t /qb /language en-us /c RLT: INSTALLDIR %programfiles%\Autodesk"

Or, if possible, you could remove the %programfiles% variable and go with the simpler path,
C:\Program Files and use this:

Execute-Process -Path 'Setup.exe' -Parameters '/t /qb /language en-us /c RLT: INSTALLDIR C:\Program Files\Autodesk'

O yea, some miss typing there from my end there :slight_smile:
You’r examples all seem valid but the installer refuses to actually read the installdir part unless its written exactly like this: /t /qb /language en-us /c RLT: INSTALLDIR="%PROGRAMFILES%\Autodesk"

Also thank you for the explanation on double and single quotes, Very helpfull :slight_smile:

It’s been awhile but years ago when I deployed Revit 2017 (not LT version), this is the command I used in PSADT:

Execute-Process -Path "$dirFiles\Img\Setup.exe" -Parameters '/W /q /I Img\Revit_2017_x64.ini /language en-us'

I don’t recall details now, but as you can see, Revit’s setup process provided a method to generate an INI file that contained the bulk of my install parameters. The INI file is 1131 lines long and contains almost everything (install path, log path, license details, co-requisites, AddOn install order, etc). Maybe Revit LT provides the same functionality?

Yea, unfortunately Revit LT has a brand new installer with no need to make an deployment any more.

So a little update … So this kinda works but at this point i blame the installer from Autodesk for vierd behaviours.

Execute-Process -Path ‘Setup.exe’ -Parameters ‘/t /qb /w /language en-us /c RLT: INSTALLDIR="%PROGRAMFILES%\Autodesk"’ -IgnoreExitCodes ‘259’

However the main MSI (RLT) ends up getting installed to %PROGRAMFILES(x86)%

Such a simple thing that should be so easy :S

Solution for anyone else having issues with this install and PSADT:

Execute-Process -Path “setup.exe” -Parameters ‘/t /qb /w /language en-us /c RLT: INSTALLDIR=“C:\Program files\Autodesk”’ -WaitForMsiExec -IgnoreExitCodes ‘259’

For some unknown reason i havent dived into the variable %programfiles% resolved to Program Files(x86)
Got around that by “hardcoding” the install path. Application now installs as it should.