Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

script compatibility layer windows 7

Posted on 2010-11-13
4
Medium Priority
?
3,249 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 1500 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

Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

Question has a verified solution.

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

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.
OfficeMate Freezes on login or does not load after login credentials are input.
This Micro Tutorial will give you basic overview of the control panel section on Windows 7. It will depth in Network and Internet, Hardware and Sound, etc. This will be demonstrated using Windows 7 operating system.
The viewer will learn how to successfully create a multiboot device using the SARDU utility on Windows 7. Start the SARDU utility: Change the image directory to wherever you store your ISOs, this will prevent you from having 2 copies of an ISO wit…
Suggested Courses

705 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