Unattended installation to custom directory

Posted by ardent on 2014-04-18 08:08

I'm trying to automate ActivePerl installations on Windows, referencing the following document:

http://docs.activestate.com/activeperl/5.16/install.html#windows installers

What I've noticed is that the TARGETDIR is actually a base directory. If I want to install the win32-x64 ActivePerl to c:\perl, I can't do that. Specifying a TARGETDIR of c:\perl ends up creating c:\perl\perl64.

I've inspected the .msi with Orca but it looks like the actual target directory has a random ID in the Directory table; I can still automate this, but it means I have to get the random ID for each package I might want to roll out.

Is there another way to control the actual installation directory from an unattended/command line install?

ActiveState Staff
Wed, 2014-04-23 10:19

(Internal) Bug #65927

It has been discussed in the forums several times. It's a limitation in the installer introduced by the work done to ensure that it is possible to have side-by-side 32-bit and 64-bit Perls.

I am not aware of any method that allows unattended/commandline installs to a completely arbitrary directory with any releases that have both 32-bit and 64-bit Windows versions.

rbos | Tue, 2016-09-27 12:05

This still appears to be a problem. The MSI ignores INSTALLDIR and TARGETDIR entirely and installs in C:\.

This violates Windows conventions where programs are customarily assigned to c:\Program Files or C:\Program Files(x86).

Furthermore, because the program is both unsigned cryptographically AND in an oddball location, I'm forced to create an Applocker rule specifically for it.

ActiveState Staff
Fri, 2016-09-30 15:38

Nothing has changed since we first started shipping 64-bit installers. I don't expect it to change until we drop support for 32-bit Windows, and are willing to walk away from the all the legacy Perl code that is still out there which won't work if you have spaces in the pathname.

rbos | Sat, 2016-10-01 08:25

Lighting a fire under poorly-escaped code sounds like win-win to me. :)

rbos | Sat, 2016-10-01 08:31

Anyway, I'm not asking for a change in the default. I just want to be able to override it and deal with the consequences myself.