Run .msi installation with empty spaces in its name and (x64) suffix at the end

Welcome Forums General PowerShell Q&A Run .msi installation with empty spaces in its name and (x64) suffix at the end

Viewing 1 reply thread
  • Author
    Posts
    • #213249
      Participant
      Topics: 6
      Replies: 5
      Points: 82
      Rank: Member

      Hi,

       

      I run many times .exe files installation with this command and this is SUCCESSFUL.

      Example:

      Invoke-Expression “& $DOWNLOAD_PATH\TestSetup.exe $params | Out-Null”
      So DOWNLOAD_PATH variable is certainly correctly set, and this .exe file is within it. And everything is OK (I have some params which I am sedning along with installation – I have that also in following .msi example)
      But not I have file which is named (renaming of this file is not possible please remember that, but I think that this name is causing the issue) :
      SUN TEST 2020.1 (x64).msi
      So now I am trying to run installation with same approach like for .exe file but it fails!
      Invoke-Expression “& $DOWNLOAD_PATH\SUN TEST 2020.1 (x64).msi $params | Out-Null”
      Error is following:
      x64: The term ‘x64’ 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.
      Why does it fail? I am running it in the same manner like for all my other installations?
      Please assist, I tried couple of approaches how to define this installation path but they are all failing.
      As mentioned I am not allowed to modify of course installation name.
      It seems to me that this is because of this installation name, which is causing the problem
    • #213288
      Participant
      Topics: 12
      Replies: 524
      Points: 1,220
      Helping Hand
      Rank: Community Hero
      Invoke-Expression “& '$DOWNLOAD_PATH' '$params' | Out-Null”
      
Viewing 1 reply thread
  • You must be logged in to reply to this topic.