Prev Previous Post   Next Post Next
Old 20th June 2022, 22:13   #17
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,522
This has no manifest at all.

PHP Code:
!include MUI2.nsh
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_UNPAGE_INSTFILES
!insertmacro MUI_LANGUAGE English

!macro DPI txt
System
::Call 'USER32::SetProcessDPIAware()i.r0'
System::Call 'SHCORE::GetProcessDpiAwareness(p0,*i0r1)'
${IfThen} $${|} StrCpy $1 PROCESS_SYSTEM_DPI_AWARE ${|}
System::Call 'USER32::GetDpiForSystem()i.r2'
System::Call 'USER32::IsProcessDPIAware()i.r3'
MessageBox MB_OK "${txt}: result=$0 get=$1 sysdpi=$2 aware=$3"
!macroend

Function .onInit
!insertmacro DPI Inst
FunctionEnd

Function un.onInit
!insertmacro DPI Uninst
FunctionEnd

Section
WriteUninstaller 
"$exedir\UnTest.exe"
ExecShell '' "$exedir\UnTest.exe"
Quit
SectionEnd

Section 
-un.Test
Quit
SectionEnd

ManifestDPIAware notset
RequestExecutionLevel none 
You can set this to User to avoid UAC but it will get a manifest
XPStyle off 
I'm not expecting this to work better than with a manifest but the return values of the functions should be interesting.

Windows 10 gives me: Uninst: result=1 get=PROCESS_SYSTEM_DPI_AWARE sysdpi=120 aware=1

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
 
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Tags
dpi, plug-in

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump