cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Stray_Cat
Level 2

Impossible to debug one of executed custom actions

Hi,
I have a trouble with one of custom actions used in Basic MSI Projects.
A story was started from troubles with device driver installation. I have a FTDI virtual COM-ports driver with both i386 and 64bit support. I have read a lot of posts in Acresso conference about driver installing trics but I desided to distribute a driver package as is.

Then, I try to write a InstallScript function to looking for direct copying driver files possibility and create corresponding InstallScript custom action.
There's a function text:


function CopyFtdiDriver(hMSI)
CHAR res;
STRING source, target, filename, files, mes;
NUMBER nvBuff;

begin
res = 0; mes = "";

// copy inf files
files = "*.inf";
MsiGetProperty(hMSI, "DRV", source, nvBuff);
target = WindowsFolder+"\\inf";
if (XCopyFile(source ^ files, target ^ "*.*", COMP_NORMAL)<0) then
mes = "FTDI driver haven't been installed. Install this driver manually please.";
endif;

// copy sys files
files = "*.sys";
MsiGetProperty(hMSI, "I386", source, nvBuff);
target = SystemFolder+"\\drivers";
if (XCopyFile(source ^ files, target ^ "*.*", COMP_NORMAL)<0) then
mes = mes + "\nFTDI driver's files haven't been copied.\n";
mes = mes + "You must define FTDI driver's location when system ask you.\n";
endif;

// copy dll files
files = "*.dll";
target = SystemFolder;
if (XCopyFile(source ^ files, target ^ "*.*", COMP_NORMAL)<0) then
mes = mes + "\nFTDI driver's library files haven't been copied.\n";
mes = mes + "You must install FTDI driver manually when system ask you.\n";
endif;

if (mes == "") then
mes = "FTDI drivers were installed successfully";
endif;
MessageBox (mes, INFORMATION);
return 0;
end;


A custom action parameters:
[FONT="Courier New"]
CA Name: CopyFtdiDriverFiles
Return Processing: Syhchromous (Ignores exit code)
In-script Execution: Commit execution (I tryed a immediate and deffered execution eather).
Install Exec Secuence: After Publish Components
[/FONT]

When I running .msi package to install an application, I can debug a previous executed custom actions; but when a described CA is executed, I cannot debug it. Toggled breakpoint still be ignored too. In the end of installing process I see a MessageBox showed by my CA, XCopyFile functions return 0 (success, I add a debug MessageBoxes later), but them doesn't copying any file 😞

Then, the questions are:
1. Is it correct to copying a driver files to system folders (WindowsFolder and SystemFolder) as it wrote in my function (or other files in other folders)?
2. Why I cannot debug a function executed in described CA with debugger?
3. What can I do to debug CA placed after Publish Components?

Then, the questions are:
1. Is it correct to copying a driver files to system folders as it wrote in my function (or other files in other folders)?
2. Why I cannot debug a function executed in described CA?
3. What can I do to debug CA placed after Publish Components?

OS: Win2K SP4, WinXP
IS: InstallShield 2009 Premiere Edition.

With best regards, Dmitriy.
Labels (1)
0 Kudos
(1) Reply
Stray_Cat
Level 2

Additional information: log file content.
Client actions:

Action Name Start Time End Time Execution Time Return Value
INSTALL 20:03:48 20:05:37 109 seconds 1 - Success
AppSearch 20:03:48 20:03:48 0 seconds 1 - Success
LaunchConditions 20:03:48 20:03:48 0 seconds 1 - Success
SetupInitialization 20:03:48 20:03:49 1 seconds 1 - Success
FindRelatedProducts 20:03:49 20:03:49 0 seconds 0 - Action Skipped
ValidateProductID 20:03:49 20:03:49 0 seconds 1 - Success
CostInitialize 20:03:49 20:03:49 0 seconds 1 - Success
FileCost 20:03:49 20:03:49 0 seconds 1 - Success
IsolateComponents 20:03:49 20:03:49 0 seconds 0 - Action Skipped
setUserProfileNT 20:03:49 20:03:49 0 seconds 1 - Success
setAllUsersProfile2K 20:03:49 20:03:49 0 seconds 1 - Success
ResolveSource 20:03:49 20:03:49 0 seconds 1 - Success
CostFinalize 20:03:49 20:03:49 0 seconds 1 - Success
ISInitAllUsers 20:03:49 20:03:49 0 seconds 1 - Success
MigrateFeatureStates 20:03:49 20:03:49 0 seconds 0 - Action Skipped
InstallWelcome 20:03:49 20:04:07 18 seconds 1 - Success
CheckForTclAndDriverInstalled 20:03:51 20:03:58 7 seconds 1 - Success
SetupProgress 20:04:07 20:04:07 0 seconds 1 - Success
ExecuteAction 20:04:07 20:05:35 88 seconds 1 - Success
SetupCompleteSuccess 20:05:35 20:05:37 2 seconds 2 - User Cancelled


Why is "User Cancelled"?

Server actions:

INSTALL 20:04:10 20:05:33 83 seconds 1 - Success
AppSearch 20:04:10 20:04:10 0 seconds 0 - Action Skipped
LaunchConditions 20:04:10 20:04:10 0 seconds 1 - Success
FindRelatedProducts 20:04:10 20:04:10 0 seconds 0 - Action Skipped
ValidateProductID 20:04:10 20:04:10 0 seconds 1 - Success
CostInitialize 20:04:10 20:04:10 0 seconds 1 - Success
FileCost 20:04:10 20:04:10 0 seconds 1 - Success
IsolateComponents 20:04:10 20:04:10 0 seconds 0 - Action Skipped
CostFinalize 20:04:10 20:04:11 1 seconds 1 - Success
ISInitAllUsers 20:04:11 20:04:11 0 seconds 0 - Action Skipped
SetODBCFolders 20:04:11 20:04:11 0 seconds 0 - Action Skipped
MigrateFeatureStates 20:04:11 20:04:11 0 seconds 0 - Action Skipped
InstallValidate 20:04:11 20:04:13 2 seconds 1 - Success
RemoveExistingProducts 20:04:13 20:04:13 0 seconds 0 - Action Skipped
InstallInitialize 20:04:13 20:04:15 2 seconds 1 - Success
AllocateRegistrySpace 20:04:15 20:04:15 0 seconds 1 - Success
ProcessComponents 20:04:15 20:04:16 1 seconds 1 - Success
...................................................................................................
PublishComponents 20:04:22 20:04:22 0 seconds 0 - Action Skipped
CopyFtdiDriverFiles 20:04:22 20:04:23 1 seconds 1 - Success
MsiPublishAssemblies 20:04:23 20:04:23 0 seconds 0 - Action Skipped
PublishFeatures 20:04:23 20:04:23 0 seconds 1 - Success
PublishProduct 20:04:23 20:04:23 0 seconds 1 - Success
InstallFinalize 20:04:23 20:05:33 70 seconds 1 - Success
0 Kudos