header1   header
header
header Register : : Login header
header
connector   connector
menuleft menuright
submenu   submenu
left
passing comand options to an installer
Last Post 23 Sep 2010 10:58 AM by rnicolson. 2 Replies.
Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
rnicolsonUser is Offline
New Member
New Member
Posts:2
Avatar

--
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 HowarthUser is Offline
    Basic Member
    Basic Member
    Posts:360
    Avatar

    --
    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
    rnicolsonUser is Offline
    New Member
    New Member
    Posts:2
    Avatar

    --
    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.


    Active Forums 4.3
    right
    footer   footer
    footer Sponsored by Quest Software • SAPIEN Technologies • Compellent • Microsoft Windows Server 2008 R2 footer
    footer   footer