I have no D drive but keil is giving Error: can't execute 'D:\Keil\C51\BIN\A51.EXE'
Have you just copied the installation from a PC which did have a D: drive ... ?
Yes
So why are you surprised that this happens?
As is normal for any software, you need to follow the proper installation procedure - you can't just copy it from one PC to another!