Code Monkey home page Code Monkey logo

winlogo's Introduction

WinLogo

About

This project is used to modify the start button logo of windows 10 computers.

The logos are precompiled into the binary, but the UI supports loading the images from files and then exporting a new dll / installer using the new configuration.

For more information, see Logo Images.

Installer UI Taskbar

Supported Versions

This tool was tested on Windows 10 21h1, but should work for any "new enough" version of Windows 10.

Installation

Currently, the installation can only be global for all the users in the computer, and requires administrative privileges.

Using the UI

Just slide the UI slider to install / uninstall. It may take a few seconds.

Manually

For a scripted deployment, you may do the same things as the UI manually:

Install

  1. Put winlogo.dll in a globally available directory (such as C:\Windows\System32)
  2. In cmd, run regsvr32.exe winlogo.dll

Uninstall

  1. In cmd, run regsvr32.exe /u winlogo.dll
  2. Restart explorer.exe
  3. Delete the dll

Compiling

The tool is built using Visual Studio 2019 - just use it to open the .sln file and compile (you might have to install the nuget dependencies for the UI project).

How Does it Work?

Registration

The tool is a DLL (winlogo.dll) loaded into explorer. In order to get loaded, it is registered as an Icon Overlay (that's why it can only be registered globally for all users).

For more details about the registration process, see Registration.cpp.

Painting

WinLogo uses IAT hooking to hook several functions used by explorer while drawing the start button (See LogoHooks.cpp):

  • OpenThemeDataForDpi - When explorer loads the theme, the theme handle for "Taskbarpearl" is saved in order to later find out when explorer draws the start button.
  • CloseThemeData - Unregisters the theme handle when it's closed.
  • DrawThemeBackground - Skips the drawing of the start button. The next hook is responsible for the drawing. The function is only called when drawing a "disabled" logo, so it is used to mark which type of logo we should draw.
  • EndBufferedPaint - Winlogo hijacks this function in order to draw the actual logo images.

Logo Images

The logo images are taken from resources compiled into the binary, named enabled.bmp and disabled.bmp. Currently, there are several limitations regarding the images:

  • They are compiled directly into winlogo.dll
  • They must be BMP files
  • Transparency is achieved by using a black background
  • The size is used for the drawing - there is now stretching / resizing done by winlogo.

Replacing the Images

The UI supports changing the images in the dll - just click on one of the images and select an image file from your computer without any of these limitations. The file will be converted and stretched to achieve the requirements.

After changing the images, it is possible to export either the dll / a new installer using the Export menu.

Credits

GSL

The code uses the Guidelines Support Library, as taken from this repository, commit 10ce5b634f40d1a51c7ab92c362c77d4438c1d51.

RestartManagerSession

The code for RestartManagerSession.cs was taken from the following gist: https://gist.github.com/falahati/34b23831733151460de1368c5fba8e93.

winlogo's People

Contributors

shsh999 avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

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.