0

I want to start a setup.exe with one install parameter => /download example.xml

When I tpye in "C:\Temp\folder\setup.exe /download example.xml" in Windows Explorer Address Bar the setup.exe starts correctly.

How do I do that with Powershell?

I've tried the following:

$setup="C:\Temp\folder\setup.exe "
$Argument = "/download example.xml"

Start-Process $setup -ArgumentList $Argument

What am I doing wrong?

Thanks!

user18209625
  • 139
  • 2
  • 15

1 Answers1

1

I think it wants a list of arguments. This might do the job

$setup="C:\Temp\folder\setup.exe "
$ArgumentLst = @("/download example.xml")

Start-Process $setup -ArgumentList $ArgumentLst
Neil Gatenby
  • 419
  • 6
  • 21