Windows · Connectivity
0x00000040

Windows error 0x00000040 - the specified network name is no longer available

The connection to the computer sharing the printer was dropped or refused, so Windows can no longer reach the queue by name. It generally points at SMB networking rather than printing itself. The printer might be fine while the path to it has gone.

Moderate Windows 11Windows 10Shared printers on a home or office network

What causes it

  • The host computer went to sleep, was renamed, or changed IP address
  • SMBv1 is disabled on the client while the host only offers SMBv1 sharing
  • Network profile changed to Public, blocking file and printer sharing
  • Antivirus or firewall software is filtering SMB traffic between the machines
  • Wi-Fi power saving is dropping the connection between print jobs

How to fix it, in order

Work down the list and stop when the printer recovers. The steps are ordered from most likely and least invasive to last resort.

  1. Confirm the host is awake and reachable

    On the machine sharing the printer, disable sleep temporarily under Settings › System › Power & battery. Then from your PC open File Explorer and type \\hostname in the address bar. If the share does not open, printing cannot work either and this is a networking problem, not a printer problem.

  2. Set both machines to a Private network profile

    On each PC open Settings › Network & internet, click the active connection, and set Network profile type to Private. File and printer sharing is blocked on Public profiles by design, and a profile that flipped after a router change is a frequent cause.

  3. Turn on file and printer sharing

    On the host, open Control Panel › Network and Sharing Center › Change advanced sharing settings and enable Network discovery and File and printer sharing for the Private profile. Without the sharing component enabled, the queue is advertised but not actually served.

  4. Reconnect using the host's IP address

    Instead of \\hostname\printer, try \\192.168.x.x\printer using the host's current IP. If the IP works and the name does not, you have a name resolution problem, which you can settle permanently by reserving the host's address in the router.

  5. Restart the spooler on both machines

    Press Windows+R, type services.msc, press Enter and restart Print Spooler on the client and the host. A half-open session on either side keeps returning this code until the service reloads.

  6. Disable Wi-Fi power saving on the host

    Open Device Manager, expand Network adapters, double-click the Wi-Fi adapter, open Power Management and clear Allow the computer to turn off this device to save power. A host that keeps dropping off Wi-Fi produces exactly this intermittent failure.

  7. Bypass the share and connect to the printer directly

    If the printer has its own network connection, add it by IP through Settings › Bluetooth & devices › Printers & scanners › Add device › Add manually › Add a printer using an IP address or hostname. This removes the host PC from the equation and stops sleep on that machine breaking your printing.

  8. Check security software

    Third-party firewalls often block SMB between devices on the same network. Temporarily disable the firewall component on the host, test, then re-enable it and add an explicit rule for file and printer sharing rather than leaving it off.

Stopping it happening again

When it is not worth fixing yourself

If you would rather not work through this alone, a printer specialist can take a look with you on a screen-share and tell you honestly whether the machine is worth saving.

Frequently asked questions

Should I re-enable SMBv1 to fix this?

Avoid it. SMBv1 is insecure and disabled for good reason; upgrade or replace the device that requires it, or connect to the printer directly by IP.

Why does it work sometimes and fail other times?

Usually because the host PC is sleeping or its Wi-Fi adapter is powering down. The share only exists while that machine is awake.

Does renaming the host break printing?

Yes. Any queue pointing at the old name must be removed and re-added under the new one.

Questions & comments (0)

No comments yet. Describe your printer model, operating system and the exact message you see; comments appear after review.

Ask about this page

Your comment appears after our team approves it. Or sign in to post faster.