Register
: :
Login
Home
News
Forums
Scripts
User Groups
Resources
About
Forums
Search
Members
Unanswered
Active Topics
Forums
>
Using PowerShell
>
General PowerShell
passing comand options to an installer
Last Post 23 Sep 2010 10:58 AM by
rnicolson
. 2 Replies.
Sort:
Oldest First
Most Recent First
Prev
Next
You are not authorized to post a reply.
Author
Messages
rnicolson
New Member
Posts:2
22 Sep 2010 09:55 AM
I am trying to install applications using powershell that require command options be passed to them. Normally this does not seem to be a problem however one I am working with is not running for me.
$InstallFile = "\\server\public\Windows\application_setup.exe"
$InstallOptions = "/VERYSILENT /LOADINF=\\server\public\Windows\Setup.ini"
& $InstallFile $InstallOptions | Out-Null
It generally will take one option or the other depending on which is first, but fails to take both. I have done this with single and double quotes and get the same problem both ways.
George Howarth
Basic Member
Posts:360
22 Sep 2010 11:03 AM
Try using Start-Process:
$file = "\\server\public\Windows\application_setup.exe"
$arguments = "/VERYSILENT /LOADINF=\\server\public\Windows\Setup.ini"
Start-Process -FilePath $file -ArgumentList $arguments -Wait
rnicolson
New Member
Posts:2
23 Sep 2010 10:58 AM
Thanks for the reply. This seems to suffer from the same problem. Since your solution seems to work the same way mine did I did a little more research and testing and am noticing that the problem even occurs at the command line so this is not a problem with PowerShell but with the syntax of the command itself. When I use a location such a c:\temp\setup.ini it works fine. It also works fine when pointing to a mapped drive. It just does not work when using the UNC path in the LOADINF= statement. I will copy the ini file to a local drive using the script and call it from the local path. Again thanks for your help.
You are not authorized to post a reply.
Using PowerShell
--General PowerShell
--Active Directory
--Exchange Server
--Lync Server
--SharePoint
--SQL Server
--System Center
--Non-Microsoft Products
--Books, Tools, and Videos
--Working with .NET
--Peer Review
--Testing, Testing...
PowerShell Development
--Cmdlet Development
--PSDrive Provider Development
--Hosting the Shell
Looking Ahead
--Using PowerShell v2.0
--Developing for PowerShell v2.0
PowerShellCommunity.org
--Community Announcements and Assistance
--Completely Unrelated
--User Groups
--Community Business
----Suggestion Box
Forums
>
Using PowerShell
>
General PowerShell
Active Forums 4.3
Sponsored by Quest Software • SAPIEN Technologies • Compellent • Microsoft Windows Server 2008 R2