1.    27 Jun 2015 #1
    Join Date : Jun 2015
    Posts : 4
    Windows 10

    Compatibility mode


    I'm doing some research on an old application that I'm taking care of.
    As of Windows 8, it works if the Windows compatibility mode is se to "Windows 7" and I confirmed it also works if I set the compatibility mode on Windows 10.
    That problem I'm facing is that, I need to set the compatibility mode programatically, which I do in the installer for the app. Setting compatibility works properly on Windows 8 but not on Windows 10. It does not set anything. Suppose the same code simply does not work.
    So I was playing with the registry to confirm that if I set a proper value for my app in the HKLM¥SOFTWARE¥Microsoft¥Windows NT¥CurrentVersion¥AppCompatFlags¥Layers key, the compatiblity mode get set.
    This is straight forward and very easy to do.
    The issue I encountered is that, if I set the registry value manually or programatically, it does not get really applied. Looking at my application's property clearly shows the compatibility mode is correctly set. But until I manually click on "OK" button while showing the "Compatibility" tab, the setting does not get finalized as far as I see.
    If this is only way, basically the comapatibility mode needs to be set MANUALLY ONLY. It does not make sense for me.
    Even worse, I tried the same test on Windows 8.1 and I've got exact same behaviour. It only works if the "OK" button is click in the property dialog while showing the "Compatibility" tab.
    I'm really lost on how the capability mode works programatically.
    If anyone has any clue on this, please shed a light for me or direct me to a good reference(s).

    Thank you in advance.
      My ComputerSystem Spec
  2.    27 Jun 2015 #2
    Join Date : Sep 2014
    Nashville, TN
    Posts : 3,142
    Windows 10 Pro

    Compatibility mode isn't supposed to work programmatically.

    You're supposed to fix your app, so it doesn't need compatibility. Compatibility mode is only for users who want to enable compatibility mode on apps that don't function correctly. If apps could set this behavior, then they would not fix their problems and just enable compatibility mode as their "fix" (which is what you're trying to do). Nobody would bother fixing anything.

    How about fixing your app instead?
      My ComputerSystem Spec
  3.    27 Jun 2015 #3
    Join Date : Oct 2014
    Posts : 744
    Windows 7

    Welcome to the forum.

    It was never intended that an application would set compatibility mode and this is unsupported. Much of compatibility mode operation is documented only as an implementation detail and subject to change without notice.

    This blog entry by Raymond Chen, a senior Microsoft developer, is relevant to this situation:
    http://blogs.msdn.com/b/oldnewthing/...1.aspx#9979973

    A quote:
    "Don't touch that knob; the knob is there for the customer, not for the program. And it's there to clean up after your mistakes, not to let you hide behind them."
      My ComputerSystem Spec
  4.    28 Jun 2015 #4
    Join Date : Oct 2013
    Penns Forrest
    Posts : 3,506
    Win_8.1-Pro, Win_10.1607-Pro, Mint_17.3

    Quote Originally Posted by TedMtl View Post
    I'm doing some research on an old application that I'm taking care of.
    As of Windows 8, it works if the Windows compatibility mode is se to "Windows 7" and I confirmed it also works if I set the compatibility mode on Windows 10.
    That problem I'm facing is that, I need to set the compatibility mode programatically, which I do in the installer for the app. Setting compatibility works properly on Windows 8 but not on Windows 10. It does not set anything. Suppose the same code simply does not work.
    See if anything here gets you heading in the right direction:

    Windows 8.1 App Compat Guide, Downloads | TechNet

    Application Compatibility Toolkit (ACT) Technical Reference

    If you can write a shim to work on Win 8.1, it should also work on Win 10

    That's all I have to offer, good luck
      My ComputerSystem Spec
  5.    28 Jun 2015 #5
    Join Date : Jun 2015
    Posts : 4
    Windows 10
    Thread Starter

    Thank you guys for your replies.

    I absolutely understand that I should fix the app. If I could, I'd have done it quite awhile ago.
    The biggest problem is that it is not my decision but my client's and all come to the cost, of course. Basically the client is looking for the quickest (and less expensive) way to prolonging the app's life as much as possible.
    There was the same type of discussion when Win8 came up. At the time, a workaround by modifying the installer and setting the compatibility mode to the app worked for Win8. So I was searching for very similar solution.

    After spending several hours to try to troubleshoot and complete updating Win 10 to the most recent state (couldn't believe it take so long with weird problems), it looks like the installer statred working in the the way works on Win8 by set the compatibility mode correctly and effective immediately (manually changing the registry does not take effect just like on Win8 but as long as the installer works, I'm okay).
    I still have to double check if this works properly on different machine but if it works, then I really feel fooled by MS.
    I will post a comment as soon as my test is done.

    Thank you again for you comment and time on this.
    Hopefully I can convine my client to allow me or someone to fix the app with recent dev tools and environment at least for Win11.
    Best regards,
      My ComputerSystem Spec
  6.    28 Jun 2015 #6
    Join Date : Jan 2015
    Posts : 6
    Win 8.1

    Thanks for this!!
      My ComputerSystem Spec
  7.    28 Jun 2015 #7
    Join Date : Sep 2014
    Nashville, TN
    Posts : 3,142
    Windows 10 Pro

    Quote Originally Posted by TedMtl View Post
    I absolutely understand that I should fix the app. If I could, I'd have done it quite awhile ago.
    The biggest problem is that it is not my decision but my client's and all come to the cost, of course. Basically the client is looking for the quickest (and less expensive) way to prolonging the app's life as much as possible.
    In almost all cases, fixing the app is usually very simple, doesn't require rewriting the app, or changing your tools. It's just figuring out what is causing the incompatibility and fixing just the bit.

    For example, In many apps, they assume they can run as administrator, and therefore they try to open files in Read/Write mode when they may not have permission to do that (even when they only need read access).

    Have you even looked into why it's failing? It could be as simple as a tiny fix.. (or it might not, but without looking into it, you could be spending a LOT more time trying to hack compatibility than actually fixing it).
      My ComputerSystem Spec
  8.    28 Jun 2015 #8
    Join Date : Jun 2015
    Posts : 4
    Windows 10
    Thread Starter

    Quote Originally Posted by Mystere View Post
    In almost all cases, fixing the app is usually very simple, doesn't require rewriting the app, or changing your tools. It's just figuring out what is causing the incompatibility and fixing just the bit.

    For example, In many apps, they assume they can run as administrator, and therefore they try to open files in Read/Write mode when they may not have permission to do that (even when they only need read access).

    Have you even looked into why it's failing? It could be as simple as a tiny fix.. (or it might not, but without looking into it, you could be spending a LOT more time trying to hack compatibility than actually fixing it).
    I have quite spend some time on what causing the issue but the original source and development environment is based on VC++ 6. So you can image anything can go wrong on the recent Windows environments.
    The app actually needs to be rewritten since it also has very long history (going back to 1998) and numerous improvements that I could read from the code.

    Some extra tests I have done with manipulating the compatibility mode, I found that on a freshly installed Windows 10, the installer was not actually working. All the properties are set but it still require manually process by opening the property dialog and click on "OK" while showing "Compatibility" tab.
    Once the application is complete set with the compatibility mode, if I uninstall and reinstall it, it works without involving the manual process.
    So I think the manual process set certain information somewhere.
    I have to give a bad news to my client that what they prefer cannot be realized (or at least easily/quickly) and either let the users manually take the last step or overhaul the app. Obviously I'm not going to spend much more time on this unless I get paid for that part of the job unfortunately.

    Thanks again for your help.
      My ComputerSystem Spec
  9.    28 Jun 2015 #9
    Join Date : Sep 2014
    Nashville, TN
    Posts : 3,142
    Windows 10 Pro

    Quote Originally Posted by TedMtl View Post
    I have quite spend some time on what causing the issue but the original source and development environment is based on VC++ 6. So you can image anything can go wrong on the recent Windows environments.
    The app actually needs to be rewritten since it also has very long history (going back to 1998) and numerous improvements that I could read from the code.
    It may be that the app needs rewriting, but that doesn't mean you need to rewrite it to fix the compatibility issues.

    VC++6 is not incompatible with Windows 10. It's something the app is doing that is incompatible, and more than likely this is a simple fix (at least it has in almost all cases I've seen). Unless your app's basic function relies on something that is no longer allowed (security reasons, for the most part), I'd bet you can figure out the problems easily enough by running it in a debugger and breaking on thrown exceptions.
      My ComputerSystem Spec
  10.    29 Jun 2015 #10
    Join Date : Jun 2015
    Posts : 4
    Windows 10
    Thread Starter

    Quote Originally Posted by Mystere View Post
    It may be that the app needs rewriting, but that doesn't mean you need to rewrite it to fix the compatibility issues.

    VC++6 is not incompatible with Windows 10. It's something the app is doing that is incompatible, and more than likely this is a simple fix (at least it has in almost all cases I've seen). Unless your app's basic function relies on something that is no longer allowed (security reasons, for the most part), I'd bet you can figure out the problems easily enough by running it in a debugger and breaking on thrown exceptions.
    Further investigation on the issue I have, I have noticed at least one thing. A third party DLL which is bundled and used by the app seems to be a part of not working if the compatibility mode is not set.
    This may be a tip of the icebuerg and the DLL definitely needs to be replaced but no recent version than that is available. This means eaither look for similar one or write the equivalent one.
    Hopefully no other components, especially thirdparty DLLs, are becoming the cause.
    I guess the little more investigation will help convince my client to make his decision in one way or another. I just need to get done with this development/maintenace.

    Regards,
      My ComputerSystem Spec

 


Similar Threads
Thread Forum
Solved Adobe Audition Compatibility
Will Adobe Audition 3.0 be compatible with Windows 10? The CD software I have is about five years old; I've been running it on Windows 7 SP1. Thanks!
Software and Apps
Photoshop CS6 Compatibility
Photoshop CS6 seems to function with the exception of printing when it stops working. Photoshop CS6 is fully functional on Windows 8.1; I can't see Windows 10 being so different to cause a problem, but obviously there's something different.
Software and Apps
Solved Program Compatibility Assistant
¿How to disable it? http://i59.tinypic.com/33f6ec5.jpg http://i61.tinypic.com/2gtt0lx.jpg
Software and Apps
enquiry regarding compatibility
If you check my system specifications below, I'd like to know whether I can run a Z97 motherboard, are they compatible?
Drivers and Hardware
compatibility view lists
Well this seems to be a nag on every start up :/ I've never found any use for Microsoft's comp-view lists so I uncheck the option Alt+TB For both but seems this produces a popup on start of ie11 on win-10 9860 :/ Might have try another browser...
Browsers and Email
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 23:20.
Find Us
Twitter Facebook Google+ Ten Forums iOS App Ten Forums Android App



Windows 10 Forums