Issue utilizing Deploy-Application.exe

//Issue utilizing Deploy-Application.exe
Issue utilizing Deploy-Application.exe 2018-03-27T22:32:34+00:00

The Toolkit Forums General Issue utilizing Deploy-Application.exe

  • Author
  • Jason
    Post count: 1

    Hey all,

    Searched for this, so this must just be me missing something extremely unfortunate.

    Where the code breaks

    ## &lt;Perform Installation tasks here&gt;
    		$AginityPath = &#039;.\Files\AginityNetezzaWorkbenchSetupx64.exe&#039;
    		$NZODBCPath = &#039;.\files\nzodbcsetup.exe&#039;
    		$NZOLEDBPath = &#039;.\Files\nzoledbsetup64.exe&#039;
    		Execute-Process -Path $AginityPath -Parameters &quot;/s ACCEPTEULA=TRUE ALLUSERS=FALSE&quot;

    Checking the log I get the following error

    [Installation] :: Function failed, setting exit code to [60002]. 
    Error Record:
    Message        : The term &#039;.\Files\AginityNetezzaWorkbenchSetupx64.exe&#039; is not recognized as the name of a cmdlet, 
                     function, script file, or operable program. Check the spelling of the name, or if a path was 
                     included, verify that the path is correct and try again.
    InnerException : 
    FullyQualifiedErrorId : CommandNotFoundException,Microsoft.PowerShell.Commands.GetCommandCommand
    ScriptStackTrace      : at Execute-Process&lt;Process&gt;, C:\App\Netezza\Toolkit\AppDeployToolkit\AppDeployToolkitMain.ps1: 
                            line 2803
                            at &lt;ScriptBlock&gt;, C:\App\Netezza\Toolkit\Deploy-Application.ps1: line 144
                            at &lt;ScriptBlock&gt;, &lt;No file&gt;: line 1
                            at &lt;ScriptBlock&gt;, &lt;No file&gt;: line 1
    PositionMessage : At C:\App\Netezza\Toolkit\AppDeployToolkit\AppDeployToolkitMain.ps1:2803 char:35
                      + ... ifiedPath = Get-Command -Name $Path -CommandType &#039;Application&#039; -Total ...
                      +                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    	Execute-Process	3/27/2018 6:22:54 PM	12532 (0x30F4)

    So it seems to be trying to take my Path variable I set and running that as a command. I have tried just putting the raw path into the the path argument, with no avail, I have tried single and double quotes, I have tried praying directly to Jeffrey Snover but my prayers are unanswered.

    The part that really makes me confused is when I run the .ps1 file, the installation goes through properly, and I verified everything properly is installed and configured as I lay out further along in my script. Any advice is appreciated. I’ve been scratching my head over this simple issue all day.

  • Brian
    Post count: 6

    Replace .\Files with $dirFiles
    Use double quotes

You must be logged in to reply to this topic.