Hello there lcastor050, Welcome to the forums.
I understand you are unable to download the drivers for your Deskjet 2540 as the installation stalls on you. I am going to post you a link to the drivers and software download page. You will need to select your operating system and then download the driver from there.
HP Deskjet 2540 All-in-One Printer Drivers
If this doesn't work, please respond to me with your operating system and I will look into this some more for you.
Which Windows operating system am I running?
Mac OS X: How Do I Find Which Mac OS X Version Is on My Computer?
Take care,