Reputation: 3881
I need to run regasm command on the dll file after the file is installed. The COM extract at build set to yes doesn't register the file.
Right now I'm trying to add an installScript
// Include Ifx.h for built-in InstallScript function prototypes, for Windows
// Installer API function prototypes and constants, and to declare code for
// the OnBegin and OnEnd events.
#include "ifx.h"
// The keyword export identifies MyFunction() as an entry-point function.
// The argument it accepts must be a handle to the Installer database.
export prototype MyFunction(HWND);
export prototype CmdExecute();
function CmdExecute()
begin
LaunchAppAndWait( "cmd.exe", "/C " + "C:\Windows\Microsoft.NET\Framework\v4.0.30319\regasm.exe E:\path\bin\filename.dll /codebase", "",
SW_HIDE, 0, LAAW_OPTION_NOWAIT );
end;
And this is added under Custom Actions and Sequences, and the CmdExecute Custom Action is added with with this setup:
When I look at the log from running the msi file, I see it finished installation before it ran cmd.exe And the cmdExecute returns a value of 1 so it's looking good.
But when I check if the file is registered after the msi runs, it is not registered. What am I missing?
I saw this example, but I'm not sure what they are talking about with OnInstalledFile(). Is that a setting in installShield? I can't find anything with a screen shot telling it's location. onInstalledFile.
I am using the method by this user by running regasm with cmd, but they mention event handler but I'm not sure what they are doing for that. regasm with installscript .
I am also using this installShield custom action.
For my test, I started out by running the regasm command with the /u option to unregister it before running the installer to install the file and register it. Any idea what I am missing? Do I need an event somewhere? In a post I saw, they set it to run onInstalled, but I'm not sure where that is.
Upvotes: 1
Views: 52