/build/static/layout/Breadcrumb_cap_w.png

How to add file via orca

i want to add file via orca in package. i m unable to edit vendor msi in WISE.
please suggest me steps to add file

0 Comments   [ + ] Show comments

Answers (20)

Posted by: sumeetgjain 16 years ago
Senior Yellow Belt
5
STEP:-

1] Make the .CAB FILE of the File you want to add using makecab command.

Makecab [Source] [Destination]

Where source = path of the file along with file name
Destination = Path where You want .CAB file.

2] Go to Component Table

A] Make component with the name of the file you want to add
B] Set the directory column with the path where you want to install the file.

3] Go to featurecomponent Table

A] Associate the component made in step 2 with the feature (Complete in case of captured Application).

4] Go to File table

A] Add Row
B] Give File name, Component column should contain the name of component made in step 2
C] File Size column should contain file size in KB.
D] Its attribute should be set to 16384 as file source type is compressed
E] Its Sequence column should be set to the last sequence in that table.
5] Go to media table
A] Add row with unique diskid, Lastsequence no should be set to the sequence no give in the file table & cabinet column should contain the name of .CAB file we made in step 1.
Posted by: AngelD 16 years ago
Red Belt
1
There should also be 2] C and D.
C] Some Attributes (column) attribute bits that may be of interest:
msidbComponentAttributesLocalOnly, msidbComponentAttributesSourceOnly or msidbComponentAttributesOptional
msidbComponentAttributesSharedDllRefCount
msidbComponentAttributesPermanent
msidbComponentAttributesNeverOverwrite

D] Set the KeyPath column to the primary key for the added file.
Posted by: cygan 16 years ago
Fifth Degree Brown Belt
0
you have an option in wise to use the mst template
Posted by: matrixtushar 16 years ago
Purple Belt
0
hi,

will post you the steps on monday... sure!

with best regards,
tushar singh
Posted by: Tone 16 years ago
Second Degree Blue Belt
0
Set file version if it has one
Posted by: AngelD 16 years ago
Red Belt
0
Complement to Tone's tip;
Add an entry to the MsiFileHash table for non-versioned files.

Thanks for pointing that out Tone.
Posted by: Tone 16 years ago
Second Degree Blue Belt
0
I was going to mention the hash but dont have a clue how you would generate one manually [:)]
Posted by: AngelD 16 years ago
Red Belt
0
Well, here is a vbscript for you my friend

Dim FilePath : FilePath = WScript.Arguments(0)

Dim Installer : Set Installer = CreateObject("WindowsInstaller.Installer")
Dim Record : Set Record = Installer.FileHash(FilePath, 0)
Dim FileHash = Record.StringData(1) & vbTab & Record.StringData(2) & vbTab & Record.StringData(3) & vbTab & Record.StringData(4)

WScript.Echo "FileHash: " & FileHash
Posted by: Tone 16 years ago
Second Degree Blue Belt
0
Thanks!
Posted by: Bobo 15 years ago
Orange Belt
0
Thanks for the script, I had to modify it just a bit, added the part in red.

Dim FilePath : FilePath = WScript.Arguments(0)

Dim Installer : Set Installer = CreateObject("WindowsInstaller.Installer")
Dim Record : Set Record = Installer.FileHash(FilePath, 0)
Dim FileHash : FileHash = Record.StringData(1) & vbTab & Record.StringData(2) & vbTab & Record.StringData(3) & vbTab & Record.StringData(4)

WScript.Echo "FileHash: " & FileHash
Posted by: AngelD 15 years ago
Red Belt
0
Good catch Bobo!
Posted by: GTVic 13 years ago
Senior Yellow Belt
0
I created a larger script based on the info here. Maybe it will help. The main problem is that you have to type all the values into Orca somehow.

What I did was add a new transform to my MSI so the MSI was not touched, then I added 1 dummy entry to the File and MsiFileHash tables and then used the Export Tables function to create two IDT files for those tables. Then I deleted the dummy entries.

Then I used Notepad to open the IDT files and removed the dummy entries, basically they were just there to show how and where to add new entries. I created a script to generate valid entries for the two IDT files and just did a copy/paste.

Finally, I imported the modified IDT files back into Orca (used the merge option) which added the new entries to my transform.

The trick is to understand how the script works and modify it for your own situation.


Set oWSH = CreateObject("WScript.Shell")
Set oFSO = CreateObject("Scripting.FileSystemObject")
Set oNET = CreateObject("WScript.Network")
Set Installer = CreateObject("WindowsInstaller.Installer")
strSFN = WScript.ScriptFullName
sAppPath = Left(strSFN, InStrRev(strSFN, "\"))
sSourcePath = sAppPath

strLogPath = sSourcePath & "HashEntries.txt"
Set oHashFile = oFSO.CreateTextFile(strLogPath, TRUE)
strLogPath = sSourcePath & "FileEntries.txt"
Set oFileFile = oFSO.CreateTextFile(strLogPath, TRUE)

iSeq = CInt(InputBox("Enter the starting sequence number","Sequence","6789"))
sCurPath = sSourcePath & "Folder1"
strPrefix = InputBox("Enter a prefix for the file name keys","Prefix for File Name Keys","Prefix")
strComponent = InputBox("Enter a component name for files in " & sCurPath,"Component Name","Component")
Set f = oFSO.GetFolder(sCurPath)
Set fc = f.Files

For Each f1 in fc
If Right(UCase(f1.Name),4) = ".STB" Then
Set Record = Installer.FileHash(sCurPath & "\" & f1.Name, 0)
FileHash = "0" & vbTab & Record.StringData(1) & vbTab & Record.StringData(2) & vbTab & Record.StringData(3) & vbTab & Record.StringData(4)
strKey = strPrefix & "_" & GetCleanName(f1.Name) & "_" & CStr(iSeq)
oHashFile.WriteLine strKey & vbTab & FileHash
oFileFile.WriteLine strKey & vbTab & strComponent & vbTab & GetDoubleName(f1) & vbTab & CStr(f1.Size) & vbTab & vbTab & vbTab & "0" & vbTab & CStr(iSeq)
iSeq = iSeq + 1
End If
Next

sCurPath = sSourcePath & "Folder2"
strComponent = InputBox("Enter a component name for files in " & sCurPath,"Component Name","Component")
Set f = oFSO.GetFolder(sCurPath)
Set fc = f.Files

For Each f1 in fc
If Right(UCase(f1.Name),4) = ".CTB" Then
Set Record = Installer.FileHash(sCurPath & "\" & f1.Name, 0)
FileHash = "0" & vbTab & Record.StringData(1) & vbTab & Record.StringData(2) & vbTab & Record.StringData(3) & vbTab & Record.StringData(4)
strKey = strPrefix & "_" & GetCleanName(f1.Name) & "_" & CStr(iSeq)
oHashFile.WriteLine strKey & vbTab & FileHash
oFileFile.WriteLine strKey & vbTab & strComponent & vbTab & GetDoubleName(f1) & vbTab & CStr(f1.Size) & vbTab & vbTab & vbTab & "0" & vbTab & CStr(iSeq)
iSeq = iSeq + 1
End If
Next

oHashFile.Close
oFileFile.Close
MsgBox "Done", 0 , "Done"

Function GetCleanName(ByVal FName)
a = Len(FName)
For b = 1 to a
s = Mid(FName,b,1)
If Asc(s) = 46 Then
s = s
ElseIf Asc(s) < 48 Then
s = "_"
ElseIf (Asc(s) > 57) AND (Asc(s) < 65) Then
s = "_"
ElseIf (Asc(s) > 90) AND (Asc(s) < 97) Then
s = "_"
ElseIf Asc(s) > 122 Then
s = "_"
End If
FName = Left(FName,b-1) & s & Mid(FName,b+1)
Next
GetCleanName = FName
End Function

Function GetDoubleName(ByRef objFile)
If UCase(objFile.ShortName) <> UCase(objFile.Name) Then
GetDoubleName = objFile.ShortName & "|" & objFile.Name
Else
GetDoubleName = objFile.Name
End If
End Function
Posted by: rock_star 13 years ago
4th Degree Black Belt
0
i think this will be useful

http://www.symantec.com/connect/blogs/add-file-msi-using-orca
Posted by: rlinhartpdx 12 years ago
Orange Belt
0
I'm trying to use this info to create an MST for the Adobe AIR 3.0.1.4880 MSI. I'll be distributing my custom installation with SCCM 2007. I'm using the ORCA editor, which doesn't really seem to like this MSI. One solution is to remove the SetSHAREDADDINFOLDER row from the CustomAction table. This causes ORCA to fail. I was successful with an alternate which is to set a value such as "c:\" for the SHAREDADDINFOLDER property.

OK, so now I have a working MST. The first modification is to add a registry key to disable auto-updates. Easy-peesy.

The problem I'm having is, to pre-accept the EULA I have to copy a file, eulaAccepted, whose content is "3" to %ALLUSERSPROFILE%\Application Data\Adobe\AIR. I followed the instructions above but the MST fails validation complaining about the Directory_ value in the Component table, "%ALLUSERSPROFILE%\Application Data\Adobe\AIR". Checking the documentation indicates this value is supposed to be an external key of an entry in the Directory table, not a literal path.

No problemo, I head off for the Directory table. I add a row with Directory_Parent null and DefaultDir "%ALLUSERSPROFILE%\Application Data\Adobe\AIR". No good. Reading documentation for the Directory table suggests you can only have one null Directory_Parent which identifies the root directory. This is all fine and good if all the files target the root directory or one of its child directories but not sure how to populate the table when the target is outside the root directory.
Posted by: anonymous_9363 12 years ago
Red Belt
0
- Does Adobe not have a Customization Wizard for this app?
- Using Orca for editing MSIs is a guaranteed way of ensuring an early check-in to the Ronald Reagan Home For The Permanently Bewildered. Get a proper tool.
- You cannot use environment variables in that way and you cannot use properties in the Directory table. Open an existing MSI to see how the Directory table is constructed and note the names of some of the "built-in" directories e.g. 'Windows\Profiles'.
- Does the Directory table include entries for all the folders in the path you want to create? As in one for 'AIR' (Windows\Profiles\All Users\Application Data\Adobe\AIR), one for 'Adobe' (Windows\Profiles\All Users\Application Data\Adobe) and so on?
- Have you created a new component for the file and added it to the FeatureComponent table?
Posted by: rlinhartpdx 12 years ago
Orange Belt
0
@VBScab, love your avatar!

Adobe doesn't have a customization tool for this app. I can pre-accept the EULA with a command line option but no command line option to disable auto-updates. I haven't customized any app installers for some time so I'm using this as, hopefully, a simple app to get back up to speed. I do have other tools but am committed to learning how to use ORCA for simple customizations. If that means a visit to the Ronald Reagan Home for the Permanently Bewildered, I've been there before. ::grin::

The documentation for the Directory table states there can be only one root directory. I guess I'm not clear on the context of this table as it relates to source and destination of my custom, eulaAccepted text file. On the commute this morning I read about standard actions and am still not clear I understand all the tables I need to populate to have my file copied to the ALLUSERS profile. The instructions in the thread above do not seem to be complete and to be contradictory with the MS documentation.

I'll be working on this all day so comment frequently and often! Thanks.
Posted by: anonymous_9363 12 years ago
Red Belt
0
I guess I'm not clear on the context of this tableDownload & digest Phil Wilson's ouevre, The Definitive Guide To Windows Installer. Then get your employer to spring for InstallShield AdminStudio. Honestly, doing this junk - other than QAD edits -in Orca is really above and beyond.
Posted by: rlinhartpdx 12 years ago
Orange Belt
0
I just ordered the book from Amazon. :)

We have Wise Studio Pro but I'm not sure we have a healthy installation or documentation. At this point I'm not sure I've installed it properly or where everything's supposed to go. With Symantec's announcement to EOL Wise we are now discussing if we want to work on getting Wise straightened out or switch to Admin studio.

I've got to say your comments about using ORCA or InstEdit are not helpful. For simple things like changing or adding a registry key, these are the quickest tools for the job. I don't mind investing in learning these apps. I've got a pretty good idea when and when not to use these tools in favor of a more feature rich MSI authoring tool. Based on what I know at this point, I should be able add a source file and copy to the correct location with an MST. I don't plan to change course on this until I've exhausted all my resources.

I did wind up on Wikipedia today and am finding the Windows Installer helpful to get the basic concepts back into my head.
Posted by: anonymous_9363 12 years ago
Red Belt
0
Amazon must be overjoyed that they made a sale for an item that can be downloaded for nothing.

As for Orca/InstEdit, I use the latter daily but - no offence - I know what I'm doing.

Lastly, coming to WPS, you would be best advised to completely uninstall it and start again. Trying to fix it will open up a world of pain. The instructions in the installation documentation are pretty straightforward. I suggest that you practise the install on a couple of VMs, one for the SQL Server element and one for the client. Once you have it down, you can then do it "for real".
Posted by: rlinhartpdx 12 years ago
Orange Belt
0
Looks like I know what I'm doing too. [;)] I've got a shiny Adobe AIR MST that performs a silent install, disables updates with a registry key and pre-accepts the Eula by copying a custom file. I've also confirmed everything gets removed during uninstall (Adobe's and my custom settings). The articles I found here at AppDeploy got me started but I didn't find any single article that explained all the steps involved. Between here and MSDN/Technet I found all the information I needed to figure this out (an example would have been nice). I plan to share my MST as soon as I figure out the AppDeploy MST sanitation app.
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
 
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