Solved

script compatibility layer windows 7

Posted on 2010-11-13
4
3,051 Views
Last Modified: 2012-06-27
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
Same Problem
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"
WshShell.run "H:\Stories\Whales1\Whales1.exe

or
@echo off
Title A Whale of a Tale
set __COMPAT_LAYER=256Color
set __COMPAT_LAYER=Win98
H:\Stories\Whales1\Whales1.exe
set __COMPAT_LAYER=
exit
0
Comment
Question by:neviller2
  • 2
  • 2
4 Comments
 
LVL 27

Expert Comment

by:Tolomir
ID: 34131010
windows 7 professional (enterprise / ultimate) comes with the virtual xp mode. This is a complete isolated windows xp virtual machine.

You could run your script within the virtual machine. Virtual XPMode allows full access to all files (depending on permissions) of the windows 7 host system.

http://www.microsoft.com/windows/virtual-pc/download.aspx

Tolomir
0
 
LVL 27

Accepted Solution

by:
Tolomir earned 500 total points
ID: 34131022
Btw. have you tried already:

wshProcEnv("__COMPAT_LAYER") = "WinXPSp3"

Open in new window

0
 
LVL 1

Author Comment

by:neviller2
ID: 34131515
Thanks Tolomir, for your help.
It was the test machine I had setup.
The Script now works.
Sometimes the easiest solution is the hardest to find.

Virtual machine might be an option in the future, Will look into that.
Thanks.
0
 
LVL 1

Author Closing Comment

by:neviller2
ID: 34131529
Turned out to be my test Machine. Will check reason why test machine failed later.
0

Featured Post

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Today, still in the boom of Apple, PC's and products, nearly 50% of the computer users use Windows as graphical operating systems. If you are among those users who love windows, but are grappling to keep the system's hard drive optimized, then you s…
When you try to extract and to view the contents of a Microsoft Update Standalone Package (MSU) for Windows Vista, you cannot extract the files from the MSU. Here we are going to explain how to extract those hotfix details without using any third pa…
Windows 8 comes with a dramatically different user interface known as Metro. Notably missing from the new interface is a Start button and Start Menu. Many users do not like it, much preferring the interface of earlier versions — Windows 7, Windows X…
This Micro Tutorial will teach you how to the overview of Microsoft Security Essentials. This is a free anti-virus software that guards your PC against viruses, spyware, worms, and other malicious software. This will be demonstrated using Windows…

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question