Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

script compatibility layer windows 7

Posted on 2010-11-13
4
Medium Priority
?
3,316 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 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

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

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

When you try to share a printer , you may receive one of the following error messages. Error message when you use the Add Printer Wizard to share a printer: Windows could not share your printer. Operation could not be completed (Error 0x000006…
A quick guide on how to use Group Policy to create a custom power plan and set it active on Windows 7.
This Micro Tutorial will give you a introduction in two parts how to utilize Windows Live Movie Maker to its maximum capability. This will be demonstrated using Windows Live Movie Maker on Windows 7 operating system.
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…
Suggested Courses

876 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