I'd have thought it depended on the e-mail client you were using, but given the warning, I suspect it needs to know what executable opens the attachment in order to apply the right icon or some such nonsense.
Look at the file you are trying to attach in Explorer. Right click on it and choose 'open with'. When you select the right executable from the list tick the box "always use this app to open XXX files" and OK it.
That should set the association, so you can then try to attach it again.