https://github.com/flipeador/node-win32-setwindowband
Example using NodeJS with Frida to call SetWindowBand from `explorer.exe`.
https://github.com/flipeador/node-win32-setwindowband
frida javascript nodejs setwindowband win32 window-bands windows zbid
Last synced: 12 months ago
JSON representation
Example using NodeJS with Frida to call SetWindowBand from `explorer.exe`.
- Host: GitHub
- URL: https://github.com/flipeador/node-win32-setwindowband
- Owner: flipeador
- Created: 2021-10-22T05:18:04.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2025-02-19T18:52:18.000Z (over 1 year ago)
- Last Synced: 2025-04-14T09:56:31.514Z (about 1 year ago)
- Topics: frida, javascript, nodejs, setwindowband, win32, window-bands, windows, zbid
- Language: JavaScript
- Homepage:
- Size: 59.6 KB
- Stars: 5
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Node.js Win32 SetWindowBand
Use [Node.js][node] with [Frida][frida] to call `User32\SetWindowBand` from `explorer.exe`.
See .
## Instructions
Install [pnpm][pnpm], then run the following command in the [Terminal][wt] to install [Node.js][node]:
```sh
# Install the latest version of NodeJS.
pnpm env use latest --global
```
[Clone][clone] this repository to your local computer, open the root directory with [Visual Studio Code][vs].
Run the following command in the [VS Code Terminal][vt] to install all required dependencies:
```sh
# Install all dependencies for the project.
# It will take a while until Frida is compiled.
pnpm install
```
Expand if errors occur during installation of Frida.
> First try 1️⃣, if it still does not work try 2️⃣.
>
> 1️⃣ Update Frida to the latest version.
>
> ```sh
> # Update all dependencies to their latest versions.
> pnpm update --latest
> ```
>
> 2️⃣ Install an older version of [Node.js][node].
>
> ```sh
> # List remotely available Node.js versions.
> pnpm env list --remote
>
> # For example, install v22 if the latest version is v23.
> pnpm env use 22.14.0 --global
>
> # This should trigger the execution again.
> pnpm update frida
> ```
Run the following command in the [VS Code Terminal][vt] to start the script:
```sh
# Run "./src/index.js".
# HWND: A handle to the window.
# BAND: One of the ZBID values.
node . HWND BAND
```
Expand to view a table of ZBID values (window bands).
> | Value | Name |
> | :---: | --- |
> | 0 | ZBID_DEFAULT |
> | 1 | ZBID_DESKTOP |
> | 2 | ZBID_UIACCESS |
> | 3 | ZBID_IMMERSIVE_IHM |
> | 4 | ZBID_IMMERSIVE_NOTIFICATION |
> | 5 | ZBID_IMMERSIVE_APPCHROME |
> | 6 | ZBID_IMMERSIVE_MOGO |
> | 7 | ZBID_IMMERSIVE_EDGY |
> | 8 | ZBID_IMMERSIVE_INACTIVEMOBODY |
> | 9 | ZBID_IMMERSIVE_INACTIVEDOCK |
> 10 | ZBID_IMMERSIVE_ACTIVEMOBODY ||
> | 11 | ZBID_IMMERSIVE_ACTIVEDOCK |
> | 12 | ZBID_IMMERSIVE_BACKGROUND |
> | 13 | ZBID_IMMERSIVE_SEARCH |
> | 14 | ZBID_GENUINE_WINDOWS |
> | 15 | ZBID_IMMERSIVE_RESTRICTED |
> | 16 | ZBID_SYSTEM_TOOLS |
> | 17 | ZBID_LOCK |
> | 18 | ZBID_ABOVELOCK_UX |
[node]: https://nodejs.org
[pnpm]: https://pnpm.io/installation
[frida]: https://frida.re
[vs]: https://code.visualstudio.com
[wt]: https://docs.microsoft.com/windows/terminal
[vt]: https://code.visualstudio.com/docs/terminal/basics
[clone]: https://docs.github.com/en/repositories/creating-and-managing-repositories/cloning-a-repository