This project has moved and is read-only. For the latest updates, please go here.

Pass Application Pool username and password as parameters to msi

Topics: IIS and Web Services
Apr 13, 2012 at 9:04 AM

Hi there,

Is there a way in which to pass the application pool username and password as parameters to the msi file? I would like to do a completely silent install but cannot seem to get this to work. Your help would be much appreciated.



Apr 13, 2012 at 11:14 PM

VDIR_UserName and VDIR_UserPass, set into environment variables or pass to MSBuild command line as properties (/p:VDIR_UserName=user).


Apr 15, 2012 at 6:49 AM

Hi Tom,

Thanks for your reply.

This worked perfectly. What I did was include the <propsFromEnvSettings include="VDIR_Username, VDIR_UserPass"/> setting in the btdf proj and specify these values in the SettingsFileGenerator.xml.




May 14, 2012 at 9:25 PM

Anyone nows how to pass an empty password? (we are using Networkservice as the AppPool identity)

If I leave empty the settings files it throws an error.The "ConfigureAppPool" task was not given a value for the required parameter "Password".




May 15, 2012 at 4:50 AM

Sorry, it's not possible without customization.  Have you tried giving it a password even though Network Service doesn't need it?  You can override virtually anything, so if you want to reimplement the entire DeployVDirs target, you can copy it from the BTDF targets file and paste it into your .btdfproj.  Your copy will override the existing one.  You could then call any MSBuild task that you like, or just call a VBScript or command line utility to do what you need.


Apr 19, 2013 at 5:13 PM
Edited Apr 19, 2013 at 6:24 PM
In our environment we have already established the application pools, with provided passwords on the servers. This is pre-staged by the Windows Server Team. it is against our policy to deploy credential information, in the manner the BTDF currently employs. For our purpose it would work to point to pre-existing application pools, without a need to enter credential information. ,, or if that is not possible, we could arrange to create a dummy application pool account, which is deleted following the deployment. And incorporate as a post-task, to repoint the web to the custom app pool. We've been told that the BTDF is currently unable to be pointed to already existing application pools?
Apr 29, 2013 at 6:58 AM
It can be pointed to existing AppPools, but it will always modify the AppPool's Identity. In v5.0 the deployment on a server always assumes that a username and password will be provided to configure the AppPool identity. I created an issue for v5.1 that will make that step conditional on the presence of a value in both $(VDIR_UserName) and $(VDIR_UserPass), so if you don't provide either one there will not be an error and the AppPool identity will be untouched.

In the meantime, your only options are to point to a dummy account as you described, then reassign the vdir's app pool later on, OR to override or modify the default DeployVDirs target. The former option is probably best until v5.1 is available. You can use the following task in a custom target to reassign the vdir:
    <AssignVirtualDirectoryToAppPool MetabasePath="$(IISMetabasePath)" VDirName="MyVDir" AppPoolName="TheAppPool" />