I am writing an installer for AutoCAD 2012 to install our .Net plugin with the .bundle style of plugin loader. It is my understanding that 2012 does not support the ApplicationPlugins folder under "ProgramData", but only in the "Program Files\AutoDesk\ApplicationPlugins" and the user's "AppData\Roaming\Autodesk\ApplicationPlugins" directories. I want to install my plugin for all users so I assume I need to put it in "Program Files\AutoDesk\ApplicationPlugins". How do I find this at install time? I know that mind is at "c:\Program Files\AutoDesk\ApplicationPlugins", but that location may be different for a different install, right? Is there a registry key or AutoCAD .Net utility that I can leverage to discover that location so I know where to lay down my .bundle bits?
Hi Jason
That's correct about 2012 only supporting Program Files\Autodesk\ApplicationPlugins as an All User install. It was changed in 2013 because there are not enough permissions for developers to write their own app specific data to those folders and also so that we only have a single MSI for the installation (not separate 32bit and a 64bi installerst). That said, 2013 still reads Program Files\Autodesk\ApplicationPluigins for now.
All of the properties you mention can be obtained either by the standard MSI Directory table entries or from the DOS env variables. If you create an MSI using any normal MSI creation tool like Wise or InstallSheild, you will see the Directory table containing a property called ProgramFilesFolder
Another way to do what you want, if you type SET in a DOS prompt, you get
...
ProgramData=C:\ProgramData
ProgramFiles=C:\Program Files
ProgramFiles(x86)=C:\Program Files (x86)
ProgramW6432=C:\Program Files
You could create a Custom action in your MSI CustomAction table which simply sets a global MSI variable which is set to any one of the DOS environment vars... e.g.
setUserProfileNT 51 USERPROFILE [%USERPROFILE]
Be aware that creating a 32bit installer will mean tthat it will install on both 32bit and 64bit, however, if you try and install your files to Program Files using the 32bit installer the WOW layer will redirect your installer to Program Files (x86) - so in this case you will either need a custom action to disable the WOW redirect or you will need separate 32 and 64bit installers.
Hi Jason. Have you perhaps found out where the registry key showing the path to the ApplicationPlugins folder is?
Regards,
Haris