wappsyapps
Posts: 1
Joined: Sat Jan 12, 2019 11:52 pm

Running .bat file

Hello,

When I install my program, the .dll is not loaded.

But, if I run a .bat file AFTER the installation (as administrator), the .dll is loaded:

C:\Windows\Microsoft.NET\Framework64\v4.0.30319\RegAsm.exe /codebase "C:\Program Files (x86)\my_program.dll"
PAUSE

I have tried using the "Register .Net Assembly for COM Interoperability" but it doesn't work.

I've spent 6+ hours TODAY on this, no luck. Can someone please help me?
Catalin
Posts: 6596
Joined: Wed Jun 13, 2018 7:49 am

Re: Running .bat file

Hello and welcome to our forums,

I am not sure I really understand how you have earlier proceeded, but you can try to proceed as it follows:

- Create a .BAT file containing the command lines.

- Add the .BAT file to your Advanced Installer project.

- Now please go to "Custom Actions" page and add a "Launch File" custom action with sequence. To add a custom action with sequence, simply press the "Add custom action with sequence" button which is placed to the right side of the custom action's name.

- Now, please configure the custom action as it follows:

1- File to launch: [#yourBatFile.bat]

2- Run as Administrator - ticked

3- Use 64-bit Launcher - ticked (if you are using the "RegAsm.exe" executable from the 64-bit folder - i.e. "C:\Windows\Microsoft.NET\Framweork64"

4- Under "Execution Time", please select the "When the system is being modified (deferred)" radio button.

5- Under "Execution Options", also select the "Run under the LocalSystem account with full privileges (no impersonation)" option.

Hope this helps.

In what regards the fact that our built-in support for "Register .Net assembly for COM intercompatibility" is not working, could you please your .DLL file and all its dependencies by e-mail at support at advancedinstaller dot com so I can further investigate it?

All the best,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”