Visual Studio 2017 - Windows applications are packaged into exe files (1) - a brief summary of tools

There has been a little maintenance and modification to a Windows application recently. After the modification, a new exe installation file is to be released. When packaging the exe file, I encountered a headache. Fortunately, it was finally solved. Record it.

Visual Studio版本:Visual Studio 2017

Visual Studio 2017 Packaging Plugin

New Project->Other Project Types->Visual Studio Installer->Setup Project
write picture description here
If there is no option (Visual Studio Installer) in other project types, click "Tools", select "Extensions and Updates", click Online, search for "Microsoft Visual Studio 2017" Installer Projects" to install the plugin.
write picture description here

select main output

After creating a new project, File System is automatically opened by default, right-click on Application Folder, add output, and select main output
write picture description here

Create shortcut icons

Right-click "Main output from xxx", select "Create ShortCut to main output from xxx", add a shortcut, you can rename it. Select the shortcut, left-click and drag it to User's Desktop
write picture description here
, right-click the shortcut, and select the properties window
write picture description here
to choose the icon of the shortcut.
write picture description here

custom action

Right-click on the project
write picture description here
If the project needs to be installed by the required driver, you can add the driver installation exe file to the Application Folder, select Add "Custom Action", select the driver installation file, and the driver will be called when the file is executed. Install.
write picture description here

Benefits and pitfalls of plugins

Benefits: Visual Studio 2017 comes with a plug-in, which is easy to use, much more convenient than downloading and installing other packaging software.
Defects: (The following defects are probably because I didn't figure out how to use the plugin in depth)

  1. After the driver installation process is completed, the main installation process cannot be continued.
  2. The required framework environment cannot be packaged into the exe file.

Packaging the .NET Framework environment

When generating, report an error, click on the prompt error, and jump to Microsoft's official website How to: Create a localized bootstrap package
Looking at the documentation for a long time can't solve it. After searching for a long time, I finally found an article [C#] vs2017 Publishing Tool Visual Studio Installer Publishing Package Problem Handling Experience
Find the path according to this article:
C:\Program Files (x86)\Microsoft SDKs\ClickOnce Bootstrapper\Packages \DotNetFX461Copy
the downloaded file NDP461-KB3102436-x86-x64-AllOS-ENU.exe to this path.
In the end, although it can be successfully generated, it is not what I want to package into an exe file. Obviously, I may need to know more about the plug-in. I have not found a solution.

InstallShield

The official website
is another tossing, downloading and installing, the InstallShield installation package is not small, and the time to download and install is not short.
Refer to using InstallShield to package windriver driver
Download address: InstallShield 2018 (software packaging tool)
Unfortunately, the certificate is 2016, not 2018, and an error will appear during the final package: Failed to verify digital signature of IsUiServices.dll The
error is similar to: InstallShield 2015 error Failed to verify digital signature of IsUiServices.dll

Advantages and disadvantages of InstallShield

Powerful functions are both advantages and disadvantages, because powerful functions also mean complex operations.

Inno Setup

The official website
Inno Setup is easy to operate, and finally a script file with the suffix iss will be generated.
You can write your own functions. For me, GUI operations may be preferred. Advanced Installer debuts.

Advanced Installer

The next article focuses on Advanced Installer, which is very easy to use and recommends a five-star rating.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325020335&siteId=291194637