Specify Domain/User Id in the btdf config file for silent BTDF Deployment

Topics: General Questions
Jun 7, 2013 at 2:07 PM
Hi Tom

When i try to double click on the MSI and deploy it asks me the domain account name and after giving that it deploys successfully. Is there a way i can specify this in the .btdf config file itself like I have specified the Environmentsettings file path by using the tag "DeveloperPreProcessSettings" in the .btdf config file. please help.

Jun 7, 2013 at 5:42 PM
Hi Keshav,

Yes, look in your InstallWizard.xml and see what environment var name is being used for that setting. Add a row to the settings spreadsheet with the same name and the username values in the environment columns. Now also add the same name to the PropsFromEnvSettings ItemGroup (semicolon-delimited) in your .btdfproj. That will populate the same value directly from the chosen settings file.

Also, the DeveloperPreProcessSettings property is necessary only if you are changing the default filename.

Jun 10, 2013 at 6:34 AM
Hi Tom

The environment variable name in the InstallWizard.xml is "BTSAccount". I created a new row in the settingsgenerator.xml file for BTS Account and gave my <domainname\UserId> as the default values under all the 3 columns(exported_dev setting, exported_testsetting, exported_prodsettings). I added the entry in the .btdf config file for BTS Account as below.

<PropsFromEnvSettings Include="SsoAppUserGroup;SsoAppAdminGroup;BTSAccount" />

Hope this is correct. Now as per the modified settings file generator, a value of BTSAccount should get added in the exported_devsettings.xml file everytime a "Queue Build" is done, right? Its not happening. I am manually adding the value in exported_devsettings.xml file, which should not be the case, right? What am i missing out?

Is there a way i can remove the "Domain account name" prompt in the deploy wizard while deploying the MSI? Since if i have already given the value in the settings file it doesnt look ok to again prompt in the deploy wizard. Is that correct?
Jun 10, 2013 at 7:58 AM

Delete from InstallWizard.xml the SetEnvUIConfigItem element associated with that setting. There is no reason to export the settings during a build or during an automated deployment. The deployment process itself will export the settings XML files when required.

That said, when you do see the exported settings XML files, they should all contain a value for the BTSAccount setting assuming that you provided one in the spreadsheet. Make sure that it works locally in Visual Studio before trying a TFS build. If you are not seeing it locally either, try running EnvironmentSettingsExporter.exe manually to double-check. You can copy and paste the command line from the Output window into a Command Prompt and double-check the paths.

Jun 10, 2013 at 8:45 AM
Edited Jun 10, 2013 at 9:14 AM
Hi Tom

I tried running the exporter.exe locally and the xml files are getting created with the new environment variable. Thank you.

I have actually given 2 tags in the .btdf proj file. one is "DeveloperPreProcessSettings" and the second one is "SettingsFilePath". I commented the "DeveloperPreProcessSettings" file i didnt get any error but when i commented the "SettingFilePath" i got an error. Earlier i never used to give this tag explicitly.
Have i changed anything in the original settings??

I have commented the below tag in the Installwizard.xml to avoid seeing in the deploy wizard.

<PromptText>Select the XML file that contains configuration information specific to this environment:</PromptText>

Is it because of commenting the above tag, do i have to give "SettingsFilePath" tag in .btdf proj file???
Jun 10, 2013 at 1:22 PM

Can you please confirm for the last time for the question that i have asked? Thank you
Jun 10, 2013 at 3:33 PM
Yes. If you do not want to prompt for the settings file path, then you probably need to provide a different value for each of your environments. You can use SettingsFilePath either explicitly in the .btdfproj or pass it to MSBuild as a property from the command line.