Call regasm in custom action matching product bitness - Advanced Installer Community
velja
Posts: 45
Joined: Tue May 14, 2013 12:01 pm

Call regasm in custom action matching product bitness

Hello,

I am failing to register dll for interop using advanced installer. I followed thread from this forum ie.:

1. Created File Search: http://screencast.com/t/OVG99ncYSxz

2. Created Custom Action: http://screencast.com/t/WDezwHDrnxr
*tried both: checked "run as administrator" and unchecked
*I also tried "Launch file from property" custom action without brackets as described in documentation and it failed same as this one.

3. It fails with this dialog: http://screencast.com/t/IIsOop6jOZ
At the time Error dialog is displayed (while files are still in APP_DIR) manually executing command works: http://screencast.com/t/zWMVTicRsX (I copied codebase param from log file to avoid typo)

4. And with this error in log:

Code: Select all

CustomAction LaunchFile_1 returned actual error code -1 (note this may not be 100% accurate if translation happened inside sandbox)
MSI (s) (48:EC) [13:17:58:923]: Note: 1: 1722 2: LaunchFile_1 3: C:\Windows\Installer\MSI2D82.tmp 4: /RunAsAdmin "" /codebase "C:\Program Files (x86)\CompanyNameHere\ProductNameHere\QlmLicenseLib.dll" 
MSI (s) (48:EC) [13:18:01:640]: Product: ProductNameHere -- Error 1722. There is a problem with this Windows Installer package. A program run as part of the setup did not finish as expected. Contact your support personnel or package vendor.  Action LaunchFile_1, location: C:\Windows\Installer\MSI2D82.tmp, command: /RunAsAdmin "" /codebase "C:\Program Files (x86)\CompanyNameHere\ProductNameHere\QlmLicenseLib.dll" 

Aside from this is it possible to use Enviroment variables in SEARCH for file? Like this: %SystemDrive%\Windows\Microsoft.NET\Framework\v2.0.50727\regasm.exe
We already have users that do not have system on C drive.
velja
Posts: 45
Joined: Tue May 14, 2013 12:01 pm

Re: Call regasm in custom action matching product bitness

Is there faster way to get support? is writing to email or calling phone faster? Opening ticket?

I can not proceed and I tried all that I thought was sane and I read relevant docs.
What is the proper way to do this? Is there something I can do to improve my question? is it not understandable?

This is very simple everyday tasks.
Find regasm.exe
Invoke regasam.exe /codebase filefromappdir

P.S. please note that I am not trying to be rude and I am most certainly satisfied with the product and support. I am behind and trying to get this working. Sorry if above looks unpolished.
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Call regasm in custom action matching product bitness

Hello,

At a first glance it seems the custom action is failing because your regasm search fails to find the file. Please keep in mind that in the "Name" field of your file search you should add only the name of your file (i.e. regasm.exe), and not the full path of the file. The path where the file will be searched in should be specified like this:
1. go to "Search" page and select the file search (REGASM64)
2. in the "Name" field type in only regasm.exe
3. from the context menu of the "REGASM64" search choose "Add Location -> Folder"
5. in the "Path" field (from "Directory Properties" right pane) set the folder path where the file (regasm.exe) should be searched in (e.g. [WindowsVolume]Windows\Microsoft.Net\Framework64\v2.0.50727\)
6. rebuild and test again the installation

Also, in order to make sure your file search succeed you can use our [Test Search] toolbar button to test your search.

If the above is of no help, in order to have a better view of your project settings please send us the .AIP (project file) and a verbose log of the installation to support at advancedinstaller dot com so we can investigate them.

Also, as a side note, have you tried to use our built-in support for file registration? Can you please go to "Files and Folders" page, select the desired file, from its context menu choose "Properties...", go to "Registration" tab and enable the "Register .NET assembly for COM interoperability" option, rebuild the project and test again the installation?
Aside from this is it possible to use Enviroment variables in SEARCH for file? Like this: %SystemDrive%\Windows\Microsoft.NET\Framework\v2.0.50727\regasm.exe
No, you cannot use environment variable references. Instead, you can use formatted property references (i.e. [WindowsVolume]).
Is there faster way to get support? is writing to email or calling phone faster? Opening ticket?
All our technical tickets are handled only through forums or by e-mail. Both channels have the same priority for us and we usually reply with a 24 hours frequency (excepting the week-ends). This is because we have a significant number of tickets daily and investigating technical tickets requires some time, there may be required an investigation, a small research, etc. Thank you for your understanding.

We do offer on demand consulting services, but these are paid services.

If there is anything we can assist you with just let us know.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
velja
Posts: 45
Joined: Tue May 14, 2013 12:01 pm

Re: Call regasm in custom action matching product bitness

Yes it worked. Thank you. I right clicked it few times but I guess I overlooked that context menu. Not allowed backslash is probably a good clue too but I just pasted path from my post build event and didn't see it until now.
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Call regasm in custom action matching product bitness

You're welcome. I'm glad you got this working.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”