Creating Revit Installer with Inno Setup
Previously, I packaged files through NSIS, and later I found Inno Setup. After using it, I found that Inno is slightly better than NSIS personally, and the entire operation interface is much simpler than NSIS. There is a localization version that can be added, but I use the English original version here.
Wizard Settings
- Create a new file wizard after installation File-> New

2. Click Next to enter the setting interface

**Because most of the packaged installation packages are placed in specified folders, choose folder**

3. Because the Revit plugin is a plugin based on Revit secondary development, there is no startup item, just check the following. If there are other files, it is also okay. I did not try to add folders here, I added subsequent folders directly in the script.

Similarly, because there is no startup item, we do not need to create a start menu, just uncheck it here.

4. Add license files and other information

5. Add installation permissions which can also be edited via script later

6. Select language, because I didn't install the localization pack, only English is selected

6. Other settings

7. Finished, then enter script editing content

Script Settings
Specific content can be learned by viewing Inno’s API. Here I will talk about the nodes I used
- Sometimes we need to install some files in the installation package to the system path. Inno provides some system path nodes here, you can see the Constants node in the API, where
- {app} User installation path
- {localappdata} C:\Users\user\AppData\Local
- {appdata} C:\Users\xu.lanhui\AppData\Roaming
- Source
Here I used Source to add the company’s internal login confirmation tool and installed it to a separate path
1 | Source: "C:\Users\xu.lanhui\Desktop\registor\*";DestDir:"{localappdata}\***\registor" ; Flags: ignoreversion recursesubdirs createallsubdirs |
- [Run] Copy multiple addin files
Because external applications can be called, you can use a language you are good at to write a file copy program and call it using Inno. Below are my input parameters
1 | [Run] |
All Script Coding and C# Copy Addin to Version File
- Inno script coding
1 | ; Script generated by the Inno Setup Script Wizard. |
- C# Copy license file to version addin
- This is my file structure

- code
1 | // See https://aka.ms/new-console-template for more information |
All articles on this blog are licensed under CC BY-NC-SA 4.0 unless otherwise stated.







