10.02.2020»»понедельник

Installshield Exe Command Line Arguments

10.02.2020

In general, you can pass command line parameters through the InstallShield launcher program (setup.exe) to the MSI process (msiexec) by using the '/v' (lower case only) option for setup.exe. Everything after /v is passed to the msiexec command line. The entire string to be passed to msiexec should be in double quotes. After struggling with InstallShield automated setup and switches forever, the command I finally got working is: setup.exe /S /f1. Setup.iss The '. ' in the command line specifies that setup.exe should look for the setup.iss file in the current directory. MsiExec.exe Command-Line Parameters. InstallShield 2014. MsiExec.exe is the executable program of the Windows Installer used to interpret installation packages and install products on target systems. After you build your release, you can install your Windows Installer package (.msi) from the command line.

Active3 years, 6 months ago

I am using and InstallShield installer setup.exe file to silently install my app. Now I want to invoke setup.exe with some command line arguments. And that arguments should be available in a EXE custom action that I have created to be executed at success. How can I pass the data all over from command line while invoking the setup file and use it inside my exe. The exe is a console app written in C#.

A macule greaterthan 1 cm. It is flat, if you were to close your eyes andrun your fingers over the surface of a purely macular lesion, you could not detect it. Dermatology macule papule patch. MACULEA macule is a change in the color of the skin. Types of primary lesions are rarely specific to a single disease entity.1.

ShahzadShahzad
1,4891 gold badge8 silver badges19 bronze badges

1 Answer

Installshield Cmd

I understand this is an MSI-based project, and I assume the .exe custom action is deferred execution.

What you should do is this:

  1. In your installer, define some custom MSI properties which you need for the .exe (e.g. ServerName, ServerPort)
  2. Create a custom action of type 'Set a property'. The Property Name should be the name of your custom action which runs the exe (e.g. RunMyExe). The Property Value should be a concatenated list of your custom properties e.g. [ServerName];[ServerPort]. Make this custom action run after InstallInitialize.
  3. In your .exe custom action (RunMyExe), pass [CustomActionData] as the Command Line to your exe program
  4. Have your exe program get the command line, and split it in order to get the data it needs
  5. Invoke the setup.exe while setting those custom properties you defined in step 1, e.g. setup.exe /v'ServerName=test-srv ServerPort=67000'

What happens is that, on a deferred custom action you can't use exernal properties (such as those supplied from the command line), you can only access internal ones such as CustomActionData. The trick here is that, if a property with the action's name exists (RunMyExe in the example above), the internal CustomActionData property get its value from it.

yossiz74yossiz74
7251 gold badge7 silver badges14 bronze badges

Not the answer you're looking for? Browse other questions tagged windows-installercommand-line-argumentsinstallshieldcustom-actioninstallshield-le or ask your own question.

Active6 years, 5 months ago

I am creating a setup using InstallShield(Limited Edition) in VS2012. Firstly I created a setup file. I have some more things to do so I created a project and added its exe as a new custom action After Initialization(Before First Dialog).

Now I want to run this setup from command line and pass parameter(s) to it. I tried using %1 to take first parameter entered by command line but it is not working. Please tell how to pass parameters using command line and use it in exe file.

Christopher Painter
49.2k6 gold badges53 silver badges90 bronze badges
quitprogquitprog
2321 gold badge7 silver badges22 bronze badges

1 Answer

Unless I'm missing something, InstallShield Limited Edition doesn't support this.

From a Windows Installer perspective, what you are referring to is called a Secure Custom Public Property. (See: SecureCustomProperties property )

Consider the commandline:

msiexec /i foo.msi SERVERNAME=MyServer

Ofac for cuba. OFFICE OF FOREIGN ASSETS CONTROL Iranian Transactions and Sanctions Regulations 31 C.F.R. Part 560 GENERAL LICENSE H Authorizing Certain Transactions Relating to Foreign Entities Owned or Controlled by a United States Person (a)Except as provided in paragraph (c), an entity owned or controlled by a United States.

The fact that SERVERNAME is capitalized makes it public. The fact that it's listed in the SecureCustomProperties property would make it Secure. Only secure public properties work when UAC is taken into consideration. If the process is already elevated then it doesn't have to be secure but it really should be.

From the custom action side you'd used [SERVERNAME] to reference the value of the SERVERNAME property.

Then of course you'd likely want to customize the UI experience for when someone just runs the MSI but InstallShield limited edition doesn't support this.

I can think of ways of making it to work using WiX merge modules and/or applying transforms to the built MSI but all of this requires advanced MSI knowledge and it's generally easier to just upgrade to Professional.

Installshield Iscmdbld.exe Command Line Options

Christopher PainterChristopher Painter
49.2k6 gold badges53 silver badges90 bronze badges

Not the answer you're looking for? Browse other questions tagged visual-studio-2012installationinstallshield-le or ask your own question.