Wednesday, September 3, 2014

Slipstream Commandline for Adobe Patches

Copy the main adobe msi and all adobe patches into the desktop

Run the below command line in CMD

Msiexec /a adobe.msi /p adobe1.msp;adobe2.msp;adobe3.msp

Press Enter

It will prompt the welcome screen, Click Next

It will ask for the network location. Give the local computer location as like below



Click install.

Once the installation is finished. We will get  the files in the given location.(C:\Newfolder)

Copy all the files from newfolder and place in the packaging location.

From the packaging location run adobe msi. It will install with patches.
 

How to disable or install a feature in MSI

In Feature Table, Goto Level of the particular feature which as to be disabled and  set it to 0

Another way to disable feature is set the feature level to above the value of INSTALLEVEL property value.

If INSTALLLEVEL property value is 100, then feature level has to be any value above 100.


By using properties:

ADDLCOAL=ALL (For installing all the features)

In MSI feature table. we can see the feature name. If we want to install the particular feature. Get feature name from msi feature table and add in the ADDLOCAL property

For Example:
ADDLOCAL=Test,Sample
 

Deleting entries in ora file using VBscript

Create one temp.ora file in the location of Vbscript and add the entries manually in temp.ora file.

When executing vb script it will compare the temp.ora file with test.ora in this  location(\oracle\product\11.0.0.0.0\network\admin\) and it will delete accordingly.


On Error Resume Next
Const ForReading = 1
Const ForWriting = 2

Set Wshshell = CreateObject("Wscript.Shell")
Set objFSO   = CreateObject("Scripting.FileSystemObject")

StrCurrPath = Replace(Wscript.ScriptFullName,Wscript.ScriptName,"")
ORAFilePath   = Wshshell.ExpandEnvironmentStrings("%systemdrive%") & "\oracle\product\11.2.0.2.0\network\admin\"
ORAFilePath     = ORAFilePath & "test.ora"
TmpORAFilePath = StrCurrPath & "temp.ora"


Set objORAfile = objFSO.OpenTextFile(ORAFilePath, ForReading)
 StrReadORAFile= objORAfile.ReadAll
objORAFile.Close

Set objTmpORAfile = objFSO.OpenTextFile(TmpORAFilePath, ForReading)
 StrReadTmpORAFile= objTmpORAfile.ReadAll
objTmpORAfile.Close


If Instr(StrReadORAFile,StrReadTmpORAFile) <> 0 then
StrData = Replace(StrReadORAFile,StrReadTmpORAFile,"")
Set objORAfile = objFSO.OpenTextFile(ORAFilePath, ForWriting)
objORAfile.Write StrData
objORAfile.close

End If

Appending entries in ora file using VBscript

Create one temp.ora file in the location of Vbscript and add the entries manually in temp.ora file.

When executing vb script it will compare the temp.ora file with test.ora in this  location(\oracle\product\11.0.0.0.0\network\admin\) and it will append accordingly.

On Error Resume Next
Const ForReading = 1
Const ForWriting = 2
const ForAppending = 8

Set Wshshell = CreateObject("Wscript.Shell")
Set objFSO   = CreateObject("Scripting.FileSystemObject")

StrCurrPath = Replace(Wscript.ScriptFullName,Wscript.ScriptName,"")
ORAFilePath   = Wshshell.ExpandEnvironmentStrings("%systemdrive%") & "\oracle\product\11.0.0.0.0\network\admin\"
ORAFilePath     = ORAFilePath & "Test.ora"
TmpORAFilePath = StrCurrPath & "Temp.ora"

Set objORAfile = objFSO.OpenTextFile(ORAFilePath, ForReading)
 StrReadORAFile= objORAfile.ReadAll
objORAFile.Close


Set objTmpORAfile = objFSO.OpenTextFile(TmpORAFilePath, ForReading)
 StrReadTmpORAFile= objTmpORAfile.ReadAll
objTmpORAfile.Close

If Instr(StrReadORAFile,StrReadTmpORAFile) = 0 then
Set objORAfile = objFSO.OpenTextFile(ORAFilePath, ForAppending)
 objORAfile.Writeline StrReadTmpORAFile
objORAFile.Close

End if