mirror of
https://github.com/jazir555/GamesDows.git
synced 2025-06-05 07:07:23 +02:00
GamesDows Hidden Welcome UI
This commit is contained in:
parent
45865b853e
commit
c870f8a933
@ -13,8 +13,6 @@ SET "SCRIPT_PATH=%PLAYNITE_FOLDER%\%SCRIPT_NAME%"
|
||||
SET "EXPLORER_PATH=%SystemRoot%\explorer.exe"
|
||||
SET "VBS_NAME=RunBatchSilently.vbs"
|
||||
SET "VBS_PATH=%PLAYNITE_FOLDER%\%VBS_NAME%"
|
||||
REM Disable Logon UI
|
||||
reg add "%KEY_NAME%" /v DisableLogonUI /t REG_DWORD /d 1 /f
|
||||
|
||||
echo Creating DelayedExplorerStart.bat script
|
||||
|
||||
@ -24,16 +22,16 @@ echo rem Check if user is logged on
|
||||
echo whoami ^| find /i "%%USERNAME%%" ^>nul
|
||||
echo if ERRORLEVEL 1 exit
|
||||
|
||||
REM Disable Logon UI
|
||||
reg add "%KEY_NAME%" /v DisableLogonUI /t REG_DWORD /d 1 /f
|
||||
|
||||
echo rem Set taskbar to autohide
|
||||
echo powershell -command "$settingsPath='HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\StuckRects3'; $settings=(Get-ItemProperty -Path $settingsPath -Name 'Settings').Settings; $settings[8]=$settings[8] -bor 0x08; Set-ItemProperty -Path $settingsPath -Name 'Settings' -Value $settings"
|
||||
echo powershell -command ^^
|
||||
"^$settingsPath = 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\StuckRects3';" ^^
|
||||
"^$settings = (Get-ItemProperty -Path ^$settingsPath -Name 'Settings').Settings;" ^^
|
||||
"^$settings[8] = ^$settings[8] -bor 0x08;" ^^
|
||||
"Set-ItemProperty -Path ^$settingsPath -Name 'Settings' -Value ^$settings"
|
||||
|
||||
echo rem Start Explorer
|
||||
echo REG ADD "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v Shell /t REG_SZ /d "%EXPLORER_PATH%" /f
|
||||
echo rem Starting Explorer
|
||||
echo start C:\Windows\explorer.exe
|
||||
REG ADD "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v Shell /t REG_SZ /d "%EXPLORER_PATH%" /f
|
||||
echo start "" "%EXPLORER_PATH%" /desktop
|
||||
|
||||
echo rem Wait for Explorer to start
|
||||
echo timeout /t 2 /nobreak ^>nul
|
||||
@ -42,11 +40,15 @@ echo rem Wait for a specific delay before unsetting autohide
|
||||
echo timeout /t 5 /nobreak ^>nul
|
||||
|
||||
echo rem Unset taskbar autohide and refresh taskbar without restarting explorer.exe
|
||||
echo powershell -command "$settingsPath='HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\StuckRects3'; $settings=(Get-ItemProperty -Path $settingsPath -Name 'Settings').Settings; $settings[8]=$settings[8] -band 0xF7; Set-ItemProperty -Path $settingsPath -Name 'Settings' -Value $settings; $sig='[DllImport(\\""user32.dll\\"")] public static extern int SendMessageTimeout(IntPtr hWnd,uint Msg,IntPtr wParam,IntPtr lParam,uint fuFlags,uint uTimeout,out IntPtr lpdwResult);'; Add-Type -MemberDefinition $sig -Name 'Win32SendMessageTimeout' -Namespace 'Win32Functions'; [Win32Functions.Win32SendMessageTimeout]::SendMessageTimeout([IntPtr]::Zero,0x1A,[IntPtr]::Zero,[IntPtr]::Zero,0x0002,1000,[ref]([IntPtr]::Zero));"
|
||||
|
||||
reg add "%KEY_NAME%" /v DisableLogonUI /t REG_DWORD /d 1 /f
|
||||
echo powershell -command ^^
|
||||
"^$settingsPath = 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\StuckRects3';" ^^
|
||||
"^$settings = (Get-ItemProperty -Path ^$settingsPath -Name 'Settings').Settings;" ^^
|
||||
"^$settings[8] = ^$settings[8] -band 0xF7;" ^^
|
||||
"Set-ItemProperty -Path ^$settingsPath -Name 'Settings' -Value ^$settings;" ^^
|
||||
"^$sig = '[DllImport(\"user32.dll\")] public static extern int SendMessageTimeout(IntPtr hWnd, uint Msg, IntPtr wParam, IntPtr lParam, uint fuFlags, uint uTimeout, out IntPtr lpdwResult);';" ^^
|
||||
"Add-Type -MemberDefinition ^$sig -Name 'Win32SendMessageTimeout' -Namespace 'Win32Functions';" ^^
|
||||
"[Win32Functions.Win32SendMessageTimeout]::SendMessageTimeout([IntPtr]::Zero, 0x1A, [IntPtr]::Zero, [IntPtr]::Zero, 0x0002, 1000, [ref]([IntPtr]::Zero));"
|
||||
REG ADD "%KEY_NAME%" /v %VALUE_NAME% /t REG_SZ /d "%PLAYNITE_PATH%" /f
|
||||
reg add "%KEY_NAME%" /v DisableLogonUI /t REG_DWORD /d 1 /f
|
||||
) > "%SCRIPT_PATH%"
|
||||
|
||||
echo Creating RunBatchSilently.vbs script
|
||||
@ -73,7 +75,6 @@ echo ^</RegistrationInfo^>
|
||||
echo ^<Triggers^>
|
||||
echo ^<LogonTrigger^>
|
||||
echo ^<Enabled^>true^</Enabled^>
|
||||
echo ^<Delay^>PT5S^</Delay^>
|
||||
echo ^</LogonTrigger^>
|
||||
echo ^</Triggers^>
|
||||
echo ^<Principals^>
|
||||
@ -129,7 +130,7 @@ REM Disable the boot UI
|
||||
bcdedit.exe -set {globalsettings} bootuxdisabled on
|
||||
|
||||
REM Disable Logon UI
|
||||
reg add "%KEY_NAME%" /v DisableLogonUI /t REG_DWORD /d 1 /f
|
||||
reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v DisableLogonUI /t REG_DWORD /d 1 /f
|
||||
|
||||
REM Disable Visual Effects
|
||||
reg add "HKCU\Control Panel\Desktop" /v VisualFXSetting /t REG_DWORD /d 2 /f
|
||||
|
Loading…
x
Reference in New Issue
Block a user