I tried this question on the InstallShield forum and it hasn't gotten any love. My company has an InstallScript project (non-MSI), and we need to run RegAsm /codebase on one of our DLLs. I found some tutorials online for doing this, but they don't seem to apply to our project type. That is, the options I need simply do not exist in the UI. That includes both suggestions here (https://www.iwasdot.com/installshield-execute-a-batch-script/) as well as anything involving custom actions (as I interpret from the docs that custom actions do not apply to InstallScript projects). How can I accomplish this with InstallScript? I am using InstallShield 2013 and I know extremely little about it.
How to run RegAsm /codebase with an InstallScript project?
347 views Asked by PaulFake AtThere are 2 answers
PaulFake
On
Christopher Painter is correct. I came to the same conclusion and was able to get this to work. If it helps anyone in the future, here's more specifically what I did:
I went to the "Behavior and Logic" folder of the "Installation Designer" tab and selected "InstallScript". Then on the right-hand pane I selected the feature my DLL is associated with and then selected the "Installed" event handler. The following script registered my DLL for COM interop:
LaunchApplication("C:/Windows/Microsoft.NET/Framework/v4.0.30319/RegAsm.exe",
"../path/to/my.dll /codebase", "",
SW_HIDE, 0, LAAW_OPTION_NOWAIT);
And then I did something similar for the "Uninstalled" event handler:
LaunchApplication("C:/Windows/Microsoft.NET/Framework/v4.0.30319/RegAsm.exe",
"/unregister ../path/to/my.dll", "",
SW_HIDE, 0, LAAW_OPTION_NOWAIT);
Related Questions in COM
- How to program a COM object with an IEnumerator, IEnumerable interface inside
- WinAPI - right mouse drag & drop and IContextMenu
- Function Returning Excel COM Objects Unexpectedly
- Windows ContextMenuHandler names - Document conflict?
- How to publish a console application with COM interop and trim unused code
- IContextMenu Handler - Should ShellExecute or CreateProcess be used to InvokeCommand?
- Windows Explorer Conditional Context Menu Item for Drive?
- How do I fix an error while trying to send email using Outlook with COM?
- ITypeLib2.GetLibStatistics() always throws AccessViolationException in C#
- Directwrite is not always able to query font
- How can I pass a C++ struct to a C# DLL method using COM interop
- VBA PowerPoint Run-time error '-2147467259' (80004005): Presentation.Close: Failed
- PHP using a dll with COM + dotnet
- d3d11 triangle rendering failure despite everything being properly initialized
- COM context menu InvokeCommand not being called
Related Questions in INSTALLSHIELD
- Windows registry dump in InstallShield prerequisite
- How to make a silent installation out of nested .exe InstallShields?
- InstallShield for Windows: Error Diasnosis
- Creating an Eclipse RCP application installer using InstallShield
- Patch executable is deleted by windows defender but the same was not deleted in earlier build patches
- How to read and update language MST file (1033.mst) which is part of MSI Package using C# windows application?
- How to update License Agreement(EULA) in MSI Package (support multiple language) using any external tool?
- Why does a non-advertised shortcut created within the startup folder, does not auto start the application upon reboot?
- Copyright details doesn't show Organization name
- Can we encrypt MSI property values so that user cannot open the MSI/MST to see the value?
- Managed Code custom action in .Net Core 6 or later
- Upgrade without UpgradeCode with MSI
- Cannot sign swidtag file with DigiCert Cloud HSM private key
- How to set Required Execution Level to Administrator for Basic MSI project type with MSI file
- How to match a pattern with VbScript regex in InstallShield?
Related Questions in REGASM
- RegAsm : error RA0000 : Could not load file or assembly 'System.Runtime, Version=6.0.0.0' .... The system cannot find the file specified
- Receiving an error while try to register DLL with RegAsm.exe: "Could not load file or assembly 'System.Runtime, Version=8.0.0.0, Culture=neutral ,..."
- problems registering and using a DLL assembly
- How to deploy COM-object with VS2022 installer project?
- regasm on a .net framework library now wants netstandard 2.1.0.0
- Registering .net assembly for COM succeeds with regasm but fails using RegistrationServices.RegisterAssembly
- Does GAC conflict with the Registry for Assembly Loading?
- Windows Script Host cannot reference type library with version number in hexadecimal notation
- RegAsm - completely unregistering library (including typelib) for 32b and 64b COM
- Share registered .NET assembly between two applications installed with Inno Setup
- VS Code - How can I produce a strongly named assembly?
- VS 2019, VB, Class Library, getting error "Could not load file or assembly 'System.Runtime, Version=4.2.2.0, Culture=neutral" during RegAsm
- Error querying COM interfaces - class not registered
- Getting error as "Class not Registered" in Delphi while using a c# dll
- Importing .Reg File Targeting HKEY_CURRENT_USER Creates Additional Entries In Other Hives
Related Questions in INSTALLSCRIPT
- How to set Required Execution Level to Administrator for Basic MSI project type with MSI file
- How to match a pattern with VbScript regex in InstallShield?
- Error while compiling the script in installshield
- How can i validate if my Javascript tracking script on customer site is successfully installed?
- Implement functions for the buttons in the installshiel dialog
- How to disable silent installation in InstallShield?
- Failed to install mysql server through Installshield (mysql-installer Information: 10 : MySQL Server 5.6.21's change state request failed)
- How can I obtain filename of own MSI/EXE installer file?
- How can I create a checkbox that only if it's checked the installer creates shortcuts on Desktop in InstallScript project in InstallShield?
- InstallShield 2020 - installscript to MSI - migrating first installs, major upgrades, minor updates, patches
- How can I find the previous install location of an application in InstallScript during a major upgrade?
- Is there a way to check encoding of files through Install script or batch?
- Installshield installscript setup terminates after UAC prompt
- Why does InstallShield 2015 InstallScript Installer asks for Restart during Uninstallation?
- How to run RegAsm /codebase with an InstallScript project?
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Popular Tags
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
I haven't used InstallScript projects in almost 20 years but I imaging you'd write an InstallScript function to call LaunchAppAndWait to invoke Regasm.
If I recall correctly, InstallScript project types have events like After File Copy that you can use to put the code into.