Installing application to non-standard folder

I’ve never used PSAppDeployToolkit before. There is a group where I work that uses it, and I’ve gotten a request to deploy a previously deployed application to servers and instead of going to C:\Program Files, we want to install in E:\Program Files. I assume ProgramData, Program Files\Common Files will follow suit.

Is that done by editing AppDeployToolkitMain.ps1 and changing all occurrences of $envprogramfiles, etc. to the appropriate paths instead of “[Environment]::GetFolderPath(‘ProgramFiles’)”, etc.?
I’m new to this and new to SCCM. I tried to find a PDF of the documentation as I think it’s easier to search.

What you haven’t mentioned is the app you are trying to install, so we would all be guessing…

If this is a modern installer (MSI or exe) it might be worth investigating if there are any unattended install parameters that allow you to define the install path from a command line, then use these parameters within the install command line within your customised PSADT script without the need to modify the Toolkit code (which for this purpose I personally wouldn’t recommend - unless the app you are installing does not have a modern installer which doesn’t allow for the install path to be defined).

As you are new to PSADT, I can recommend having a read of the PSADT Documentation - see link at top of this site, and then you can use the Reference to understand all the functions within PSADT - also linked at top of this site.
Also it’s worth being aware of the SilentInstallHQ site - this is good reference site, there is plenty of unattended install examples here: Silent Install Knowledge Base – Silent Install HQ and plenty of PSADT example scripts here: PowerShell Scripts – Silent Install HQ for many, many apps…- you might just find yours listed to save you some effort :wink:

1 Like

The actual install file is a .MSI. AutomationAnywhere. It’s typically installed on workstations but someone has decided they want it installed on servers, which can’t have third-party apps installed on the system drive.

I haven’t had to do this in years but I do remember you to use MSI’s ROOTDRIVE property

in the line with Execute-MSI function, add -AddParameters "ROOTDRIVE=E:\"

-AddParameters is explained Here​

Not sure about where on the E: drive it will install, though.
If we need to specify that, It’s another MSI property called TARGETDIR

1 Like

I’d go with what @That-Annoying-Guy said with the MSI parameters.

N.B. It looks like it might be possible to configure an alternative install path for Automation Anywhere, but their documentation is… vague to put it politely.

" The default installation location for many configuration files is:

C:\Program Files\Automation Anywhere\Enterprise\"

from here: Automation Anywhere configuration and properties files
The way I read this it would infer it is possible to change… but unfortunately I can’t see it documented anywhere how to.

This is the best I can do, but it refers to their Control Room product:

So, you might do as well to talk to their support team to see if they can provide you with better answers than their documentation provides, so you can find out how to install to a different path.

Thanks. I’m not sure what the deadline is but I’m sure my manager will let me know very soon. The paths will be the same except the root drive being e:\ instead of c:.

If you environment variable of program files is pointing to ‘e:\Program Files’ is should install the files to that location, that is if the MSI is created correctly.
Best thing you can do, check the MSI with a free packaging tool or ORCA. Check the ‘Directory Table’ where the INSTALLDIR property is pointing to.
If the MSI is created correctly it should point to 'ProgramFiles\vendorname]

In that case , you probably can change the installation folder by using this property
msiexec.exe /i [MSINAME.msi] INSTALLDIR=E:\Program Files[folder] /qb

If the INSTALLDIR within the MSI isn’t pointing to the correct folder you can try using the ‘Directory name’ in the Directory Table of the MSI that is pointing to the applicationfolder instead of INSTALLDIR.