1

I am trying to automatically install SharePoint 2013 and for this I have to install a MSI file with PowerShell but it returns an error when I execute it.

This is the error message:

Error: This command cannot be run due to the error: No application is associated with the specified file for this operation.

Here is the command I'm trying to execute..

Start-Process -FilePath C:\SharePoint_V2\SQL Shared Features\SQLSysClrTypes.msi -ArgumentList /qn /quiet /norestart /l* C:\temp\SQLCLR.log -WorkingDirectory C:\SharePoint_V2\SQL Shared Features\ -verb runAs -Wait;

This is what I've tried/checked:

  • I can install the msi manually (so there is an application associated with the specified file)
  • the default program to open an msi file is set to Windows Installer
  • script is been run as administrator

I have been searching for a solution for a couple of hours now and I'm out of ideas.

1 Answer 1

2

I would call msiexec directly and include the /I-switch (that's an i and not L) in the argumentlist. (Check msiexec /? on the command line for full options)

In your case it would be something like the example below. Please take note to the double quotes around the full argumentlist.

Start-Process -FilePath "C:\Windows\System32\msiexec.exe" -ArgumentList "/I C:\SharePoint_V2\SQL Shared Features\SQLSysClrTypes.msi /qn /quiet /norestart /l* C:\temp\SQLCLR.log" -WorkingDirectory C:\SharePoint_V2\SQL Shared Features\ -verb runAs -Wait;
Sign up to request clarification or add additional context in comments.

1 Comment

Thanks. With a few tweaks I was able to make it work. I still had a few errors due to the fact that I was trying to concatenate within the Start-Process. Final result: Start-Process -FilePath "C:\Windows\System32\msiexec.exe" -ArgumentList $SQLCLRArgumentList -WorkingDirectory $SharedFeaturesPath -verb runAs -Wait;

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.