Thank you for the additional information.
This is a difficult decision to make. If you don't disclose what happened previously, if it is on record and discovered, you will most likely not get the job. There is no way to know if it's on file or not.
However, if it isn't in the records, and you disclose it, you may or may NOT get the job. It will depend on company policy and also on the hiring manager.
Personally, I would opt for disclosing that I had applied in the past. They might not ask anything further, but if they do check the records they will know you were honest. Whether or not you should explain the entire situation is also something you need to decide.
If you only say you applied, and don't say anything about the drug test, you risk them discovering it and thinking you were not honest. If you DO tell all, depending on the decision maker, they may be willing to accept your explanation or NOT.
So, what do you do? You could simply say that, yes, you applied quite a few years ago, and there were issues regarding a drug test. However, I wouldn't let it go with that . . . this is when I would explain that you were young and foolish at that time, and you know they understand the mistakes people make at times. You could also go on to say that you were never heavily into drugs at all, and that you briefly "experimented" with marijuana (only if that is how it was, of course). Although there is some risk in doing this, I think it is your best option. Most companies, and people, value honesty.
I hope this helps a bit more, but please let me know if you have more questions or want to talk about this further.