Faced some troubles while installing TMG and wanted to share the Experience.
Setup failed to install ADAM. r n (0x80074e46)
By analyzing the Log files found in %windir%tempISAADAM_INSTALL_XXX
This refers to communication issue between the TMG Server and AD.
To TS this, you may need to review the connection Trust with the AD using nltest command;
Also check for the Connections Binding; as the AD facing interface should come first.
If this does not work, it might not be related to connectivity with AD either Trust with DC. This might be for some Policies restrictions. To troubleshoot this you need to disjoin the Server from the Domain, Install the TMG and when success, you may re-join the domain.