Windows 10 and compatibility mode for an old app

Ive installed Windows 10 in a VM and am happy to see that my apps work straight out of the box.
I may even migrate from Windows 7! :slight_smile:

I also have custodianship of a legacy app that I no longer have the ability to recompile.
This doesn’t start up properly unless I manually set the properties to Windows XP or 95 compatibility.

Question: Is there a way I can create a small helper app, or install script in Inno, that sets the compatibility during the install or as a ‘patch’?

[quote=204046:@Jeff Tullin]Ive installed Windows 10 in a VM and am happy to see that my apps work straight out of the box.
I may even migrate from Windows 7! :slight_smile:

I also have custodianship of a legacy app that I no longer have the ability to recompile.
This doesn’t start up properly unless I manually set the properties to Windows XP or 95 compatibility.

Question: Is there a way I can create a small helper app, or install script in Inno, that sets the compatibility during the install or as a ‘patch’?[/quote]

No need for a helper.

  • Right click on the program, and move the cursor away from it
  • When you release the mouse select “Create shortcut here”
  • Right click on the shortcut and select “Properties”
  • In the Compatibility tab, check the Compatibility mode box and select whatever best suits your app

Now, I do not use Inno Setup, so cannot tell you how to do it, but the principle is to pack the shortcut in your installer with the other files (it has extension .lnk), and use it in the Start menu instead of the one that Inno Setup would otherwise create for you.

Thanks Michel.
Sadly, installing a shortcut in that way is only viable if the user does not change the installation path.
I think I may be able to apply a REG file, and perhaps incorporate that somewhere or shell it…

[quote=204052:@Jeff Tullin]Thanks Michel.
Sadly, installing a shortcut in that way is only viable if the user does not change the installation path.
I think I may be able to apply a REG file, and perhaps incorporate that somewhere or shell it…[/quote]

Alternatively, place the shortcut next to the executable, and instead of pointing the Start menu shortcut to the exe, point it to the lnk. Since the shortcut is created in the same directory as the exe, its path is relative and won’t suffer by a change in install directory.

The Reg will request an additional authorization from the user. Not very good.

I just tried to create a shortcut with a relative path, no way :frowning:

Besides, it seems compatibility settings do not survive transfer to another system.

About the registry, Xojo can change it without needing authorization. So a small helper can probably do magic.

Well, I found a way to set the registry from within Advanced Installer, so I’m going to give that a try.
(I can’t recompile, but I can amend the installer.)

Theres testing to be done , but essentially I found I need to write an entry to

HKCU:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers

with a string key set to the << installed path to the app>>, and a value of WIN98 or WIN2000 or similar

The ‘installed path to the app’ is a token variable available in the install script, so it gets changed dynamically at install time.
If that fails in the installer, then I think a small helper app that runs at the end of the install might do the trick.

I just looked into it, that is indeed the way the system does it. It should work flawlessly.

About compatibility under Windows 10, the latest Version 5.00 of VirtualBox absolutely refused to work no matter what. Worse yet, when I tried to ask in their forum for help, a moderator with an attitude replied that the same question had been asked many a time, and to stop cluttering forums with repetitive questions. But he did not have the elementary conscience or courtesy to point to a solution.

After further examination, it appears that for some reason Oracle decided to strengthen security to such an extent, it has been broken under Windows 8 through 10 since last year and version 4.3.16 or so.

I just had to go back to 4.3.12 set with Windows 8 compatibility, and it works like a breeze. Now I can have again Windows XP, 7, 8.1 and Linux Mint at my fingertips without leaving 10.

[quote=204122:@Jeff Tullin]Theres testing to be done , but essentially I found I need to write an entry to

HKCU:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers

with a string key set to the << installed path to the app>>, and a value of WIN98 or WIN2000 or similar[/quote]
Here’s a page I found that outlines this fairly concisely:
http://www.verboon.info/2011/03/running-an-application-as-administrator-or-in-compatibility-mode/