tag:blogger.com,1999:blog-4684874465987951601.post1606555538763095372..comments2024-03-27T23:30:46.579-07:00Comments on Chaminda's DevOps Journey with MSFT: TFS - Lab Build - Deployment Script - Copy Build Output Zip to Lab Env. Machine and ExtractChaminda Chandrasekarahttp://www.blogger.com/profile/10785099125374685765noreply@blogger.comBlogger3125tag:blogger.com,1999:blog-4684874465987951601.post-29543740947928165712014-02-06T17:42:33.824-08:002014-02-06T17:42:33.824-08:00Was able to publish to remote server both exe and ...Was able to publish to remote server both exe and ps file but exe is not getting executed.<br /><br />Can you zip and emai be xaml temlate to do this.<br /><br />vi2psn@yahoo.comAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-4684874465987951601.post-37557705947414569892014-02-05T20:30:36.966-08:002014-02-05T20:30:36.966-08:00Make sure your exe is attached to a prject in your...Make sure your exe is attached to a prject in your solutions and it is always copied to output (In the properties widow of VS for the .exe set "Copy to Output Directory" to "Copy always") .<br /><br />Then use code similar to below code segment in a powershell script. My script here execute an exe to intiate a Dynamics CRM customization deployment and log the output of exe (console.writeline) to the build output.<br /><br />"------------------------------------------"<br />"Deployment to CRM --> $CRMUrl"<br />"------------------------------------------"<br />#Create Command Path<br />$CrmCommanFile = join-path $DeployFolder "CrmCommandLineUtilities.exe"<br /><br />"Importing Unmanaged Solutions $CRMSolutions"<br />"------------------------------------------"<br />& $CrmCommanFile /O:$CRMUrl /U:$UName /P:$Pwd /C:I /S:$CRMSolutions /F:$ImportFiles /L:$DeployFolder /T:$CRMTimeOut | Out-Host<br />if ($lastexitcode -ne 0)<br /> {write-error "Execution failed for $CrmCommanFile /O:$CRMUrl /U:$UName /P:$Pwd /C:I /S:$CRMSolutions /F:$ImportFiles /L:$DeployFolder /T:$CRMTimeOut"}<br /><br />"------------------------------------------"<br />"Deployment to CRM completed"<br />"------------------------------------------"<br />Chaminda Chandrasekarahttps://www.blogger.com/profile/10785099125374685765noreply@blogger.comtag:blogger.com,1999:blog-4684874465987951601.post-44578065687859736892014-02-05T19:27:27.199-08:002014-02-05T19:27:27.199-08:00Hi Chaminda im trying to execute exe on remote ser...Hi Chaminda im trying to execute exe on remote server using build defination how can i do that please emil me vi2psn@yahoo.comAnonymousnoreply@blogger.com