Running arguements for exe applications in powershell

T@llyH@wk 21 Reputation points
2022-05-02T21:48:52.297+00:00

Hello. I've been trying various arguments to install an .exe application silently and nothing seems to work. Would you have any suggestions on how I'd solve this?
I'm trying to have the .exe install silently and also fill in all the answers that would normally pop up through the user interface by .iss file. However, I've never gotten the .iss to fill in the questions nor to get the application to run silently. I don't mind letting you know the application is called Respondus4Campus.exe. I'm currently trying variations of the below line. This is also my first time using .iss file. Thank you for any help or direction.

start-process -FilePath "c:\temp\Respondus4Campus.exe" -verb RunAs /S /f1"C:\temp\setup.iss" /f2"C:\temp\my-log-file.iss"

Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
5,455 questions
0 comments No comments
{count} votes

Accepted answer
  1. MotoX80 32,736 Reputation points
    2022-05-02T23:49:48.803+00:00

    In some respects, a Powershell prompt is no different from a command prompt. If you need UAC elevation to generate an ISS file, launch Powershell with "Run as administrator".

    And you really don't need Start-Process, just run the program like you would in a command prompt.

    c:\temp\Respondus4Campus.exe /S /f1"C:\temp\setup.iss" /f2"C:\temp\my-log-file.iss"
    

    If it doesn't generate the iss file then you will need to contact the software vendor to ask for help. That's not something that we could help you with.

    0 comments No comments

2 additional answers

Sort by: Most helpful
  1. Limitless Technology 39,496 Reputation points
    2022-05-04T07:39:38.45+00:00

    Hi TllyHwk-8380,

    If your application uses a standard installshield exe, there are two ways in which you can create an InstallShield Silent response file: you can run the installation and have InstallShield record and create the response file for you, or you can write the response file directly.

    Recording a Response File

    You have the option of letting InstallShield create the response file for you. Simply run your installation with the Setup.exe -r command-line parameter. InstallShield will record all your installation choices in Setup.iss and place the file in the Windows folder.

    All InstallShield built-in and Sd dialog functions are designed to write values into the Setup.iss file when InstallShield runs in record mode (Setup -r). If you are creating custom dialogs, you will need to call SdMakeName and SilentWriteData to add sections and dialog data to the response file when the installation runs in record mode. Refer to the Sd dialogs' source code in the <InstallShield location>\Include folder for examples of using these functions to write to Setup.iss. Read the following section for more information about what data to add to Setup.iss when calling SdMakeName and SilentWriteData.

    Manually Creating a Response File

    You can also create the response file completely by hand. As mentioned, the Setup.iss file is similar to an .ini file. The sections of an InstallShield response file must be in the following order:

    1. Silent Header Section
    2. Application Header Section
    3. Dialog Sequence Section
    4. Dialog Data Sections (one per dialog)
      Section names are contained in square brackets, as in [InstallShield Silent].

    Data entries follow their section names and consist of <name=value> pairs, as in the following example:

    Dlg0={23EAFFCA-361D-11D3-8B0F-00105A9846E9}-Welcome-0


    --If the reply is helpful, please Upvote and Accept as answer--

    0 comments No comments

  2. T@llyH@wk 21 Reputation points
    2022-05-05T14:35:25.383+00:00

    The above didn't work but thank you all for your help as it got me close enough to get one line that worked.

    start-process -filepath "C:\temp\Respondus4Campus.exe" -wait -verb RunAs -ArgumentList '/s /f1"C:\temp\setup.iss"'

    0 comments No comments