script compatibility layer windows 7
I have some old Programs that will not run in a compatibility layer on windows 7
through a script. They work fine in Windows XP. Tempted to downgrade to XP Again, But Hope one of you has a solution.
If I copy them to a local directory and change the path in the scripts to the local one
However If I right click select Properties and set from there, they work fine. But can't do this if the exe is located on a network drive.
Has anybody had this problem, seems that __COMPAT_LAYER does not work from a script in Windows 7.
This is the old Script
Set WshShell = WScript.CreateObject("WScript.Shell")
Set wshProcEnv = wshShell.Environment("PROCESS")
wshProcEnv("__COMPAT_LAYER") = "Win98"
Title A Whale of a Tale