I'm following the instructions posted by AB on how to create a mst for installing QuickTime.

I'm using OCRA, and I've got to the point where you add two custom actions to the CustomAction table, ie running an execuable Custom Action ‘RunNTSD’ – Execute Program from Destination [SystemFolder] – kills QTTask.exe (system tray icon) ntsd.exe -pn qttask.exe -c "q") and running an vbscript Custom Action ‘setQTTaskRunFlags’ – Call VB script from Embedded Code – disables the QuickTime system tray icon.

After some investigation, I assume that I add the executable with a CustomAction type of 34, and the vbScript with a CustomAction type of 6. This is the point when I get stumped.

Looking at the Microsoft web site entry for Custom Action Type 34, the Source field is expected to be a Key to Directory table. How do I find this out?

For the Custom Action Type 6, again the Source is suppose to be a key to the Binary table. I assume to add the vbscript I write the code into a file (ie script.vbs) , and then add the file into the binary table.

This is my first serious attempt at editing MSI files and creating MST files, and don't have access to InstallShield, so any help would be appreciated!
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
Looking at the Microsoft web site entry for Custom Action Type 34, the Source field is expected to be a Key to Directory table. How do I find this out?

Find the QTTask.exe file in the File table and have a look at the Component column.
Go to the Component table and find the component from the Component column in the File table for the QTTask.exe file.
The Directory column value is what your are after.

I assume to add the vbscript I write the code into a file (ie script.vbs) , and then add the file into the binary table.
Thats a correct assumption.
Answered 08/24/2006 by: AngelD
Red Belt

Please log in to comment
0
I've searched the File table but cannot find a mention of the file qttask.exe, even after trying to find a file with the same size. Installing Quicktime on a machine shows that the file does exist in this version, so is there another way or do I need to find the file?

Re: The VBScript, this is what I've done.

I found another Package Instructions that included adding a vbscript to the customtable, so I created a .vbs file with the vbscript, and then added it into the Binary table, calling it setQTTaskRunFlags. I then added the following to the CustomAction Table

Action | Type | Source | Target
setQTTaskRunFlags | 6 | Call setQTTaskRunFlags | N/A

However, when I try to validate the package I get the error Not a foreign key; Table: CustomAction, Column: Source, Key(s):setQTTaskRunFlags
Answered 08/24/2006 by: claudius
Senior Yellow Belt

Please log in to comment
0
If qttask.exe is located in ex. "C:\Program Files\QuickTime" (after installed the application) then go to the Directory table and verify that the INSTALLDIR directory is pointing to this folder. If thats true then use INSTALLDIR, if not then find the proper directory to reference to.

Add the vbscript to the Binary table and set the Name column to "setQTTaskRunFlags", then the validation should be resolved.
You also have to add the CA to the InstallExecuteSequence table.
Answered 08/24/2006 by: AngelD
Red Belt

Please log in to comment
0
I checked the INSTALLDIR in the Directory Table, and found that the value was just a full stop. I remembered that in the Quicktime Package instrcutions somebody had mentioned that it wasn't configured in the installer, as it was expecting it to be set by the comand line, so after a bit of trial and error I have set it to .:PROGRA~1|QuickTime, which appears to validate properly.

I then added it to the CustomAction table as follows:

Action | Type | Source | Target
RunNTSD | 34 | INSTALLDIR | [%SystemFolder]\ntsd.exe -pn qttask.exe -c "q"

Which successfully validates.

Regarding the vbscript, I have checked and it appears that the setQTTaskRunFlags record is added already.

Following the instructions in the previous post I mentioned which atted a vbscript to the Custom Table, I added the following row to the InstallExecuteSequence table.

Action | Condition | Sequence
setQTTaskRunFlags | NOT REMOVE | 6700

I assume that the number is the order in which everything is actioned. 6700 (From the previous post) is the highest number, so I assume the last event to be actioned.
Answered 08/24/2006 by: claudius
Senior Yellow Belt

Please log in to comment
0
Hi Claudius,
your on the right track. For the CA 34 use the 'SystemFolder' property from the directory table, because the ntsd.exe lies in there. However, i try to avoid such a setup, because nobody can guarantee the presence of such tools on all systems. Therefore, i would put it also into the binary table and call it from there. Another possibility would be to use taskkill.exe for this job (that's what i do).

With the vbs-CA you are close too. If you use a type 6 then you have to put the vbs-file into the binary table (with ORCA or your preferred MSI-Editor) and set the target column to the name of the entry in the binary table.
Your example would look like this:
Action | Type | Source | Target
<NameOfTheCA> | 6 | setQTTaskRunFlags | N/A

If you want to put the vbs code directly into the CA you set the type to 38, leave the source column empty and put the vbs-code into the target column (You have to separate the commands by ':').

Another option would be to do registry-change with the reg.exe command, as some people have suggested in the Appdeploy QT7 KB.

Hope this helps a bit.

Regards, Nick
Answered 08/24/2006 by: nheim
Tenth Degree Black Belt

Please log in to comment
0
Thanks for your help guys. I've managed to get it working apart from the ntsd.exe bit, but I'll have a look of that offline.
Answered 09/18/2006 by: claudius
Senior Yellow Belt

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