Custom actions question
Launch custom action manually? Say just for the heck of it I would want to run the action manually from the command line. How do I determine exactly how the custom action is getting run? Example line from CustomAction table:
StartBtWizardSilentMode 81 F84988_btins.dll
BTINS_StartBtWizardSilentMode
It looks like this custom action points to btins.dll so I would guess that it gets run by rundll32.exe?
0 Comments
[ + ] Show comments
Answers (16)
Please log in to answer
Posted by:
aogilmor
15 years ago
you can probably use run32dll.exe, just extract your dll from the resource table to a file on your hard disk, then execute RUNDLL32.EXE and give it the path and arguments for the dll file. Not sure what output you might get, it depends on the dll author (it might get nothing outside of an MSI).
Let us know how it goes, I've never done this but it looks interesting!
Let us know how it goes, I've never done this but it looks interesting!
Posted by:
WayneB
15 years ago
Posted by:
aogilmor
15 years ago
Posted by:
nheim
15 years ago
Hi Joe,
to call it, use:
RUNDLL32.EXE F84988_btins.dll, BTINS_StartBtWizardSilentMode
Almost for sure, you have to "translate" the file name "F84988_btins.dll" to its real name. Just search the MSI's file table for it.
But be aware: This might work, work partly or does nothing.
It depends on the environment, the DLL expects. If it relays on being called by Windows Installer, you can forget this.
But you got some chances here, because normally, CA DLL's called by the Installer are embedded into the MSI's binary table and invoked true CA type 1.
Good luck.
Regards, Nick
to call it, use:
RUNDLL32.EXE F84988_btins.dll, BTINS_StartBtWizardSilentMode
Almost for sure, you have to "translate" the file name "F84988_btins.dll" to its real name. Just search the MSI's file table for it.
But be aware: This might work, work partly or does nothing.
It depends on the environment, the DLL expects. If it relays on being called by Windows Installer, you can forget this.
But you got some chances here, because normally, CA DLL's called by the Installer are embedded into the MSI's binary table and invoked true CA type 1.
Good luck.
Regards, Nick
Posted by:
aogilmor
15 years ago
Posted by:
nheim
15 years ago
Posted by:
aogilmor
15 years ago
Posted by:
joedown
15 years ago
Thanks for the help. I found this msi interesting in that all it does is install files and after the install finalize action runs some custom actions all pointing to this particular dll file. I wanted to discover how these custom actions are somehow able to automagically allow windows to suddenly discover new hardware that wasn't detected previously. What is even more annoying is when you uninstall, the hardware again disappears from device manager. Is this what is called hardware enumeration?
Posted by:
aogilmor
15 years ago
Posted by:
joedown
15 years ago
Does not appear to do anything when run manually. Will error out if I use the wrong parameter. The installer is the Widcomm bluetooth stack. There is a condition on the custom action (Not Installed) OR (BTW_MINOR_UPGRADE=1) so I don't think that has anything to do with it. There is a custom action to uninstall and when I invoke it like this rundll32 btins.dll, BTINS_Uninstall it did uninstall but not the msi.
ORIGINAL: aogilmor
I dunno that's weird, does it throw any input or output when you run it from rundll32.exe or does it just recognize hardware? is the sofware related to the hardware? is there a condition on the ca? is there an uninstall ca?
veddy interestink [8D]
Posted by:
joedown
15 years ago
Update: I was able to remove the custom actions in the install execute table (for testing only of course) that were ran after install finalize. The msi installed successfully and I was able to then manually run the custom actions from a command prompt. Now this is where it really annoys me. Basically all the msi does is install some files and reg entries. The whole driver install is actually accomplished through the custom actions at the end. So why in the heck did they even bother using an msi if they weren't going to use it to do the install. I hate crappy vendors that do that. Well at least I learned some more good stuff along the way.
Posted by:
aogilmor
15 years ago
ORIGINAL: joedown
Update: I was able to remove the custom actions in the install execute table (for testing only of course) that were ran after install finalize. The msi installed successfully and I was able to then manually run the custom actions from a command prompt. Now this is where it really annoys me. Basically all the msi does is install some files and reg entries. The whole driver install is actually accomplished through the custom actions at the end. So why in the heck did they even bother using an msi if they weren't going to use it to do the install. I hate crappy vendors that do that. Well at least I learned some more good stuff along the way.
I've learned a lot through crappy vendors too. Java is horrible about that. The files aren't even installed through the feature/component/file database hierarchy but through custom actions. So if you want to modify the install you have to use your own CA's to write to the registry or perform file actions. Removing the vendor CA isn't an option, then the files won't be installed! Thanks Sun! [:@]
Posted by:
anonymous_9363
15 years ago
Posted by:
aogilmor
15 years ago
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
so that the conversation will remain readable.