Aetopia / NoSteamWebHelper

A program that disables Steam's CEF/Chromium Embedded Framework.
GNU General Public License v3.0
129 stars 6 forks source link

No tray icon on Windows11 #16

Closed dream2333 closed 6 months ago

dream2333 commented 7 months ago

I started the program on the latest Windows 11, but didn't find any icons in the tray bar, and CEF didn't shut down after the game started.

Aetopia commented 7 months ago

Can you send a screenshot of your tray menu?

veksha commented 7 months ago

i have tray icon on my windows 11 (10.0.22621.3155) path to steam folder: D:\Games\Steam\

what is your ver and path? (it was a bug in the past related to path length.)

dream2333 commented 7 months ago

Can you send a screenshot of your tray menu? There is no NoSteamWebHelper tray icon, only Steam icon. image

dream2333 commented 7 months ago

i have tray icon on my windows 11 (10.0.22621.3155) path to steam folder: D:\Games\Steam\

what is your ver and path? (it was a bug in the past related to path length.)

win11(10.0.22631) My steam floder path : C:\Program Files (x86)\Steam

Aetopia commented 6 months ago

I can only think of 2 things:

DWORD dwSize = MAX_PATH;
LPWSTR lpExeName = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, dwSize * sizeof(WCHAR));

while (!QueryFullProcessImageNameW(GetCurrentProcess(), 0, lpExeName, &dwSize))
    lpExeName = HeapReAlloc(lpExeName, HEAP_ZERO_MEMORY, lpExeName, (dwSize += MAX_PATH) * sizeof(WCHAR));

for (DWORD nChar = lstrlenW(lpExeName); nChar < -1; nChar--)
    if (lpExeName[nChar] == '\\')
    {
        lpExeName[nChar] = '\0';
        SetCurrentDirectoryW(lpExeName);
        break;
    }

I doubt paths are the issue because I rewrote the entire code responsible for setting paths. You could try using Process Explorer to see if the DLL actually loaded into Steam.

Aetopia commented 6 months ago

I finally got to know what's preventing the NoSteamWebHelper from functioning properly.

To detect if Steam has fully initialized, NoSteamWebHelper waits for a window with the class name of vguiPopupWindow and title of Untitled to spawn.

if (CompareStringOrdinal(L"vguiPopupWindow", -1, szClassName, -1, FALSE) != CSTR_EQUAL ||
    CompareStringOrdinal(L"Untitled", -1, szString, -1, FALSE) != CSTR_EQUAL)
    return;

It seems Steam changes the window title name based on what language, you are currently using in Windows. Since Steam creates multiple windows with the class name of vguiPopupWindow but only one with a title.

image

The program now just checks if there is a non-null title.

if (CompareStringOrdinal(L"vguiPopupWindow", -1, szClassName, -1, FALSE) != CSTR_EQUAL ||
    GetWindowTextLengthW(hwnd) < 1)
    return;
Aetopia commented 6 months ago

Please try using v4.1.2.

GogoVang commented 6 months ago

Had the same problem as the OP, v4.1.2 fixed this. Huge thank you.

Aetopia commented 6 months ago

Fixed 👍🏼.

liliill commented 3 months ago

Fixed 👍🏼.

Does not work!

Aetopia commented 3 months ago

Fixed 👍🏼.

Does not work!

Please make a new issue for this!

liliill commented 3 months ago

I have solved the problem once and for all, create a batch file and add it there! After launching Steam, run the batch file.

@echo off taskkill /f /im steam.exe start "" "c:/program files (x86)/steam\steam.exe" -dev -console -nofriendsui -no-dwrite -nointro -nobigpicture -nofasthtml -nocrashmonitor -noshaders -no-shared-textures -disablehighdpi -cef-single-process -cef-in-process-gpu -single_core -cef-disable-d3d11 -cef-disable-sandbox -disable-winh264 -no-cef-sandbox -vrdisable -cef-disable-breakpad