The fix here is to create some custom action and execute the custom action as part of the install/uninstall sequence. See the custom action screen snapshot below.
Here we set the value for APPDIR property pointing to D drive if the condition D_DRIVE holds true. The INSTALL_DIR property is set in the Install parameters tab as shown below.
Last but not the least is defining the D_DRIVE condition.
Following the above steps should enable you to install on D drive or for that matter any drive (if it exists) by default.