2

I am trying to silent install exe softwares while changing the target directory during installation.

I am not able to change the path/directoy during installment.

I am aware of switches available for exe files, i have attached the same for the exe i am trying to install , it seem to come under EDITED Advanced Installer>> (Self-Extracting Microsoft CAB archive)

Command Switches: /extract:path ; /log[:path] ; /lang:lcid ;/quiet ; /passive ; /norestart ; /forcerestat

The various commands/block i tried: Python

p = subprocess.Popen(r'path\file.exe /quiet /v"INSTALLDIR=\"path""', shell=True) 
p = subprocess.Popen(r'path\file.exe /quiet TARGETDIR="path""') 

I am facing the same problem with powershell.

Any help is appreciated. enter image description here

0

3 Answers 3

3

Note: This answer does not solve joy's problem, but it should work for MSI-based (Windows Installer-based) installer executables created with Advanced Installer.


The Advanced Installer documentation indicates that APPDIR is the name of the property that for MSI-based executables you can override from the command line (untested):

Python:

p = subprocess.Popen(r'path\file.exe /quiet APPDIR="path"', shell=True) 

PowerShell, assuming you want to wait for the installation to finish:

Start-Process -Wait 'path\file.exe' '/quiet APPDIR="path"' 
Sign up to request clarification or add additional context in comments.

8 Comments

Thanks for the update, i tried setting APPDIR but it does not seem to work. later I came across this software Ultimate Silent Switch Finder using it i surprisingly found the packaging technology to be Self-Extracting Microsoft CAB archive not advance installer which i mistakenly took while comparing the switches.. and worst i cant seem to find the exact documentation regarding this . I have modified my question above including the exe driver i am working with -AccessDatabaseEngine_X64.exe
@joy, I've updated the answer to clarify that it only applies to MSI-based Advanced Installer executables, which may still be helpful to future readers. As for documentation: It is here, but it doesn't tell you much more than you already know. Have you experimented with /extract? I'm unclear on its exact purpose (temporary extraction location vs. installation dir.)
Thats great. As for the exact function of ` /extract` it seems to extract software update package, you might like to check here for clarification link. However i dont think any of the switches provided under the exe helps to change target directory.
Thanks for the link, @joy. So the answer may be that you simply cannot change the install directory at installation time. It may not be an option for you, but creating MSI-based executables instead could solve the problem.
My pleasure, @joy. Re symlink: I meant the other way around: create a symlink where the installer will try to write to, and hope that it uses that symlink and therefore causes the files copied there to be redirected to your custom location.
|
0

Switches are available according to installer software the product is built with. As an example, Puppet installer exe can be passed parameters via Powershell this way - you may be able to leverage this syntax with your installer.

 Start-Process -FilePath C:\temp\puppet-agent-x64-latest.msi -ArgumentList "/qn /norestart -L* c:\temp\mylog.txt" -wait 

3 Comments

thanks for the immediate answer, yes i tried the same syntax it worked for silent installation, but what i am looking for is to change the path/directory of installation.
As @mklement0 said, you need to set the value of the property APPDIR, just as you can see in his examples above.
@BogdanMitrache it did not work as the packaging technology seem to be Self-Extracting Microsoft CAB archive and not advance installer, i have updated my earlier question along with the exact driver i am working with.
0

There dosent seem to be any Target/path usable with AccessDatabaseEngine_X64.exe, the only workaround i found was to use /extract to get the msi out of the exe then use @mklement0 suggestion.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.