PDA

View Full Version : Merge Modules with Script Project



JJS2002
09-23-2003, 01:00 PM
I have an InstallScript project with Windows common controls modules in it as well as a few others. When I run the setup, these never get installed. I have followed the documentation on this subject but with no success. I am including the MSI engine object above the merge modules in the feature view. Am I missing something? Also, does anyone know if there are installscript objects to replace most of these merge modules so I can get rid of the windows installer all together?

KentFoyer
09-23-2003, 02:58 PM
I am unclear whether the feature (or component) that the object is inserted under is actually getting installed.
Would you do three things:
1) Confirm the feature that the object is inserted is actually getting installed.

2) Get status from the object. Query the object for status in the OnBegin and OnMoved events. The object should return why it couldn't transfer the files. See sample code below (you'll have to declare some variables):

try
set oObject = GetObject("Merge Module Holder Object");

if (!IsObject(oObject)) then
MessageBox( "Failed to get object reference.", INFORMATION );
endif;

set oStatus = oObject.Status;

if ( oStatus.Number != OBJ_STATUS_SUCCESS) then
Sprintf( szStatus, "Merge Module Holder Object\n\nNumber:\t\t%d\n" +
"Description:\t%s\nFile:\t\t%s\nLine:\t\t%d\nScript Error:\t%d",
oStatus.Number, oStatus.Description, oStatus.szScriptFile,
oStatus.nScriptLine, oStatus.nScriptError );
MessageBox( szStatus, SEVERE );
endif;
catch
endcatch;

3) Would you log the Msi part. What I do when testing Msi installs is make a registry entry so that every Msi install is automatically logged and the log is placed in the Temp directory. The log will have a name like this: Msi*.log. The reg entry is:
Make sure the following key exists: "HKLM\SOFTWARE\Policies\Microsoft\Windows\Installer". Add the string name, "Logging" with a value of "pv".

Again, please verify 1). Then please do 2) and 3). If you post the results of 2) and 3) then, perhaps, I can figure out what is wrong.

Kent