Coder Social home page Coder Social logo

nicobucodiguito / win32spl-swapper-tool Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 375 KB

Simple utility written in PowerShell to "solve" the problem of network shared printers not working or not connecting in Windows 10. Works by swapping the win32spl.dll with an included one. For more info read the README.md.

Batchfile 16.45% PowerShell 83.55%
powershell-script printers windows-10

win32spl-swapper-tool's Introduction

Win32Spl.dll swapper for the Shared Printers not working problem

Info

Simple utility written in PowerShell to "solve" the problem of network shared printers not working or not connecting in Windows 10.

This "problem" seems to be caused by a security patch (it may be KB5006670, it may also be KB5005652, or KB5005613, or even KB5005565, I don't really know the original patch that caused this) for Windows 10 released somewhere in 2021. Patches were meant to fix the PrintNightmare vulnerabilities that put your printer and the network it was connected to in risk.

This script's purpose is to fix this problem by reverting the win32spl.dll (Windows Spooler Dll) to one before all these updates were released. It is meant as an extreme solution since reverting this .dll could make your printer and PC or network vulnerable again. The problem is that many places don't have another alternative other than sharing printers, either due to economical means, infrastructure problems or something else, so this is offered as a solution in those cases.

  • Please note that there could be other fixes, more simple ones that just require changing a value on the registry or removing security patches, look around in the internet and you may find a simpler solution, but since none of those seemed to work for my case and this was the only thing that worked every time, this tool was made.

    Remember: You can always check the scripts by yourself to see what they do.

How to use

  • (Optional) First execute Allow_PowerShell_Scripts.bat as an Adminstrator. This first script allows the system to run PowerShell scripts without all security warnings that stop scripts from running. The script is super simple, and is not really necessary, you could open your PowerShell and do the same with the Set-ExecutionPolicy to modify this manually, but this is made more for personal usage since I don't really want to do this manually every time and achieves the exact same thing as modifying it by hand.

  • Then, from a PowerShell console opened as an Administrator, navigate to the folder that contains the script and execute run ".\DLL_Swapper.ps1" without the quotes to get started.

  • You will be asked to introduce the root of your Windows folder, for default, most systems have it on C:, but just in case you have it somewhere else, you'll have to be introduce it manually.
    Introduce your path in the console as "C:" without the quotes, replacing "C" by the letter your Windows is in.

  • If everything goes well, the rest of the script should execute without intervention.
    Once the script is done, the printer service should be up and running again and the .dll should be the replaced one. In case something goes wrong, your old .dll file should be in your \System32 folder with the name "win32sploldver.dll", you can save this or leave it there just in case you need it.
    By default the script doesn't delete the "old" win32spl.dll.

Additional information regarding security

  • If able to, check the script by yourself, don't trust random scripts in the internet.

  • If you don't trust the win32spl.dll that is included in here, that's totally okay and it is a good security practice, you can always replace the one I included with one you trust or know that works. As long as it is named "win32spl.dll" the script should work as intended.

Some articles about this issue

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.