Using Windows as a SMB File Server

Edited

1. Prepare Windows for file sharing

1.1 Set network to Private and enable sharing

  • Open Settings → Network & Internet → Status → Properties and set Network profile to Private so other devices can find the PC.

  • Open Control Panel → Network and Sharing Center → Change advanced sharing settings.

    • Under Private:

      • Turn on Network discovery.

      • Turn on File and printer sharing.

1.2 Create the shared folder

  • Create the folder for sharing, e.g. C:\Shared.

  • Right‑click C:\SharedProperties → Sharing → Advanced Sharing.

    • Tick Share this folder.

    • Set a simple Share name (e.g. Shared).

    • Click Permissions.

  • In Permissions:

    • Remove Everyone if you do not want anonymous access.

    • Click Add and grant Read / Change / Full Control to specific users or groups that should access the share.

Tip: Align NTFS permissions (Security tab) with share permissions so users have exactly the rights you intend.


2. Keep the Windows PC awake (no sleep/hibernate)

To make the SMB host reliable, prevent it from sleeping or hibernating while clients are using it.

2.1 Power plan – disable sleep/hibernate on AC

  1. Open Control Panel → Hardware and Sound → Power Options.

  2. Next to your active plan, click Change plan settings.

  3. Set Put the computer to sleep to Never for Plugged in (and for On battery if it is a laptop used as a server).

  4. Click Change advanced power settings:

    • Expand Sleep and set:

      • Sleep after = 0 (Never) for Plugged in.

      • Hibernate after = 0 (Never) for Plugged in.

    • Click OK.

2.2 Prevent NIC power‑saving from dropping connections

  1. Right‑click Start → Device Manager.

  2. Expand Network adapters, right‑click your Ethernet adapter → Properties.

  3. On the Power Management tab, uncheck:

    • Allow the computer to turn off this device to save power.

  4. Click OK.

This stops Windows from powering down the network card and killing SMB connections during idle periods.


3. Recommended SMB protocol and locking settings

  • Leave SMB2/3 enabled and keep SMB1 disabled unless you absolutely must support an old device; SMB1 is not installed or is disabled by default on modern Windows because of security risks.

  • For GA‑TaxPro multi‑user environments, disable opportunistic locking (oplocks) on the SMB2/3 share by setting the share’s LeasingMode to None via PowerShell. Follow the step‑by‑step instructions in this article:

  • Ensure Windows Defender Firewall allows File and Printer Sharing on the Private profile. For better security, restrict the SMB‑in firewall rule to known LAN IP ranges or specific client IPs.


4. Map C:\Shared as letter drive (eg. Z:) for all users

This section makes C:\Shared appear as drive Z: on the host itself for every user, using a persistent registry‑based mapping.​

4.1 Create the persistent DOSDevices mapping

  1. Sign in with an administrator account on the host.

  2. Press Win+R, type regedit, press Enter.

  3. Navigate to:
    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\DOS Devices

  4. In the right pane, right‑click → New → String Value.

  5. Name the value exactly:
    Z:

  6. Double‑click Z: and set Value data to:
    \??\C:\Shared\

    • Include the \??\ prefix.

    • Keep the trailing backslash after the folder path.​

  7. Close Registry Editor and restart Windows.

After reboot:

  • Z: appears in File Explorer and in the command line for all users.

  • Z: is just a virtual drive pointing to C:\Shared, and it persists across reboots without any login script.​

Note: The SMB share itself still points to the real path (C:\Shared), not to Z:. Remote clients connect to \\YourPC\Shared as usual.​


5. Connect from other computers

On each client (Windows 10/11):

  • Press Win+R and enter:
    \\YOURPCNAME\Shared
    and press Enter.​

  • Or map a network drive:

    • Open File Explorer → This PC → Map network drive.

    • Choose a drive letter (e.g. Z:).

    • Folder: \\YOURPCNAME\Shared.

    • Tick Reconnect at sign-in and click Finish.

    • Enter credentials if prompted (match a local user on the host PC).