I think it's more appropriate for $mircdir to return the directory of the mIRC settings. There's not really any need to know the directory the program is in as far as I can see, but if you need to you can use $nofile($mircexe)