Page 1 of 1

I want my installed programs to have their compatibility settings changed.

Posted: Fri Mar 11, 2022 6:54 pm
by wxperson99
I install 32 bit VB6 programs.

Is there a way within installaware to set the compatibility property of "High DPI scaling override" to have it Override high DPI scaling behavior of Scaling performed by Application.

This is one of the compatibility options for executables.

I want my install to set it and not required them to go into properties for the programs (.exe) I am installing.

Thanks

George

Re: I want my installed programs to have their compatibility settings changed.

Posted: Tue Mar 15, 2022 8:11 am
by FrancescoT
Dear George,

unfortunately this isn't possible via project settings.
However for what I see, this can be easily achieved via System Registry.
https://stackoverflow.com/questions/58796446/how-to-set-override-high-dpi-scaling-to-application-programmatically-through

So you may set such file property with invoking "Write Registry" commad from your setup script.

Hope this helps you.

Re: I want my installed programs to have their compatibility settings changed.

Posted: Tue Mar 15, 2022 9:26 am
by wxperson99
Thanks... I don't do much registry coding but I gave it a go below...... any help is appreciated.

So would the write registry command be something like the following. See attachment or copied command below.

~InstallAware Clipboard Data~
~Write Registry~
~{4C7FD145-0CC4-46C3-948D-D0414A75E839}~
~0~
~1|~
~Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers~
~C:\Program Files (x86)\pcwp\adv2022\obsman.exe~
~~ HIGHDPIAWARE~
~TRUE~
~FALSE~

scopy.jpg
scopy.jpg (92.79 KiB) Viewed 2237 times

Re: I want my installed programs to have their compatibility settings changed.

Posted: Wed Mar 16, 2022 11:06 am
by wxperson99
Updated: for clarification.

HI...

I wanted to control the "highdpiaware" compatibility settings in the registry for the local user and got it to work with the following code.

Write Registry Key HKCU\Software\Microsoft\WindowsNT\CurrentVersion\AppCompatFlags\Layers\$TARGETDIR$\obsman.exe, ~ HIGHDPIAWARE

~InstallAware Clipboard Data~
~Write Registry~
~{4C7FD145-0CC4-46C3-948D-D0414A75E839}~
~0~
~1|~
~Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers~
~C:\Program Files (x86)\pcwp\adv2022\obsman.exe~
~~ HIGHDPIAWARE~
~TRUE~
~FALSE~

Now I am trying to do the same for ALL users so I tried by writing to the HKLM registry using the following...

Write Registry Key HKLM\Software\Microsoft\WindowsNT\CurrentVersion\AppCompatFlags\Layers\$TARGETDIR$\obsman.exe, ~ HIGHDPIAWARE

~InstallAware Clipboard Data~
~Write Registry~
~{7BA08583-2C7D-4997-A12B-6B8DB0578AC0}~
~0~
~2|~
~Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers~
~$TARGETDIR$\obsman.exe~
~~ HIGHDPIAWARE~
~TRUE~
~FALSE~

THE Problem is that it does not update the "correct" location but rather updates the settings in the registry under a WOW6432Node folder.

i.e.

Computer\HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers

which is NOT the correct location and does NOT affect the highdpiaware setting for the executable referenced.

BTW... if I manually change the compat setting for all users .... it does show up in the NON WOW6432Node folder.

Does anyone have any ideas on why this would occur and how I can fix it to write to the correct NON WOW6432Node location??

Thanks,

George

Re: I want my installed programs to have their compatibility settings changed.

Posted: Thu Mar 17, 2022 1:01 pm
by FrancescoT
You have to switch to x64 mode just before the Write Registry Command and then back to x86 mode just after.
https://www.installaware.com/forums/viewtopic.php?f=2&t=11382

Code: Select all

Set x64 - Native 64 bit Windows, AMD64, EM64T, and ARM64 Architectures - installation mode
Write Registry Key HKLM\xxxx\value, data
Set Win32 - Native 32 bit Windows and Windows 32 on Windows 64 (WOW64) - installation mode

Code: Select all

~InstallAware Clipboard Data~
~Set 64 Bit Mode~
~{79F17161-0826-4FBD-876E-26A97BBBAB04}~
~TRUE~
~FALSE~
~FALSE~
~Write Registry~
~{4C07C8EA-4804-4281-932B-9C5F4A9C46B9}~
~0~
~2|~
~xxxx~
~value~
~data~
~TRUE~
~FALSE~
~Set 64 Bit Mode~
~{85CBA68B-D14D-42D3-AEF2-88D488A01B02}~
~FALSE~
~FALSE~
~TRUE~


Please note that "Write Registry Command" is a Windows Installer Command (PURPLE COMMAND), due of this "by default", its execution is delayed to Apply Install execution.
https://www.installaware.com/forums/viewtopic.php?f=2&t=11403&p=43452

Hope this helps you.