jazir555 / GamesDows

Windows boots straight into Steam Big Picture or Playnite without displaying any Explorer UI elements
GNU General Public License v3.0
44 stars 1 forks source link

Explorer startup task doesn't work for Home edition of Windows #11

Open Smealm opened 5 days ago

Smealm commented 5 days ago

for

echo Create the DelayedExplorerStart.bat script in the Steam folder
(
echo @echo off
echo Check if user is logged on
echo query user ^| find /i "%USERNAME%" ^>nul
echo if ERRORLEVEL 1 exit
echo Set Shell back to Explorer
echo REG ADD "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v Shell /t REG_SZ /d "%EXPLORER_PATH%" /f
echo timeout /t 20 /nobreak ^>nul
echo start C:\Windows\explorer.exe
echo timeout /t 10 /nobreak ^>nul
echo REG ADD "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v Shell /t REG_SZ /d "%STEAM_PATH%" /f
) > "%SCRIPT_PATH%"

you need to fix echo Check if user is logged on and echo Set Shell back to Explorer as they are not commented and causes the terminal to throw an error. here is the revised version: echo rem Check if user is logged on, echo rem Set Shell back to Explorer

the rest of the script looks good but for echo query user ^| find /i "%USERNAME%" ^>nul the command 'Query' isn't available on certain windows versions, a alternative command that does pretty much the same thing that works on all windows versions is 'whoami' a revised version would be echo whoami ^| find /i "%USERNAME%" ^>nul

jazir555 commented 5 days ago

for

echo Create the DelayedExplorerStart.bat script in the Steam folder
(
echo @echo off
echo Check if user is logged on
echo query user ^| find /i "%USERNAME%" ^>nul
echo if ERRORLEVEL 1 exit
echo Set Shell back to Explorer
echo REG ADD "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v Shell /t REG_SZ /d "%EXPLORER_PATH%" /f
echo timeout /t 20 /nobreak ^>nul
echo start C:\Windows\explorer.exe
echo timeout /t 10 /nobreak ^>nul
echo REG ADD "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v Shell /t REG_SZ /d "%STEAM_PATH%" /f
) > "%SCRIPT_PATH%"

you need to fix echo Check if user is logged on and echo Set Shell back to Explorer as they are not commented and causes the terminal to throw an error. here is the revised version: echo rem Check if user is logged on, echo rem Set Shell back to Explorer

the rest of the script looks good but for echo query user ^| find /i "%USERNAME%" ^>nul the command 'Query' isn't available on certain windows versions, a alternative command that does pretty much the same thing that works on all windows versions is 'whoami' a revised version would be echo whoami ^| find /i "%USERNAME%" ^>nul

Great, thank you! Changed query user to whoami, and I've added rem to the echos you've suggested. I sincerely appreciate it! This explains the erroneous behavior where explorer.exe would not start for some people, I was having trouble narrowing this down.

jazir555 commented 5 days ago

Would you mind reviewing this V2 script, as well as trying it out to see if it's working correctly?

https://github.com/jazir555/GamesDows/blob/jazir555-testing/Enable%20GamesDows%20v2%20NEW%20OCT-12-2024.bat

This should allow Steam to start as admin

jazir555 commented 5 days ago

Lot of tweaking I just did for V2, but it should work correctly now I think. I abandoned the original idea of running powershell commands from within the vbscript since it seems like it will trigger UAC for users with UAC enabled, and I went with a manifest file solution instead. When Steam is launched for the first time after running the V2 script, a UAC prompt will appear and the always start as administrator option needs to be selected. Subsequent launches of Steam (like upon reboot) should not require further prompts.

Smealm commented 2 days ago

looks good! the only other issue i had with your script is that for your playnite version it doesn't undo the changes properly. also i would recommend adding a selection menu after the UAC check that allows you to choose to enable the change or disable it. that way people don't need two scripts to enable or disable the scripts changes.

jazir555 commented 2 days ago

looks good! the only other issue i had with your script is that for your playnite version it doesn't undo the changes properly. also i would recommend adding a selection menu after the UAC check that allows you to choose to enable the change or disable it. that way people don't need two scripts to enable or disable the scripts changes.

re: "the only other issue i had with your script is that for your playnite version it doesn't undo the changes properly"

Are you referring to the disable script? I haven't updated it for Playnite support yet, I can do that this weekend. Combining it into the existing script and just changing it to something like Gamesdows.bat where you have the option to install or uninstall is doable, just not a priority right now. But that wouldn't be too hard to write I'm sure.

Would you be able to help me tackle some of the other issues? The one that is killing me right now is disabling the Welcome UI animation, that's my white whale. I want it to be a purely black screen until Playnite or Steam loads, and I just haven't been able to figure out what I can do about it.

Tried a number of solutions but nothing has worked so far. As far as I can tell modifying existing reg keys won't work (tried like 6 different keys), and I haven't been able to find BCDEdit commands that will work. I'm not even sure how I can touch it since it happens earlier in the boot process before sign in.

Smealm commented 1 day ago

you might have to make a kernel level service then, if you don't want to generate a kernel level service that messes with how windows itself works then you can try appearance changes instead, perhaps the welcome UI doesn't have to actually be gone but just look like it is. try setting to welcome UI to use a black background and find some way to change the white loading circle with another one that's black as well. this would give the welcome UI the appearance of a black screen until it goes away.