Solved

script compatibility layer windows 7

Posted on 2010-11-13
4
3,020 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Name space syntax error 12 44
Not showing page correctly 3 31
Run time Error 4 35
new year deals on hware.. 4 16
If you get continual lockouts after changing your Active Directory password, there are several possible reasons.  Two of the most common are using other devices to access your email and stored passwords in the credential manager of windows.
By default the complete memory dump option is disabled in windows . If we want to enable the complete memory dump for a diagnostic purpose, we have a solution for it. here we are using the registry method to enable this.
This Micro Tutorial will teach you the basics of configuring your computer to improve its speed. It will also teach you how to disable programs that are running in the background simultaneously. This will be demonstrated using Windows 7 operating…
This Micro Tutorial will give you a basic overview of Windows DVD Burner through its features and interface. This will be demonstrated using Windows 7 operating system.

863 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

Need Help in Real-Time?

Connect with top rated Experts

28 Experts available now in Live!

Get 1:1 Help Now