ventoy / Ventoy

A new bootable USB solution.
https://www.ventoy.net
GNU General Public License v3.0
63.28k stars 4.11k forks source link

Request for enabling Dark Mode in WinPE environemnt using VTOY_WINPE_DARK_MODE Global Control Plugin #1867

Open devdevadev opened 2 years ago

devdevadev commented 2 years ago

Official FAQ

Ventoy Version

1.0.80

What about latest release

Yes. I have tried the latest release, but the bug still exist.

Try alternative boot mode

Yes. I have tried them, but the bug still exist.

BIOS Mode

Both

Partition Style

MBR

Disk Capacity

32GB

Disk Manufacturer

Samsung

Image file checksum (if applicable)

No response

Image file download link (if applicable)

No response

What happened?

Hi LongPanda...

As we know Ventoy provides VTOY_WIN11_BYPASS_CHECK Global Control Plugin which create the required registries in WinPE environment to bypass Windows 11 hardware check when install.

I am a visually impaired person and can't see anything in White/Light Screen. I use High Contrast Black theme within Windows OS so I can my work in Windows OS. I also use Dark Ventoy theme to enjoy ventoy features. But most of the very good WinPE ISOs and Win Setup installer (boot.wim) booted in Light Mode. Will it be possible so I can create required registries in enabling Dark/Black mode in WinPE environment using Ventoy Global Control Plugin feature ?

How exactly Ventoy add/inject/integrate required registries into WinPE environment ? Can you please tell me which registries are responsible for enabling Dark/Black mode in WinPE environemnt. It will be very useful for Visually Imparied/Partial Blind persion to enjoy WinPE ISO if ventoy can provide a 'VTOY_WINPE_DARK_MODE Global Control Plugin to enable Dark Mode in WinPE using registry modification on the fly !!! Maybe you can allow users to add/apply/merge their own *PTN1:/ventoy/reg/.reg** files in WinPE environemnt as per their requirements ?

Please help if it will be possible ?

Thanks & Regards

ventoy commented 2 years ago

Use Ventoy Injection Plugin, add your commands in VentoyAutoRun.bat. In VentoyAutoRun.bat you can use reg add xxxxxx commands to add registry.

ventoy commented 2 years ago

But I don't know which registries are responsible for enabling Dark/Black mode in WinPE environemnt.

devdevadev commented 2 years ago

@echo off

set ISOFILE=%1 set MNTPOINT=%2

echo ISOFILE=%ISOFILE% echo MNTPOINT=%MNTPOINT%

Reg Add HKCU\Software\Microsoft\Windows\CurrentVersion\Themes\Personalize /v AppsUseLightTheme /t REG_DWORD /d 0 /f Reg Add HKCU\Software\Microsoft\Windows\CurrentVersion\Themes\Personalize /v ColorPrevalence /t REG_DWORD /d 0 /f Reg Add HKCU\Software\Microsoft\Windows\CurrentVersion\Themes\Personalize /v SystemUsesLightTheme /t REG_DWORD /d 0 /f

Pecmd.exe KILL explorer.exe

I have tested above codes within VentoyAutoRun.bat . Some thing like File Explorer and WinNTSetup become dark mode. But It's looking some other Registries are there that should also be modified to get complete Dark Mode for other apps like setup.exe .

Regards...

devdevadev commented 2 years ago

It will be nice if it will be possible to other win32 apps also become Dark/Black . Can anybody know about the other Registries that I should modify ?

lucknaumann commented 2 years ago

There's the High Contrast Dark theme (system wide, every app) that can be toggled with a Keyboard Shortcut: left Alt + left Shift + Print Screen. It has a corresponding reg key at: HKCU\Control Panel\Accessibility\HighContrast with the value Flags and a REG_SZ string, set to 4198 for no warning message and no sound.

The available four values, depending on whether you want a warning message and/or sound, are:

4198 = Disable warning message and sound
4206 = Enable warning message and disable sound
4214 = Disable warning message and enable sound
4222 = Enable warning message and sound

I have no idea if the High Contrast Dark theme will interfere with the Dark Mode Windows Settings.

So, your script could look like this, with the high contrast dark theme and no message or warning:

@echo off

set ISOFILE=%1
set MNTPOINT=%2

echo ISOFILE=%ISOFILE%
echo MNTPOINT=%MNTPOINT%

Reg Add HKCU\Software\Microsoft\Windows\CurrentVersion\Themes\Personalize /v AppsUseLightTheme /t REG_DWORD /d 0 /f
Reg Add HKCU\Software\Microsoft\Windows\CurrentVersion\Themes\Personalize /v ColorPrevalence /t REG_DWORD /d 0 /f
Reg Add HKCU\Software\Microsoft\Windows\CurrentVersion\Themes\Personalize /v SystemUsesLightTheme /t REG_DWORD /d 0 /f
Reg Add HKCU\Control Panel\Accessibility\HighContrast /v Flags /t REG_SZ /d 4198 /f

Pecmd.exe KILL explorer.exe