This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Re: Custom Action parameter
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 05, 2008
03:54 PM
Custom Action parameter
I want to create a custom action that calls a function in a DLL or EXE and passes along as a parameter the directory the setup.exe was in when the user ran it. Is that possible? Not the temp folder the msi and other files get extracted to.
When I create a new custom action, Standard DLL, Stored in Binary Table, is there somewhere I can go to look at this Binary Table thing?
Do I have to add the DLL/EXE to the Binary Table myself or does it get added to the table when I browse for the DLL?
Daniel
When I create a new custom action, Standard DLL, Stored in Binary Table, is there somewhere I can go to look at this Binary Table thing?
Do I have to add the DLL/EXE to the Binary Table myself or does it get added to the table when I browse for the DLL?
Daniel
(4) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 05, 2008
04:05 PM
Three questions that may help us to help you:
1.- Is your action a immediate or deferred action?
2.- Are you coding the DLL?
3.- Is this a basic MSI project (I assuming so)
If working with a basic MSI project you must refer to the property SETUPEXEDIR that contains the path to the setup.exe.
if your action is deferred you must create a 'set property' action that pass the path contain on SETUPEXEDIR to your action in the 'CustomActionData' property. Read the help for 'Accessing or Setting Windows Installer Properties Through Deferred, Commit, and Rollback Custom Actions.'
1.- Is your action a immediate or deferred action?
2.- Are you coding the DLL?
3.- Is this a basic MSI project (I assuming so)
If working with a basic MSI project you must refer to the property SETUPEXEDIR that contains the path to the setup.exe.
if your action is deferred you must create a 'set property' action that pass the path contain on SETUPEXEDIR to your action in the 'CustomActionData' property. Read the help for 'Accessing or Setting Windows Installer Properties Through Deferred, Commit, and Rollback Custom Actions.'
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 05, 2008
04:16 PM
1.- Is your action a immediate or deferred action?
Doesn't matter to me, I got one custom action working as deferred but I don't know how to access the directory the EXE is in.
2.- Are you coding the DLL?
Yes.
3.- Is this a basic MSI project (I assuming so)
Yes.
Doesn't matter to me, I got one custom action working as deferred but I don't know how to access the directory the EXE is in.
2.- Are you coding the DLL?
Yes.
3.- Is this a basic MSI project (I assuming so)
Yes.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 05, 2008
04:24 PM
If you are refering to the directory where the setup.exe is you can use the SETUPEXEDIR property.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 06, 2008
09:40 AM
SETUPEXEDIR sounds like what I'm looking for. In the function signature dialog I set the following right?
Type - STRING
Source - Constant
Value - [SETUPEXEDIR]
I'm getting an error: "The DLL being called encountered a problem"
The action I have setup as:
Return Processing - Synchronous(ignore exit code)
In-Script Execution - Immediate Execution
Execution Scheduling - Always execute
Install Exec Sequence - After InstallFiles
The log show it starting my custom action:
MSI (s) (00:A8) [09:18:09:387]: Doing action: SetDefaultINIPath
Action 9:18:09: SetDefaultINIPath.
Action start 9:18:09: SetDefaultINIPath.
MSI (s) (00:A8) [09:18:09:434]: Creating MSIHANDLE (12) of type 790542 for thread 3496
MSI (s) (00:74) [09:18:09:434]: Invoking remote custom action. DLL: C:\Windows\Installer\MSIDB91.tmp, Entrypoint: DLL1
MSI (s) (00!08) [09:18:09:496]: Creating MSIHANDLE (13) of type 790541 for thread 3080
MSI (s) (00!08) [09:18:09:496]: Creating MSIHANDLE (14) of type 790540 for thread 3080
MSI (s) (00!08) [09:18:09:496]: Creating MSIHANDLE (15) of type 790531 for thread 3080
MSI (s) (00!08) [09:18:09:496]: Closing MSIHANDLE (15) of type 790531 for thread 3080
MSI (s) (00!08) [09:18:09:512]: Closing MSIHANDLE (14) of type 790540 for thread 3080
MSI (s) (00!08) [09:18:09:512]: Creating MSIHANDLE (16) of type 790540 for thread 3080
MSI (s) (00!08) [09:18:09:512]: Creating MSIHANDLE (17) of type 790531 for thread 3080
MSI (s) (00!08) [09:18:09:528]: Closing MSIHANDLE (17) of type 790531 for thread 3080
MSI (s) (00!08) [09:18:09:528]: Closing MSIHANDLE (16) of type 790540 for thread 3080
MSI (s) (00!08) [09:18:09:528]: Closing MSIHANDLE (13) of type 790541 for thread 3080
MSI (s) (00:74) [09:20:09:387]: Closing MSIHANDLE (12) of type 790542 for thread 3496
Action ended 9:20:09: SetDefaultINIPath. Return value 1.
Not sure how to tell what's wrong. My test program can call the DLL so I know the DLL is working. Any ideas on what I'm doing wrong?
Type - STRING
Source - Constant
Value - [SETUPEXEDIR]
I'm getting an error: "The DLL being called encountered a problem"
The action I have setup as:
Return Processing - Synchronous(ignore exit code)
In-Script Execution - Immediate Execution
Execution Scheduling - Always execute
Install Exec Sequence - After InstallFiles
The log show it starting my custom action:
MSI (s) (00:A8) [09:18:09:387]: Doing action: SetDefaultINIPath
Action 9:18:09: SetDefaultINIPath.
Action start 9:18:09: SetDefaultINIPath.
MSI (s) (00:A8) [09:18:09:434]: Creating MSIHANDLE (12) of type 790542 for thread 3496
MSI (s) (00:74) [09:18:09:434]: Invoking remote custom action. DLL: C:\Windows\Installer\MSIDB91.tmp, Entrypoint: DLL1
MSI (s) (00!08) [09:18:09:496]: Creating MSIHANDLE (13) of type 790541 for thread 3080
MSI (s) (00!08) [09:18:09:496]: Creating MSIHANDLE (14) of type 790540 for thread 3080
MSI (s) (00!08) [09:18:09:496]: Creating MSIHANDLE (15) of type 790531 for thread 3080
MSI (s) (00!08) [09:18:09:496]: Closing MSIHANDLE (15) of type 790531 for thread 3080
MSI (s) (00!08) [09:18:09:512]: Closing MSIHANDLE (14) of type 790540 for thread 3080
MSI (s) (00!08) [09:18:09:512]: Creating MSIHANDLE (16) of type 790540 for thread 3080
MSI (s) (00!08) [09:18:09:512]: Creating MSIHANDLE (17) of type 790531 for thread 3080
MSI (s) (00!08) [09:18:09:528]: Closing MSIHANDLE (17) of type 790531 for thread 3080
MSI (s) (00!08) [09:18:09:528]: Closing MSIHANDLE (16) of type 790540 for thread 3080
MSI (s) (00!08) [09:18:09:528]: Closing MSIHANDLE (13) of type 790541 for thread 3080
MSI (s) (00:74) [09:20:09:387]: Closing MSIHANDLE (12) of type 790542 for thread 3496
Action ended 9:20:09: SetDefaultINIPath. Return value 1.
Not sure how to tell what's wrong. My test program can call the DLL so I know the DLL is working. Any ideas on what I'm doing wrong?