deploying registry keys

Topics: General Questions
Nov 22, 2010 at 3:00 PM

how to deploy registry keys in BTDF?

regards,

Amit

Coordinator
Nov 23, 2010 at 3:17 AM

One simple way if you're using BizTalk 2009 or newer (or if MSBuild 3.5 is installed and the Deployment Framework is using it to run the scripts) is the built-in MSBuild registry syntax:
http://blogs.msdn.com/b/msbuild/archive/2007/05/04/new-registry-syntax-in-msbuild-v3-5.aspx

You can also add a custom target to your .btdfproj named CustomDeployTarget or CustomPostDeployTarget (depending on when it should run) with an Exec task to call regedit.exe.  Or, you can use the SDCTasks (from CodePlex) MSBuild registry tasks, which the Deployment Framework already includes and makes available.

Thanks,
Tom

Nov 23, 2010 at 4:17 PM

what's wrong with this command,

    <Target Name="CustomPostDeployTarget">
        <Exec Command="regedit /s C:\Workspaces\amit.more\KBBInt\R1\Source\BizTalk\Core\Artefacts\Registry\MicrosoftBusinessRules.reg" />
    </Target>  

why its not working, if i typed same on command line its working then why not from Deployment framwork?

 

Coordinator
Nov 23, 2010 at 5:02 PM

Note: you can use a relative instead of explicit path.  The path will be relative to the Deployment project folder.

Please check your Output window after a deployment to verify that CustomPostDeployTarget appears somewhere in the MSBuild output.  Also, remove the /S and you should get dialogs and output from regedit.exe to help diagnose this.

Thanks,
Tom

Nov 23, 2010 at 6:03 PM

hi Tom,

i used relative path as well but no luck... like my reg file staying at Artefacts\Registry\MicrosoftBusinessRules.reg so i used <Exec Command="regedit /s ../../MicrosoftBusinessRules.reg/> but no luck

i tried without /s as well but it didn't ask anything like it ask when we used from command line. also i checked the output window it does not show any entry for CustomPostDeployTarget not even for .reg file. don't know what's going wrong.