I'm sorry about the issue. Where does it say Ad-Hoc Mode, on the printer's screen, or on the computer's screen?
Are you trying to set up the printer with a USB cable connecting from the printer to the computer? Or are you trying set up wireless printing?
Is this a new printer or new computer or was it working previously?
What is the brand / model of your Internet/wireless modem/router device?
Can we do a remote support session, so I can troubleshoot the issue directly on your computer together with you?
Please reply at the box below. Thank you,