回答

0

我已經完成了這樣的項目,要求用戶在安裝過程中提供所有參數。您可以創建包含所有標籤和文本框和按鈕的自定義表單。並且在您的安裝程序類中使用該表單作爲您的安裝程序類的屬性。

下面是一個例子

[RunInstaller(true)] 
public partial class MyCustomInstaller : Installer 
{ 
     private MyCustomForm = new MyCustomForm(); 
     // this is your custom form that allows users to modify the configuration parameters. 
} 

,然後你可以caputure事件是這樣的:

private void InitializeComponent() 
    { 
     this.AfterInstall += new System.Configuration.Install.InstallEventHandler(DoConfigurationManagement_AfterInstall); 
    } 
0

您可以在this看看,介紹如何使用CustomActions改變app.config文件來自msi安裝程序。

+0

404此鏈接,未來請給出一個簡短的總結,以避免這個問題。你知道鏈接是否在其他地方活躍嗎? – 2016-01-12 17:24:48

相關問題