|
本帖最后由 Bluebells 于 2022-4-30 21:12 编辑
更改为 PECMD 的自定义子函数
- _SUB SetDPI
- ENVI$# &pvParam=*4 0
- CALL $--bool --qd --ret:&SystemParametersInfoWRet user32.dll,SystemParametersInfoW,#158,0,*&pvParam,1
- FIND $%~1=AutoDPI,TEAM CALL $--qd# user32.dll,SystemParametersInfoW,159,%&SystemParametersInfoWRet%,0,1| ENVI @@DeskTopFresh=1 //自动设置为系统推荐的缩放比例
- //注册右键上下文菜单
- ENVI?ints &pvParam=&DPI0
- TEAM CALC #&DPI1=%&DPI0%+1| CALC #&DPI2=%&DPI0%+2| CALC #&DPI3=%&DPI0%+3| CALC #&DPI4=%&DPI0%+4| CALC #&DPI5=%&DPI0%+5| CALC #&DPI6=%&DPI0%+6| CALC #&DPI7=%&DPI0%+7
- REGI $HKEY_LOCAL_MACHINE\SOFTWARE\Classes\DesktopBackground\Shell\SetDPI\\SubCommands=
- REGI $HKEY_LOCAL_MACHINE\SOFTWARE\Classes\DesktopBackground\Shell\SetDPI\\MUIVerb=设置显示比例(&Z)
- REGI $HKEY_LOCAL_MACHINE\SOFTWARE\Classes\DesktopBackground\Shell\SetDPI\\Position=Bottom
- REGI $HKEY_LOCAL_MACHINE\SOFTWARE\Classes\DesktopBackground\Shell\SetDPI\shell\ZoomFactor0\\MUIVerb=缩放比例 100%%
- REGI $HKEY_LOCAL_MACHINE\SOFTWARE\Classes\DesktopBackground\Shell\SetDPI\shell\ZoomFactor0\command\\=PECMD.EXE TEAM CALL $--qd# user32.dll,SystemParametersInfoW,159,%&DPI0%,0,1| ENVI @@DeskTopFresh=1
- REGI $HKEY_LOCAL_MACHINE\SOFTWARE\Classes\DesktopBackground\Shell\SetDPI\shell\ZoomFactor1\\MUIVerb=缩放比例 125%%
- REGI $HKEY_LOCAL_MACHINE\SOFTWARE\Classes\DesktopBackground\Shell\SetDPI\shell\ZoomFactor1\command\\=PECMD.EXE TEAM CALL $--qd# user32.dll,SystemParametersInfoW,159,%&DPI1%,0,1| ENVI @@DeskTopFresh=1
- REGI $HKEY_LOCAL_MACHINE\SOFTWARE\Classes\DesktopBackground\Shell\SetDPI\shell\ZoomFactor2\\MUIVerb=缩放比例 150%%
- REGI $HKEY_LOCAL_MACHINE\SOFTWARE\Classes\DesktopBackground\Shell\SetDPI\shell\ZoomFactor2\command\\=PECMD.EXE TEAM CALL $--qd# user32.dll,SystemParametersInfoW,159,%&DPI2%,0,1| ENVI @@DeskTopFresh=1
- REGI $HKEY_LOCAL_MACHINE\SOFTWARE\Classes\DesktopBackground\Shell\SetDPI\shell\ZoomFactor3\\MUIVerb=缩放比例 175%%
- REGI $HKEY_LOCAL_MACHINE\SOFTWARE\Classes\DesktopBackground\Shell\SetDPI\shell\ZoomFactor3\command\\=PECMD.EXE TEAM CALL $--qd# user32.dll,SystemParametersInfoW,159,%&DPI3%,0,1| ENVI @@DeskTopFresh=1
- REGI $HKEY_LOCAL_MACHINE\SOFTWARE\Classes\DesktopBackground\Shell\SetDPI\shell\ZoomFactor4\\MUIVerb=缩放比例 200%%
- REGI $HKEY_LOCAL_MACHINE\SOFTWARE\Classes\DesktopBackground\Shell\SetDPI\shell\ZoomFactor4\command\\=PECMD.EXE TEAM CALL $--qd# user32.dll,SystemParametersInfoW,159,%&DPI4%,0,1| ENVI @@DeskTopFresh=1
- REGI $HKEY_LOCAL_MACHINE\SOFTWARE\Classes\DesktopBackground\Shell\SetDPI\shell\ZoomFactor5\\MUIVerb=缩放比例 225%%
- REGI $HKEY_LOCAL_MACHINE\SOFTWARE\Classes\DesktopBackground\Shell\SetDPI\shell\ZoomFactor5\command\\=PECMD.EXE TEAM CALL $--qd# user32.dll,SystemParametersInfoW,159,%&DPI5%,0,1| ENVI @@DeskTopFresh=1
- REGI $HKEY_LOCAL_MACHINE\SOFTWARE\Classes\DesktopBackground\Shell\SetDPI\shell\ZoomFactor6\\MUIVerb=缩放比例 250%%
- REGI $HKEY_LOCAL_MACHINE\SOFTWARE\Classes\DesktopBackground\Shell\SetDPI\shell\ZoomFactor6\command\\=PECMD.EXE TEAM CALL $--qd# user32.dll,SystemParametersInfoW,159,%&DPI6%,0,1| ENVI @@DeskTopFresh=1
- REGI $HKEY_LOCAL_MACHINE\SOFTWARE\Classes\DesktopBackground\Shell\SetDPI\shell\ZoomFactor7\\MUIVerb=缩放比例 300%%
- REGI $HKEY_LOCAL_MACHINE\SOFTWARE\Classes\DesktopBackground\Shell\SetDPI\shell\ZoomFactor7\command\\=PECMD.EXE TEAM CALL $--qd# user32.dll,SystemParametersInfoW,159,%&DPI7%,0,1| ENVI @@DeskTopFresh=1
- _END
复制代码
仅依赖 PECMD 外部工具, 感谢 szwp 提供使用 PECMD 更改 DPI 的代码, 红毛樱木 提供判断系统推荐值和 100% 缩放比例值~
PS: 未进行完整测试!!!
|
评分
-
查看全部评分
|