\n Hi, and welcome to the PowerShell forum! \n\n\nDon’t apologize for being a “noob” or “newbie” or “n00b.” There’s just no need – nobody will think you’re stupid, and the forums are all about asking questions. Just ask! \n\n\nUse a descriptive subject. Don’t say “Need help” or “PowerShell Help”, actually summarize what the problem is. It helps the rest of us keep track of which problem is which. \n\n\nDon’t post massive scripts. We’re all volunteers and we don’t have time to read all that, nor will we copy…\n <\/blockquote>\n<\/aside>\n\n
<\/p>","upvoteCount":0,"datePublished":"2019-08-08T13:30:43.000Z","url":"https://community.spiceworks.com/t/run-msiexec-from-powershell-with-argument/724675/2","author":{"@type":"Person","name":"Neally","url":"https://community.spiceworks.com/u/Neally"}},{"@type":"Answer","text":"
You don’t need to escape the question marks. You can use single and double quotes.<\/p>\n
Start-Process -FilePath \"$env:systemroot\\system32\\msiexec.exe\" -ArgumentList '/i \"c:/spi-setup/Antivirus/SecurepointAntivirusPro_x64_de.msi\" TID=\"KundenID\" ACCEPTLICENSEAGREEMENT=\"y\" ACCEPTPRIVACYPOLICY=\"yes\" /n /passive /l:c:/spi-setup/Antivirus/setuplog.txt' -Wait \n<\/code><\/pre>","upvoteCount":0,"datePublished":"2019-08-08T13:39:52.000Z","url":"https://community.spiceworks.com/t/run-msiexec-from-powershell-with-argument/724675/3","author":{"@type":"Person","name":"Evan7191","url":"https://community.spiceworks.com/u/Evan7191"}},{"@type":"Answer","text":"Unfortunately that did not help, I edited the post<\/p>","upvoteCount":0,"datePublished":"2019-08-08T14:19:24.000Z","url":"https://community.spiceworks.com/t/run-msiexec-from-powershell-with-argument/724675/4","author":{"@type":"Person","name":"is-km","url":"https://community.spiceworks.com/u/is-km"}},{"@type":"Answer","text":"
That message means that one or more of the parameters is incorrect. Usually the general parameters go before the parameters that are specific to the installation package.<\/p>\n
Have you tried this?<\/p>\n
Start-Process -FilePath \"$env:systemroot\\system32\\msiexec.exe\" -ArgumentList '/i \"c:/spi-setup/Antivirus/SecurepointAntivirusPro_x64_de.msi\" /qn /l:c:\\spi-setup\\Antivirus\\setuplog.txt TID=\"KundenID\" ACCEPTLICENSEAGREEMENT=\"y\" ACCEPTPRIVACYPOLICY=\"yes\"' -Wait\n<\/code><\/pre>","upvoteCount":0,"datePublished":"2019-08-08T15:02:56.000Z","url":"https://community.spiceworks.com/t/run-msiexec-from-powershell-with-argument/724675/5","author":{"@type":"Person","name":"Evan7191","url":"https://community.spiceworks.com/u/Evan7191"}},{"@type":"Answer","text":"Unfortunately, there is also the popup<\/p>","upvoteCount":0,"datePublished":"2019-08-08T15:10:00.000Z","url":"https://community.spiceworks.com/t/run-msiexec-from-powershell-with-argument/724675/6","author":{"@type":"Person","name":"is-km","url":"https://community.spiceworks.com/u/is-km"}},{"@type":"Answer","text":"
maybe try to spell the parameter out in an argument list like this<\/p>\n
$Arguments = @(\n \"/i\"\n \"/qn\"\n \"/norestart\"\n \"/L*v\"\n)\nStart-Process \"msiexec.exe\" -ArgumentList $Arguments -Wait -NoNewWindow \n<\/code><\/pre>","upvoteCount":2,"datePublished":"2019-08-08T15:13:23.000Z","url":"https://community.spiceworks.com/t/run-msiexec-from-powershell-with-argument/724675/7","author":{"@type":"Person","name":"Neally","url":"https://community.spiceworks.com/u/Neally"}},{"@type":"Answer","text":"It might be that it is looking for an array of arguments. I might also try single quotes inside instead of escaping the double quotes.<\/p>","upvoteCount":0,"datePublished":"2019-08-08T16:08:48.000Z","url":"https://community.spiceworks.com/t/run-msiexec-from-powershell-with-argument/724675/8","author":{"@type":"Person","name":"alex3031","url":"https://community.spiceworks.com/u/alex3031"}},{"@type":"Answer","text":"
From the message that’s coming up it looks to either have a switch (option) set that is either invalid or being read incorrectly. Here is the steps I would take to solve this issue.<\/p>\n
\n- Use a normal command line (cmd) interface to run the command without the powershell bits. Just to make sure that command works the way you are expecting it to.<\/li>\n
- Try chunking the entire argument list like so<\/li>\n<\/ol>\n
Start-Process -FilePath \"$env:systemroot\\system32\\msiexec.exe\" -ArgumentList '/i \"c:/spi-setup/Antivirus/SecurepointAntivirusPro_x64_de.msi\" TID=\"KundenID\" ACCEPTLICENSEAGREEMENT=\"y\" ACCEPTPRIVACYPOLICY=\"yes\" /n /passive /l:c:/spi-setup/Antivirus/setuplog.txt' -Wait \n<\/code><\/pre>\nI don’t know if that will work for you or not, but at least it will show you where the problem is.<\/p>","upvoteCount":1,"datePublished":"2019-08-08T16:49:03.000Z","url":"https://community.spiceworks.com/t/run-msiexec-from-powershell-with-argument/724675/9","author":{"@type":"Person","name":"mparrish2","url":"https://community.spiceworks.com/u/mparrish2"}},{"@type":"Answer","text":"
Have you tried running it without any quiet/passive parameters to see if it installs properly? If that still doesn’t work, one of the custom parameters may be causing the issue.<\/p>\n
Start-Process -FilePath \"$env:systemroot\\system32\\msiexec.exe\" -ArgumentList '/i \"c:/spi-setup/Antivirus/SecurepointAntivirusPro_x64_de.msi\" TID=\"KundenID\" ACCEPTLICENSEAGREEMENT=\"y\" ACCEPTPRIVACYPOLICY=\"yes\"' -Wait\n<\/code><\/pre>","upvoteCount":0,"datePublished":"2019-08-08T17:02:40.000Z","url":"https://community.spiceworks.com/t/run-msiexec-from-powershell-with-argument/724675/10","author":{"@type":"Person","name":"Evan7191","url":"https://community.spiceworks.com/u/Evan7191"}},{"@type":"Answer","text":"This should work:<\/p>\n
Start-Process -FilePath \"$env:systemroot\\system32\\msiexec.exe\" -ArgumentList '/i', 'C:\\Spi-Setup\\Antivirus\\SecurepointAntivirusPro_x64_de.msi', '/qn', '/l', 'c:\\spi-setup\\Antivirus\\setuplog.txt', 'TID=\"KundenID\"', 'ACCEPTLICENSEAGREEMENT=\"yes\"', 'ACCEPTPRIVACYPOLICY=\"yes\"' -Wait -NoNewWindow\n<\/code><\/pre>","upvoteCount":0,"datePublished":"2019-08-12T10:08:07.000Z","url":"https://community.spiceworks.com/t/run-msiexec-from-powershell-with-argument/724675/11","author":{"@type":"Person","name":"ef-laser","url":"https://community.spiceworks.com/u/ef-laser"}}]}}