A Windows batch utility for troubleshooting common printer sharing issues on local networks.
π This project is designed to help reset and repair several Windows printer sharing components that are commonly involved in shared printer connection errors, spooler problems, RPC-related failures, and legacy network printing issues.
- Overview
- Supported Windows Versions
- Common Issues
- Features
- How It Works
- Fix Modes
- Download
- Usage
- Recommended Workflow
- Backup and Restore
- Logs
- Security Notes
- What This Tool Changes
- What This Tool Does Not Do
- Troubleshooting
- Known Limitations
- FAQ
- Contributing
- License
Windows printer sharing can fail for many different reasons. Some issues are caused by Windows updates, printer driver compatibility, RPC changes, Print Spooler failures, firewall rules, network discovery settings, SMB compatibility, or incorrect host/client configuration.
This script provides a menu-based troubleshooting utility that applies several known repair steps in a controlled way.
This project is intended to support the following Windows versions:
- Windows 7
- Windows 8 / 8.1
- Windows 10
- Windows 11
Windows 7 support is best-effort. Some commands and services differ between Windows 7 and newer versions. The script avoids using certain modern commands on older systems when possible.
This tool may help with problems such as:
- Shared printer cannot be accessed or connected.
- Printer sharing stopped working after a Windows update.
- Print Spooler service fails or becomes stuck.
- Shared printer does not appear on the network.
- RPC-related errors (
0x0000011b,0x00000709, etc.).
- Auto-Elevation (UAC): Automatically requests Administrator privileges via PowerShell if not already elevated.
- Point and Print Fix: Automates bypasses for
RestrictDriverInstallationToAdministratorsto allow driver installation from print servers. - Menu-Based Interface: Simple command-line menu for easy navigation.
- Print Spooler Reset: Stops/Starts service and clears queue files.
- RPC Compatibility: Applies registry values for modern Windows RPC sharing.
- Network Discovery: Configures
fdPHostandFDResPubservices. - Timestamped Backups: Each run creates a unique backup folder.
- State-Aware Restore: Reverts registry changes based on original state.
- Logging: Detailed logs saved to
printer_fix_log.txt.
The script combines several troubleshooting steps into a single workflow:
- UAC Elevation: Requests admin access if needed.
- OS Detection: Identifies Windows version and build.
- Mandatory Backup: Saves registry state before any modification.
- Service Reset: Clears spooler cache and resets services.
- Fix Application: Applies Point and Print, RPC, and permission fixes.
- Firewall Rules: Activates sharing rules across localized OS builds.
- Verification: Confirms results and writes to log.
Recommended first option. Applies safer repair steps including:
- Print Spooler & Queue Reset
- Point and Print Compatibility
- RPC Privacy & Named Pipe fixes
- Firewall & Network Discovery configuration
Intended for persistent problems or older systems. Includes everything in Quick Fix plus:
- SMBv1 feature enablement (DISM)
- Insecure guest authentication
- LAN Manager & Blank password compatibility
Download the latest version: FixPrinter.bat
git clone https://github.com/man612/Windows-Printer-Sharing-Fix.git- Run
FixPrinter.bat(It will automatically request Admin access). - Choose Quick Fix (Option 1) from the menu.
- Restart Windows after the repair finishes and test the printer.
For best results, identify the Printer Host (the PC sharing the printer). Run the script on the host first, then on the client if connection issues persist.
Registry changes are backed up to the backups\ folder. The Restore function can revert managed keys or delete keys that were not present before the fix was applied.
All actions are logged to printer_fix_log.txt, including warnings and failures. This file is essential for troubleshooting if the script does not fully resolve the problem.
The script separates safe fixes from classic fixes. Classic / Full Fix may reduce security by enabling older protocols like SMBv1. Only use classic mode on trusted networks.
π οΈ System Modifications (Click to expand)
- Services: Print Spooler, Server, Workstation, fdPHost, FDResPub.
- Point and Print:
RestrictDriverInstallationToAdministrators,BypassUpdateRoleIndicator. - Folders: Spooler queue (
PRINTERS), server cache (SERVERS), and drivers. - Firewall: File and Printer Sharing rules.
- Registry: Print service, providers, RPC, LSA, and SMB compatibility.
- Install or download printer drivers.
- Repair corrupted Windows system files.
- Fix hardware or router issues.
- Fix domain/Group Policy restrictions.
π§ Detailed Error Guide (Click to expand)
- 0x0000011b: Often fixed by RPC compatibility settings in Quick Fix.
- Access is Denied: Check credentials, network profile, and guest access.
- Spooler Fails to Start: Check for corrupted drivers in Print Management.
This issue is usually not caused by this script. If the browser fails to download any file, the problem is likely related to the Windows Attachment Manager or Microsoft Defender integration.
Before changing registry values, try:
- Update Microsoft Defender security intelligence.
- Restart Windows.
- Check Windows Security protection history.
- Try another browser.
If downloads still fail, the following commands may help reset the attachment scanning policy:
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Attachments" /v ScanWithAntiVirus /t REG_DWORD /d 1 /f
reg add "HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\Attachments" /v ScanWithAntiVirus /t REG_DWORD /d 1 /f
gpupdate /forceRestart Windows after running the commands. Note: This does not mean the downloaded file is automatically safe. Keep real-time protection enabled and only download files from trusted sources.
- Driver Compatibility: The script cannot fix incompatible 32/64-bit drivers.
- Modified Windows: "Lite" or custom ISOs may be missing required services.
- Group Policy: Domain settings may override local registry changes.
π€ Common Questions (Click to expand)
- Is this a guaranteed fix? No, results depend on many external factors.
- Host or Client? Start with the computer sharing the printer (Host).
- Is it safe? Quick Fix is designed for standard safety; Classic Fix is for older setups.
- Can I undo the changes? Yes, via the Restore option in the menu.
Contributions are welcome! Please report bugs or submit pull requests while maintaining the simple batch script style.
Distributed under the MIT License. See the LICENSE file for details.