How to install msi on remote machine from msbuild using Psexec?

How to install msi on remote machine in msbuild without using psexec?

  • I have searched all the custom tasks in Extension Pack and Community Tasks and finally found a task called Msi.Istall in SDC Tasks. But the documentation is bad and causes problems. I get errors regarding the properties passed to the installer. Below is my Install target : `<Target Name="Install"> <!-- Copy the MSI package into remote pc. --> <!--<CreateItem Include="\\grpdev1\Sharing\Build Script\Server Applications\**\*.*"> <Output ItemName="Source" TaskParameter="Include"/> </CreateItem> <Copy SourceFiles="@(Source)" DestinationFolder="\\lta0\c$\TestRemoteInstall\%(Source.RecursiveDir)"/>--> Seems like it looks at my own local pc to install it and says the product is already installed and needs to be removed. How else do i specify the remote machine? Any ideas where I am going wrong? I have also been asked not to use psexec tool or intermediate scripts.. Looking to install directly from msbuild task.

  • Answer:

    I had a similar issue... It's not the best solution, but I needed something in a hurry... I set up a scheduled task on the remote machine which launches a batch file. The batch file uninstalls and reinstalls my msi package. From my build machine, the scheduled task is called during the build using schtasks.exe. I have an exec task in my targets file like the following: <Exec Command="schtasks /Run /S SERVER /U USERNAME /P PASSWORD /TN SCHEDULETASK" /> schtasks.exe should be located as part of the OS in system32. Kevin Spence

TS. at Stack Overflow Visit the source

Was this solution helpful to you?

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.