Install in XP compatibility mode

So I've been charged with the task of creating a (completely) silent installer for Oracle 6i Client (and patch) for Windows Vista machines. The Oracle guys have created the appropriate RSP files and wrote a batch file for the install. However, you still have to set Compatibility = Windows XP (Service Pack2) on the .BAT file, the Orainst.exe and Setup.exe. For all the Googling I've done, I can't find a way to do this automatically. I would like to turn this into a VBScript to be pushed from an SCCM box. Any thoughts?

Thanks in advance,

P.S. - More details may be needed for an answer, so let me know what I've left out.

0 Comments   [ + ] Show comments

Answers (5)

Posted by: mrminer 12 years ago
Yellow Belt
So I found this: http://itninja.com/question/faulttree-108714&mpage=1&key=compatibility+mode&#58862

...which leads me to believe I'm screwed.
Posted by: robtk 12 years ago
Senior Purple Belt
You could try my shim script [:)]. Modify it to suit. I used this version of the script to install Congos 7.3 on Windows 7. It works perfectly.

' NAME: win7shim.vbs
' AUTHOR: Robtk
' DATE : 5/27/2010
' COMMENT: Sets the application compatibility registry keys for an executable.
' NOTE: This script and the executable it runs should be in the same directory.
'On Error Resume Next
Const HKEY_CURRENT_USER = &H80000001
Const HKEY_LOCAL_MACHINE = &H80000002
strComputer = "."
strFile = "issetup.exe"
'Get folder path of this vbScript
Set fso = CreateObject("Scripting.FileSystemObject")
strFolder = fso.GetParentFolderName(WScript.ScriptFullName)
strPath = strFolder & "\" & strFile
' Set the current directory
Set Shell = CreateObject("WScript.Shell")
Shell.CurrentDirectory = strFolder
' Write the Windows 7 shim registry keys
Shell.Run "REG.EXE ADD ""HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers""" & _
" /v " & Chr(34) & strPath & Chr(34) & " /t REG_SZ /d " & chr(34) & strValue & Chr(34) & " /f", 0, 1
Shell.Run "REG.EXE ADD ""HKCU\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers""" & _
" /v " & Chr(34) & strPath & Chr(34) & " /t REG_SZ /d " & chr(34) & strValue & Chr(34) & " /f", 0, 1
' Install Cognos 7.3
Set WshShell = WScript.CreateObject("WScript.Shell")
' Install the program. NOTE: issetup.exe exits immediately so we setup the loop below.
WshShell.Run (strFile & " -s response.ats")
' Setup loop to wait until install is finished.
Set oWmi = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
term = False
Do Until term = True
Set colProcessList = oWmi.ExecQuery("Select * from Win32_Process Where Name = '" & strFile & "'")
If colProcessList.Count = 0 Then
term = True
End If
WScript.sleep 4000
' Delete the registry key values created above since we don't need them anymore.
Set objRegistry=GetObject("winmgmts:\\" & strComputer & "\root\default:StdRegProv")
strKeyPath = "SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers"
strValueName = strPath
objRegistry.DeleteValue HKEY_CURRENT_USER, strKeyPath, strValueName
objRegistry.DeleteValue HKEY_LOCAL_MACHINE, strKeyPath, strValueName
Set objRegistry = Nothing
' Import the configuration
WshShell.Run "C:\Progra~1\Cognos\cer4\bin\configcp.exe -t Config2.ccp",, True
Posted by: Jsaylor 12 years ago
Second Degree Blue Belt
Compatibility mode is set as a flag in the registry for each executable. I'm sure you could google it up, but I find the best way to investigate things like this is to pick up a registry snapshot tool (I use regshot, there are about a million others that will work fine though.)

Just start your snapshot tool and take the initial snapshot, change your programs to whatever specific compatibility mode you're looking for, then take the second snapshot and compare. This technique works wonderfully for a lot of under-the-hood windows stuff that you may want to automate when there's no obvious way to do it.
Posted by: mrminer 12 years ago
Yellow Belt
Thanks for the replies. I wrote a little batch file that copies my install files to the local machine and then runs the reg merge. So far, so good.
I'll try incorporating that into a vbscript.
Posted by: orlith 11 years ago
Orange Senior Belt

Thks for this tips and script

By the way I'm not able to delete the registry value I set. It seems that if the vakuekey got space in the name you're not able to remove it.
What ever I tried, playing with quote and double quote and Chhr(34)..... I always got a swbemobjectex type mismatch....
I'm so not able to delete this key "C:\Cognos Powerplay 7.4\Cognos\ppu\issetup.exe"

Any hepl appreciate... otherwise I'll let those key exist , which is not a crtical action :)

Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login


This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ