Im trying to imaging your situation
I think that your wireless adapter just work when its near the ap becasuse when you put the desktop where it belongs it must be down the desk with no line of sigh or anything so the wireless adapter has to through the metal of the desktop the metal or wood of the where the end user sits... and i balive thats the issue..
And it works with a laptop because it has better line of sigh...you can do the test but using the dlink adapter on a laptop that you know it works... turn off the wifi and use just the wireless adapter and see if it has the same issue where you put the laptop, which should be over the desk not under the desk that most of the desktop are.
Cheers
Carlos