Closed fisherhu closed 4 months ago
Have you confirmed that the PuTTY installer supports being installed to another directory from the command line?
As mentioned in the documentation (emphasis mine):
Install Directory Override - Override the default installation directory. Chocolatey will automatically determine the type of installer and pass the appropriate arguments to override the install directory. The package must use Chocolatey install helpers and be installing an installer for software.
You can see that Chocolatey CLI is doing that by adding TARGETDIR="F:\Program Files\PuTTY"
to the msiexec.exe
command line. If the installer ignores it then there is nothing that Chocolatey CLI can do.
To be honest I did not check it. Now I did. Yes, it does support via the INSTALLDIR property, i.e.:
msiexec /quiet /i putty-64bit-0.81-installer.msi INSTALLDIR="F:\Program Files\PuTTY"
did the trick.
Workaround, good enough for my purposes:
choco install putty.install -y --% --ia=INSTALLDIR=F:\ProgramFiles\PuTTY
The proper solution would be something like implemented in the jenkins' installer.
Checklist
Chocolatey Version
2.2.2
Chocolatey License
Professional
Package Version
0.81.0
Current Behaviour
It still installs under C:\, even if it sets TARGETDIR: Overriding install directory with 'TARGETDIR="F:\Program Files\PuTTY"' ... Software install location not explicitly set, it could be in package or default install location of installer.
Expected Behaviour
To install under F:\Program Files\PuTTY
Steps To Reproduce
choco install putty.install --installdirectory 'F:\Program Files\PuTTY' -y
Environment
Chocolatey Log
Anything else?
No response