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,
Chris

P.S. - More details may be needed for an answer, so let me know what I've left out.
0 Comments   [ + ] Show Comments

Comments

Please log in to comment

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

Answers

0
So I found this: http://itninja.com/question/faulttree-108714&mpage=1&key=compatibility+mode&#58862

...which leads me to believe I'm screwed.
Answered 06/25/2010 by: mrminer
Yellow Belt

Please log in to comment
0
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
strValue = "WINXPSP2 RUNASADMIN"
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
Loop
' 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
WScript.Quit(0)
Answered 06/28/2010 by: robtk
Senior Purple Belt

Please log in to comment
0
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.
Answered 06/28/2010 by: Jsaylor
Second Degree Blue Belt

Please log in to comment
0
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.
Answered 06/29/2010 by: mrminer
Yellow Belt

Please log in to comment
0
HI

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 :)

Thx
Answered 03/15/2012 by: orlith
Orange Senior Belt

Please log in to comment
Answer this question or Comment on this question for clarity