A powerful, directory-based workspace manager for Windows. It treats a folder as a configuration file, allowing you to organize, sort, and launch groups of applications with complex rules just by renaming files and folders.
- Zero Config: No JSON/XML files. Just drag, drop, and rename shortcuts.
- Smart Tracking: Tracks PIDs, Window Handles, or Process Names to ensure clean shutdowns.
- Safety First: Includes Session ID validation to prevent using stale logs after a reboot, and System Process Protection to prevent accidental termination of critical Windows components.
- Idempotent: Automatically skips apps that are already running (unless overridden).
- Session Management: Tracks every window launched. Press
Shifton launch to close only the apps from that specific session. - Dependency Chaining: Launch App B only after App A is fully loaded (
[Wait]). - Magic Folders: Subfolders act as rules (e.g., everything in
\minimizedlaunches minimized).
Note: This script is designed to run as a compiled executable (.exe) for maximum stability and process tracking.
- Install AutoHotkey v2.
- Open a terminal (Command Prompt or PowerShell) in the script's folder.
- Run the script with the build flag:
AutoHotkey.exe WorkspaceLauncher.ahk --build
- The script will automatically locate your compiler (
Ahk2Exe) and produceWorkspaceLauncher.exe.- If it can't find the compiler, a file dialog will open asking you to locate
Ahk2Exe.exemanually.
- If it can't find the compiler, a file dialog will open asking you to locate
Right-click WorkspaceLauncher.ahk > Compile Script.
Once you have WorkspaceLauncher.exe, simply double-click it to start. By default, it creates and looks for a folder named Workspace next to itself.
| Modifier Key | Mode | Description |
|---|---|---|
| None | Launch | Launches apps in the workspace. Skips apps already running (Single Instance default). |
Hold Shift |
Cleanup | Closes only the apps tracked in the current session (plus specific "Cleanup" folders). |
Hold Ctrl |
Selective Launch | Shows a checklist GUI to choose which apps to launch. |
Hold Alt |
Toggle Visibility | Hides or Shows background apps (only those launched with [Hide]). |
Hold Ctrl+Alt |
Selective Toggle | Shows a checklist GUI to Show/Hide any app in the session. |
You can manage multiple workspaces by passing the folder path or flags as arguments.
; Launch a specific gaming workspace
WorkspaceLauncher.exe "D:\Workspaces\Gaming"
; Trigger cleanup for the default workspace
WorkspaceLauncher.exe --close
; Trigger visibility toggle
WorkspaceLauncher.exe --toggleRename your files/shortcuts to apply rules. Tags are case-insensitive and support [], {}, or <>.
Note on Aliases: Some tags support multiple names (Aliases) for convenience. You can use either the Short or Long version.
| Primary Tag | Aliases | Function | Example |
|---|---|---|---|
[N] |
(None) | Sets launch order (Natural Sort). | [1] Chrome.lnk |
[Multi] |
[Dup], [AllowDup] |
Allow Duplicates. Forces a new instance even if one is already running. | [2] Notepad [Multi].lnk |
[Wait] |
(None) | Waits for this app's window to appear before launching the next item. | [1] Server [Wait].bat |
[Wait=N] |
(None) | Waits for the item with Order N to finish launching. |
[5] Client [Wait=1].exe |
[Delay=T] |
(None) | Sleeps after launching. Supports ms, s, m. |
[3] DB [Delay=5s].lnk |
[Admin] |
(None) | Runs the file as Administrator. | CMD [Admin].lnk |
[Min] |
[Minimized] |
Launches minimized. | Spotify [Min].lnk |
[Max] |
[Maximized] |
Launches maximized. | Code [Max].lnk |
[Hide] |
[Hidden] |
Launches hidden (background processes). | Script [Hide].ahk |
[ForceKill] |
[Kill], [KillForce] |
Forces killing the app instead of graceful closing. Required if you want to forcefully terminate apps in cleanup folders or in cleanup mode. | Steam [ForceKill].lnk |
[WaitWindow] |
[WaitWin] |
Crucial fix for modern apps. Waits for the app to fully load its UI before applying Min/Max/Hide. | OneNote [Max] [WaitWin].lnk |
[WaitWin=T] |
(None) | Same as above, but specifying a custom wait duration. | [WaitWindow=500ms] |
Different apps behave differently. Use these tags to ensure the script tracks the correct window/process for cleanup.
| Tag | Behavior & Use Case | Cleanup Action |
|---|---|---|
| Standard (Default) | Tracks the Process ID (PID) returned by Windows. Good for standard apps (Notepad, Paint). | Closes specific PID. |
[Match=Name] |
Wrapper Scripts. If you launch a .bat, use this to track the actual app it starts.[Match=wt.exe] ignores the .bat PID and waits for wt.exe. |
Closes specific window/PID of the matched app. |
[HWND] |
Specific Windows. Forces tracking by Window Handle instead of PID. Useful if an app changes PIDs rapidly but keeps the window open. | Closes specific Window Handle. |
[TrackExe] |
Electron / Multi-Process Apps. Tracks by Executable Name. Use this for Discord, Slack, VS Code. |
Kills ALL instances of that executable name found on the system. |
Tag Aliases:
[HWND]can also be written as[Win]or[Window].[TrackExe]can also be written as[Exe]or[ByExe].
Create subfolders inside your workspace to apply rules to everything inside them. Note: Folder names are Strict (no aliases allowed) but Case-Insensitive.
| Folder Name | Launch Behavior | Cleanup Behavior | Use Case |
|---|---|---|---|
Minimized |
Launch Minimized. | Standard Close. | Background music/chats. |
Maximized |
Launch Maximized. | Standard Close. | Main work tools. |
Hidden |
Launch Hidden. | Standard Close. | Servers/Scripts. |
Monitor2 |
Move to Monitor 2. | Standard Close. | Secondary screen apps. |
CloseOnLaunch |
Gracefully Close these apps. | Ignored. | "Close Steam when I start Work". |
AlwaysClose |
Gracefully Close app. | Gracefully Close app. | Ensure app is closed on Start AND Stop. |
CloseOnCleanup |
Ignored. | Gracefully Close app. | Close apps only when finishing session. |
Ignore |
Ignored. | Ignored. | Storage / Assets. |
Pro Tip: To Kill (Force Terminate) an app in a Close folder instead of gracefully closing it, add the
[ForceKill]tag to the shortcut filename.
- If you place a Folder Shortcut inside a
Closemagic folder, the script will attempt to close the specific Explorer window matching that folder's name. It will not killexplorer.exe.
The script creates a session log to track what it launched.
- Session ID: The log is stamped with the computer's Boot Time. If you restart your PC, the script detects the timestamp mismatch and discards the old log to prevent killing incorrect PIDs (BSOD prevention).
- Format:
TYPE | ID | TARGET | FORCE_FLAG | HIDDEN_FLAG
- Interactive (Ctrl+Shift): Reads the log and presents a GUI to uncheck apps you want to save.
- Standard: Reads the log in reverse order (LIFO).
- PID/HWND: Sends
WinClose. If[ForceKill]is used, sendsProcessClose. - EXE: Kills all processes matching that name.
- PID/HWND: Sends
- Safety: Critical system processes (e.g.,
svchost.exe,csrss.exe) are blacklisted and cannot be killed by this script.
- Cause: The app takes too long to initialize its window, or the script acted too fast on a splash screen/helper window.
- Fix: Add
[WaitWindow]tag. This forces the script to wait until the app is "Input Idle" (ready) before sending window commands.
- Cause: You are launching a wrapper script/launcher.
- Fix: Add
[Match=RealApp.exe]. The script will ignore the Batch file PID and wait forRealApp.exeto appear.
- Cause: These apps spawn multiple processes and invisible utility windows.
- Fix: Use
[TrackExe]. This tells the script to stop worrying about specific PIDs and just manage the "Application" as a whole. - Example:
[TrackExe] [Match=Discord.exe] Discord.lnk
- Cause: Apps that minimize to tray often ignore standard "Close" commands.
- Fix: Add
[ForceKill]. This usesProcessClosewhich terminates them instantly.
- Cause: The script grabbed a hidden 1x1 pixel helper window instead of the main UI.
- Fix: Add
[WaitWindow]. The script uses intelligent logic to filter out invisible windows, but it needs the main window to actually exist first.
- If your PC is slow or apps launch heavily, use
[Delay=1s]between heavy items to prevent CPU choking.
