none
powershell application install switch issue RRS feed

  • Question

  • Below is the script porition I am having a issue with, I have been making many modifications and trying new things to make it work. From a batch file or command line run the exe with switchs stated work without a issue but in powershell it is not working and the install never happens. Any help on how to make the switchs work correctly will be appreciated.

    $EMAgentArray = (/s /v"FEATURE=BLM CM_EDITION=1 SERVERHOST=esse.domain.com SERVERPORT=8888 SECURITYSERVERHOST=esse.domain.com SECURITYSERVERPORT=8443 ARPSYSTEMCOMPONENT=1 /norestart /qn")
    $EMAgent_64 = (Start-Process -Filepath "EMAgent_64bit_setup.exe" -WorkingDirectory "\\Networkshare\Software\Dell\ESSE\Endpoint-Security-Suite-Ent-2.2.0.3\Encryption Management Agent\" -Arguementlist $EMAgentArray) 

    Any additional troubleshooting suggestions would also be appreciated
    Wednesday, March 6, 2019 2:19 PM

Answers

  • This is how to do an args list:

    $EMAgentArray = @(
        '/s /v /norestart /qn',
        'FEATURE=BLM CM_EDITION=1',
        'SERVERHOST=esse.domain.com',
        'SERVERPORT=8888',
        'SECURITYSERVERHOST=esse.domain.com',
        'SECURITYSERVERPORT=8443',
        'ARPSYSTEMCOMPONENT=1'
    )
    


    \_(ツ)_/

    Wednesday, March 6, 2019 3:08 PM
  • Thanks, I have tried the following (Below) and it is not running silently and not fully completing. I know the /v switch is passing parameters to MSI package.

    is the issue because the /s switch is used by install shield while the others are used by msiexec?

    $EMAgentArray = @(
        '/s /V, /norestart /qn'
        'FEATURE=BLM CM_EDITION=1',
        'SERVERHOST=esse.domain.com',
        'SERVERPORT=8888',
        'SECURITYSERVERHOST=esse.domain.com',
        'SECURITYSERVERPORT=8443',
        'ARPSYSTEMCOMPONENT=1'
    )
    $EMAgent_64 = (Start-Process -Filepath "EMAgent_64bit_setup.exe" -WorkingDirectory "\\networkshare\Software\Dell\ESSE\Endpoint-Security-Suite-Ent-2.2.0.3\Encryption Management Agent\" -Argumentlist "$EMAgentArray")
    $EMAgent_64

    Wednesday, March 6, 2019 3:29 PM
  • If it is not fully installing hat has nothing to do with the script.

    Are you running this at a prompt?

    Do not and never do place quotes around variables passed as command line arguments:

    Use the following method at a command prompt.

    $arglist = @(
        '/s /v /norestart /qn',
        'FEATURE=BLM CM_EDITION=1',
        'SERVERHOST=esse.domain.com',
        'SERVERPORT=8888',
        'SECURITYSERVERHOST=esse.domain.com',
        'SECURITYSERVERPORT=8443',
        'ARPSYSTEMCOMPONENT=1'
    )
    Start-Process -Filepath EMAgent_64bit_setup.exe -Argumentlist $arglist -WorkingDirectory '\\networkshare\Software\Dell\ESSE\Endpoint-Security-Suite-Ent-2.2.0.3\Encryption Management Agent'
    


    \_(ツ)_/

    Wednesday, March 6, 2019 3:34 PM
  • Here is what we are doing with Start-Process: https://stackoverflow.com/questions/3898021/regarding-mainint-argc-char-argv

    The CmdLet passes the args list to the system and then to the program.  All needs ffor quotes and saces are removed as the system manages this correctly.   A CMD prompt may need quotes.  The ArgumentsList parameter does not when passed as an array.


    \_(ツ)_/

    Wednesday, March 6, 2019 3:39 PM
  • That is between you and the vendor.  Look in the MSI log as a starter.  You will have to add the log switches.


    \_(ツ)_/

    Wednesday, March 6, 2019 3:54 PM
  • ok thnks
    Wednesday, March 6, 2019 3:56 PM
  • You can also try it like this which may avoid issues with some versions of IS:

    $arglist = @(
        '/s /v /norestart /qn',
        'FEATURE=BLM CM_EDITION=1 SERVERHOST=esse.domain.com SERVERPORT=8888 SECURITYSERVERHOST=esse.domain.com SECURITYSERVERPORT=8443 ARPSYSTEMCOMPONENT=1'
    )
    Start-Process -Filepath EMAgent_64bit_setup.exe -Argumentlist $arglist -WorkingDirectory '\\networkshare\Software\Dell\ESSE\Endpoint-Security-Suite-Ent-2.2.0.3\Encryption Management Agent'
    


    \_(ツ)_/

    Wednesday, March 6, 2019 3:57 PM

All replies

  • The /v switch is suppose to be passing the information over into the msiexec program and this is where the issue keeps happening.
    Wednesday, March 6, 2019 2:42 PM
  • This is how to do an args list:

    $EMAgentArray = @(
        '/s /v /norestart /qn',
        'FEATURE=BLM CM_EDITION=1',
        'SERVERHOST=esse.domain.com',
        'SERVERPORT=8888',
        'SECURITYSERVERHOST=esse.domain.com',
        'SECURITYSERVERPORT=8443',
        'ARPSYSTEMCOMPONENT=1'
    )
    


    \_(ツ)_/

    Wednesday, March 6, 2019 3:08 PM
  • Thanks, I have tried the following (Below) and it is not running silently and not fully completing. I know the /v switch is passing parameters to MSI package.

    is the issue because the /s switch is used by install shield while the others are used by msiexec?

    $EMAgentArray = @(
        '/s /V, /norestart /qn'
        'FEATURE=BLM CM_EDITION=1',
        'SERVERHOST=esse.domain.com',
        'SERVERPORT=8888',
        'SECURITYSERVERHOST=esse.domain.com',
        'SECURITYSERVERPORT=8443',
        'ARPSYSTEMCOMPONENT=1'
    )
    $EMAgent_64 = (Start-Process -Filepath "EMAgent_64bit_setup.exe" -WorkingDirectory "\\networkshare\Software\Dell\ESSE\Endpoint-Security-Suite-Ent-2.2.0.3\Encryption Management Agent\" -Argumentlist "$EMAgentArray")
    $EMAgent_64

    Wednesday, March 6, 2019 3:29 PM
  • If it is not fully installing hat has nothing to do with the script.

    Are you running this at a prompt?

    Do not and never do place quotes around variables passed as command line arguments:

    Use the following method at a command prompt.

    $arglist = @(
        '/s /v /norestart /qn',
        'FEATURE=BLM CM_EDITION=1',
        'SERVERHOST=esse.domain.com',
        'SERVERPORT=8888',
        'SECURITYSERVERHOST=esse.domain.com',
        'SECURITYSERVERPORT=8443',
        'ARPSYSTEMCOMPONENT=1'
    )
    Start-Process -Filepath EMAgent_64bit_setup.exe -Argumentlist $arglist -WorkingDirectory '\\networkshare\Software\Dell\ESSE\Endpoint-Security-Suite-Ent-2.2.0.3\Encryption Management Agent'
    


    \_(ツ)_/

    Wednesday, March 6, 2019 3:34 PM
  • Here is what we are doing with Start-Process: https://stackoverflow.com/questions/3898021/regarding-mainint-argc-char-argv

    The CmdLet passes the args list to the system and then to the program.  All needs ffor quotes and saces are removed as the system manages this correctly.   A CMD prompt may need quotes.  The ArgumentsList parameter does not when passed as an array.


    \_(ツ)_/

    Wednesday, March 6, 2019 3:39 PM
  • I ran the exe with the switches in powershell and dos command line and it went through without an issue. Based on the information I pulled form the site below it is not properly passing the installsheild items into the msiexec program.

    https://www.ibm.com/support/knowledgecenter/en/SSEQ5Y_12.0.0/com.ibm.pcomm.doc/books/html/install_guide12.htm

    As a single line I can run it without a issue, when I try to script it it fails

    Wednesday, March 6, 2019 3:50 PM
  • That is between you and the vendor.  Look in the MSI log as a starter.  You will have to add the log switches.


    \_(ツ)_/

    Wednesday, March 6, 2019 3:54 PM
  • ok thnks
    Wednesday, March 6, 2019 3:56 PM
  • You can also try it like this which may avoid issues with some versions of IS:

    $arglist = @(
        '/s /v /norestart /qn',
        'FEATURE=BLM CM_EDITION=1 SERVERHOST=esse.domain.com SERVERPORT=8888 SECURITYSERVERHOST=esse.domain.com SECURITYSERVERPORT=8443 ARPSYSTEMCOMPONENT=1'
    )
    Start-Process -Filepath EMAgent_64bit_setup.exe -Argumentlist $arglist -WorkingDirectory '\\networkshare\Software\Dell\ESSE\Endpoint-Security-Suite-Ent-2.2.0.3\Encryption Management Agent'
    


    \_(ツ)_/

    Wednesday, March 6, 2019 3:57 PM
  • It did not help but thanks for the input I am currently driving with the input.
    Wednesday, March 6, 2019 4:19 PM
  • Thanks, I have tried the following (Below) and it is not running silently and not fully completing. I know the /v switch is passing parameters to MSI package.

    is the issue because the /s switch is used by install shield while the others are used by msiexec?

    $EMAgentArray = @(
        '/s /V, /norestart /qn'
        'FEATURE=BLM CM_EDITION=1',
        'SERVERHOST=esse.domain.com',
        'SERVERPORT=8888',
        'SECURITYSERVERHOST=esse.domain.com',
        'SECURITYSERVERPORT=8443',
        'ARPSYSTEMCOMPONENT=1'
    )
    $EMAgent_64 = (Start-Process -Filepath "EMAgent_64bit_setup.exe" -WorkingDirectory "\\networkshare\Software\Dell\ESSE\Endpoint-Security-Suite-Ent-2.2.0.3\Encryption Management Agent\" -Argumentlist "$EMAgentArray")
    $EMAgent_64

    You have added an extra character in this code.

    '/s /V, /norestart /qn'  <<<<---- notice the comma.

    You cannot add commas to the command line. 


    \_(ツ)_/

    Wednesday, March 6, 2019 4:31 PM
  • I have gotten rid of the comma and the issue still persists I will continue to work on it and hopefully I can get the vendor invovled
    Wednesday, March 6, 2019 4:44 PM
  • Just an update, I used the array setup below from a network location and it appears to have worked.

    $EMAgentArray = @(
        '/s /V"FEATURE=BLM CM_EDITION=1 VSERVERHOST=esse.domain.com VSERVERPORT=8888 VSECURITYSERVERHOST=esse.domain.com VSECURITYSERVERPORT=8443 VARPSYSTEMCOMPONENT=1 /norestart /qn"'
    )
    It appears I needed to add the V to a lot more areas

    Wednesday, March 6, 2019 5:36 PM
  • Then that is a capita V and is required by the vendors package.  It is not the verbose switch.

    I posted that solution above a while ago.


    \_(ツ)_/

    Wednesday, March 6, 2019 5:39 PM