Author Posts

August 1, 2018 at 11:57 am


I'm currently downloading and installing the vlc player silently:

When i run the following, all is fine.

Invoke-WebRequest -Uri "https://www.vlcwebsite.." -OutFile "c:\support\vlc-3.0.3-win64.exe"
& "c:\support\vlc*.exe" /L=1031 /S

I want to change the outfile to read c:\support\vlc.exe or something similar because the version of the vlc player will change.

If I run the following, the file gets downloaded but nothing happens with the install.

Invoke-WebRequest -Uri "https://www.vlcwebsite.." -OutFile "c:\support\vlc.exe"
& "c:\support\vlc.exe" /L=1031 /S

Does anyone know what would be the best way to approach this, is the problem the outfile?


August 1, 2018 at 1:53 pm

This doesn't work?

c:\support\vlc.exe /L=1031 /S

August 1, 2018 at 2:03 pm

Unfortunately not. If I run the c:\support\vlc.exe /L=1031 without the /S switch, it pops up the installer. If I run this, c:\support\vlc.exe /L=1031 /S, nothing seems to happen.

Is there a way to be non-specific about the outfile, could I use a -like switch?
I just don't know how to deal with the change in the vlc.exe name from the website.

Thanks for the support.

August 1, 2018 at 3:35 pm

Try using Start-Process instead and pass your switches as part of the ArgumentList:

Start-Process -FilePath "C:\Support\vlc.exe" -ArgumentList '/L=1031','/S' -NoNewWindow

August 2, 2018 at 6:57 am

Hi Joel,

Thanks for that, that helped me a lot.