views:

670

answers:

1

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.

A: 

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

Kevin