...Because someone's gotta tell the story...


To return to the main Blog List, click Full Blog Listing.



Scripting running an application in Compatibilty Mode

Friday, April 09, 2010 in Technical Articles (Views: 4027)
There isn't much out there on how to modify an application to run in Compatibility mode as it applies to a script.

Compatibility mode is good for those apps that you have to run in Windows XP and Vista that may have been written for Windows XP, or Windows 95.

So, how do you test this?

First, navigate to the registry key:

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

Note: You may have to create the Layers key

Another Note: You can create this registry entry in HKCU, for individual users. Of course, you could add it to the Default user, or just add it to HKLM.

Then, you create a registry entry for each application you want to run in compatibility mode. So, to run an app in the c:\temp folder called app1.exe, simply create a string value named c:\temp\app1.exe with the value WINXPSP2.

Other values can include:

WINXPSP3 - Runs in Windows XP SP3

WIN95 - Runs in Windows 95 (if something is still out there)

RUNASADMIN - This will elevate the app.

If you test this, the registry change will change the file properties in real time. If you go to properties, you will see the file properties change on access.

Happy hacking!


Related Blogs You May Be Interested In:

To leave a comment, please log in and/or register.