![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
|
Welcome to Vista Forums we are your forum to discuss Windows Vista x64 and x86 systems. Whether you need help or just want to post an idea you have on Vista, this is the forum for you.
br> br> |
| |||||||
![]() |
| | Thread Tools | Display Modes |
| | #1 (permalink) |
| Guest | Using EXE Switches in Powershell Hi, How do you invoke an exe with a certain switch in powershell? It doesnt seem to like it the way i am doing it. My current way is simply Setup.exe /loadinf=InstallSettings.inf /silent However, when i run this, it says "Please go to the control panel to install system components." Please Help! Jason |
My System Specs![]() |
| | #2 (permalink) | ||||||||||||
| Guest | Re: Using EXE Switches in Powershell Hi The switches looks fine to me. It seems that the msg you're getting is generated by the setup.exe file. IMO, check if the values supplied by the InstallSettings.inf are valid. What are you trying to install? ----- Shay Levi $cript Fanatic http://scriptolog.blogspot.com Hebrew weblog: http://blogs.microsoft.co.il/blogs/scriptfanatic
| ||||||||||||
My System Specs![]() | |||||||||||||
| | #3 (permalink) | ||||||||||||||||||||||||
| Guest | Re: Using EXE Switches in Powershell Shay, i figured out what the problem was. Perhaps you'll understand this. i had to write it like this & "Setup.exe" /loadinf=InstallSettings.inf /silent "Shay Levi" wrote:
| ||||||||||||||||||||||||
My System Specs![]() | |||||||||||||||||||||||||
| | #4 (permalink) | ||||||||||||||||||||||||||||||||||||
| Guest | Re: Using EXE Switches in Powershell Well... I should have mention it, "&" (function call operator) is used to invoke expressions/commands, like the invoke-expression cmdlet. ----- Shay Levi $cript Fanatic http://scriptolog.blogspot.com Hebrew weblog: http://blogs.microsoft.co.il/blogs/scriptfanatic
| ||||||||||||||||||||||||||||||||||||
My System Specs![]() | |||||||||||||||||||||||||||||||||||||
| | #5 (permalink) | ||||||||||||||||||||||||||||||||||||
| Guest | Re: Using EXE Switches in Powershell So the & part indicates to PS that the script will be passing in a cmd and that it shouldnt try to use built-in commands? "Shay Levi" wrote:
| ||||||||||||||||||||||||||||||||||||
My System Specs![]() | |||||||||||||||||||||||||||||||||||||
| | #6 (permalink) | ||||||||||||||||||||||||||||||||||||
| Guest | Re: Using EXE Switches in Powershell Basically, it tells PS to execute the command, like the old DOS command (CALL) Keith has written on it in his "Effective PowerShell" posts series, I can't explain it better, check it out: Effective PowerShell Item 10: Understanding PowerShell Parsing Modes http://keithhill.spaces.live.com/blo...A97!6058.entry ----- Shay Levi $cript Fanatic http://scriptolog.blogspot.com Hebrew weblog: http://blogs.microsoft.co.il/blogs/scriptfanatic
| ||||||||||||||||||||||||||||||||||||
My System Specs![]() | |||||||||||||||||||||||||||||||||||||
| | #7 (permalink) | ||||||||||||||||||||||||||||||||||||
| Guest | Re: Using EXE Switches in Powershell The call operator (&) is required if you are running a command that is not in a folder that is part of the path environment variable. If setup.exe was in a folder that was part of the path environment variable, the call operator would not have been necessary. -- Kirk Munro [MVP] Poshoholic http://poshoholic.com "greatbarrier86" <greatbarrier86@xxxxxx> wrote in message news:34CEE1C5-71A1-4CBD-AFD5-D0347E8C75FF@xxxxxx
| ||||||||||||||||||||||||||||||||||||
My System Specs![]() | |||||||||||||||||||||||||||||||||||||
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Alt-Tab switches between two windows only | yesim | Vista General | 1 | 07-27-2008 09:08 AM |
| Re: Switches | Jason Gurtz | VB Script | 1 | 05-23-2008 08:28 PM |
| Using switches in powershell to go to a specific location | greatbarrier86 | PowerShell | 2 | 05-01-2008 11:13 PM |
| VGA switches | Magpie501 | Vista hardware & devices | 4 | 12-02-2007 05:35 PM |
| Connection switches to Local Only? | Kangarookidd | Vista networking & sharing | 1 | 03-08-2007 01:27 PM |