How to find options available when installing an application using Installshield - command-line

I am trying to install Perforce Helix using Chef. Install file is an .exe file with 4 options available to install. I want to install 3 of them excluding one. Is there a way to identify which option to provide to it from command line. Currently I am able to install package in silent mode and with default settings using
installer_type :custom
options %W[
/s
/v/qn
].join(' ')
Any help is appreciated.

Thanks guys, I got the solution. I first installed the application and then removed P4ADMIN from it:
`installer_type :custom
options %W[
/s
/v"ADDLOCAL=ALL REMOVE=P4ADMIN /qn"
].join(' ')`

Related

Install software using command prompt start command with target directory

I am trying to install software using command prompt using below command
start /wait /d "C:\abc" C:\Users\abc.exe /silent /norestart
I want to install software in c:\abc folder but it is installing in the software default directory. Is there any way to install it into the custom directory using the start command or are there any other alternatives to install the software on the target directory.
SHORT VERSION:
This may be the most "accessible" and "quick" explanation for your particular case: http://unattended.sourceforge.net/installers.php
If you are dealing with an MSI file, you should use the admin install feature to extract all the installation files first and then customize your install by setting public properties or utilizing a transform to configure the install. Details here: How to make better use of MSI files.
See the link towards the bottom to find a list of different parameters you can use for different types of setup.exe files.
DETAILS:
A setup.exe file can be "anything". It can be an old, legacy Installshield or Wise installer, a modern Windows Installer file (MSI) embedded in a setup.exe launcher, an Inno setup file (non MSI), an embedded Advanced Installer MSI setup, a compressed and self-extracting zip file, a unique and custom made installer (proprietary), or any number of other technologies, the list goes on and on and on - it is impossible to tell what tool or technology was used to create your setup.exe from the information supplied.
Just for reference, let's link to installsite.org's information on different setup technologies and available tools. Most likely your setup.exe is made using one of these tools:
Non-MSI installer tools: http://www.installsite.org/pages/en/tt_nonmsi.htm
Windows installer tools: http://www.installsite.org/pages/en/msi/authoring.htm
This may also be of help: Wix - How to run/install application without UI.
The point is, naturally, that every, different technology has its own way to enable silent installation and to customize installation parameters. So the first step for you is to determine what this file really is. Right click the file, select properties and check the details tab for any clues. Or just run the setup.exe interactively and see what the window title is (top window title bar). It will generally indicate what tool was used to create the setup.exe.
Rather than rewriting it all, and since it is a stackoverflow link (unlikely to be removed), I will just link to a similar answer on how to install setup.exe files silently: How can I use powershell to run through an installer?. See the "some links" section for links to documentation for various tools.

How to Install an NSIS Executable Silently For All Users

I have an NSIS installer executable which I would like to install silently for all users. I know I can pass the /S argument to do a silent install. The problem is that the default option for the installer is to install only for the current user. How can I change this option from the command line:
installer.exe /S
NSIS itself just supports /S, /NCRC and /D=c:\override\default\installdir\, everything else is up the author.
If the custom page from your screenshot was created with MultiUser.nsh and the author defined MULTIUSER_INSTALLMODE_COMMANDLINE then you could use installer.exe /AllUsers /S, otherwise you have to ask the author of the installer if they are checking for a specific command line switch.
If it turns out there is no way to do it then you would have to look into UI automation...
It turns out that for this particular installer you can pass:
/ALLUSERS=1
ALLUSERS is a standard MSI property. I did not find any documentation for this property in NSIS, so it looks like the developers of this particular installer added this.

Installing a driver (.inf) file from command line

I am working in Windows 8.1.
I need to install a driver file (.inf file) from command line. Which command do I need to use?
I know I have many other method for installing a .inf file, but I must install this from command line.
Please help me
Thanks in advance...
Granger's comment works in Windows 7 too. According to MS, PnPUtil (PnPUtil.exe) is included in every version of Windows, starting with Windows Vista.
It is useful for device drivers that do not have default install (right-click "Install" does not work for them).
pnputil -i -a <driverinf>
The default way for device drivers is:
pnputil -i -a <driverinf>
Legacy Drivers canĀ“t be installed with pnputil and have to use LaunchINFSectionEx-Call
I tested the following and it works with several drivers from Windows 2000 up to Windows 10, 2012R2, 2016, 2019.
rundll32.exe advpack.dll,LaunchINFSectionEx ykmd.inf,Yubico64_Install.NT,,4,N
Pay attention to use the correct section
The correct section of the inf-File must be used, when there is no [DefaultInstall]-Section. This lacks in most answers. Look it up in your drivers inf-File and use the correct section (in my example "Yubico64_Install.NT"). Using the wrong section wont prompt an error. Im my example I use Quiet mode, no UI (4) and Never reboot (N) to install the driver automated via GPO. All options are documented in detail here:
https://learn.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/platform-apis/aa768006(v%3Dvs.85)
There are many variants ... and many complications with newer versions of Windows.
But for starters, try something like this:
rundll32.exe advpack.dll,LaunchINFSectionEx myinf.inf,,c:\temp\mydata.cab,36
http://www.msfn.org/board/topic/104891-how-can-i-install-a-inf-file-from-the-command-line/
http://msdn.microsoft.com/en-us/library/aa768006%28v=vs.85%29.aspx
Programmatic driver install via .inf causing reboot
Note: beware older links that suggest "setupapi" instead of "advpack". You definitely want advpack.dll.

Uninstall from command-line using installshield

Is there any way of being able to force through an uninstall rather than an upgrade on InstallSheild?
I currently have a Setup.exe and a MSI file
but everyime I attemp the uninstall using the pre-recorded ISS if my install is older than the current version it first upgrades and If I run the same file again then it uninstalls,
now im wondering if there is a way where I could force it to uninsatll --- this is what I have currently
...\setup.exe" /x /s /f1C:\Remove.iss
Instead of using the setup.exe you've built, why not use the one cached on the machine? Check the Uninstall key for details (like path) and you might still be able to mix in your /s /f1C:\Remove.iss if the removal pages are similar enough.

Unattended install of ilmerge

I'm trying to setup a large number of build agents and so far i can install all the dependencies silently (using powershell, nuget and chocolatey).
However i cannot install the tool IlMerge without the damn GUI popping up.
Ive tried all the usual msiexec switches and they are just ignored. does anyone know of a way of getting this tool on a box in an unattended way?
Or should i just repack the thing in zip/msi?
This is on windows server 2008 R2
If i run
Invoke-Expression "msiexec $installerPath\ilmerge.msi /passive"
I still get a security dialog.
Currently i'm just thinking ill do this:
Copy-Item x:\installs\ilmerge.exe "C:\Program Files (x86)\ILMerge"
seeing as its only one file.
Below worked for me, no security dialogs.
cp ILMerge.msi \\Server\admin$
winrs -r:Server ILMerge.msi /passive
dir "\\Server\C$\Program Files (x86)\Microsoft\ILMerge"
With chocolatey you would have just needed to specify -ia '/quiet' as the package was not silent by default. This was specified by the tag notSilent and it was also in the description (http://chocolatey.org/packages/ilmerge/2.11.1103.1).
The latest package is just the executable, so you can just install it. http://chocolatey.org/packages/ilmerge