Windows Vista Forums
Vista Forums Home Join Vista Forums Donate Vista Tutorials Tags

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.
Register at Vista forums...the world biggest Windows Vista resource Join Vista Forums Now

Go Back   Vista Forums > Microsoft Technical Newsgroups > PowerShell

Using EXE Switches in Powershell

Update your Vista Drivers Update Your Drivers Now!!
Closed Thread
 
Thread Tools Display Modes
Old 01-10-2008   #1 (permalink)
greatbarrier86
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 SpecsSystem Spec
Old 01-10-2008   #2 (permalink)
Shay Levi
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


Quote:

> 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 SpecsSystem Spec
Old 01-10-2008   #3 (permalink)
greatbarrier86
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:
Quote:

>
> 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
>
>
>
Quote:

> > 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 SpecsSystem Spec
Old 01-10-2008   #4 (permalink)
Shay Levi
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


Quote:

> 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:
>
Quote:

>> 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
Quote:

>>> 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 SpecsSystem Spec
Old 01-10-2008   #5 (permalink)
greatbarrier86
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:
Quote:

> 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
>
>
>
Quote:

> > 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:
> >
Quote:

> >> 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
> >>> 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 SpecsSystem Spec
Old 01-10-2008   #6 (permalink)
Shay Levi
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


Quote:

> 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:
>
Quote:

>> 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
Quote:

>>> 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:
>>>
>>>> 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
>>>>> 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 SpecsSystem Spec
Old 01-10-2008   #7 (permalink)
Kirk Munro [MVP]
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
Quote:

> 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:
>
Quote:

>>
>> 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
>>
>>
>>
Quote:

>> > 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 SpecsSystem Spec
Closed Thread

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


Vistax64.com is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media 2005-2008

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51