gpt4 book ai didi

vb.net - 安装设置问题(访问自定义对话框中的复选框)

转载 作者:行者123 更新时间:2023-12-02 00:30:55 33 4
gpt4 key购买 nike

I’m trying to create a installation setup for my VB.net application. I need to insert a custom action while setup is running. So I add a Checkbox Dialog box to my setup. And I add a dll to the setup installation to capture Before Install and After Install events. Those are works fine. But I cannot access my check box value in those events. If u guys can give me a hint to continue my work really appreciates.

Following is the Before Install event I have created. I have set some messages to verify my event works correctly. While I run the setup those messages are prompt properly.

Private Sub Installer_BeforeInstall(ByVal sender As Object, _
ByVal e As System.Configuration.Install.InstallEventArgs) Handles MyBase.BeforeInstall
Dim koFaxPath As String = Nothing
MsgBox("Installer_BeforeInstall: Starts1")

Dim contextParameters As StringDictionary
Dim sb As System.Text.StringBuilder = New System.Text.StringBuilder
Dim actionDataName As String = String.Empty
Dim arrayActionData() As String

contextParameters = Me.Context.Parameters
For Each actionDataName In Me.Context.Parameters.Keys
arrayActionData = Me.Context.Parameters(actionDataName).ToString.Split("-")
MsgBox(actionDataName.ToString)
MsgBox(arrayActionData(0).ToString)
MsgBox(Me.Context.Parameters.Item(actionDataName.ToString))
Next


Try
Catch ex As Exception
'needs to impliment
End Try

MsgBox("Installer_BeforeInstall: Ends")
End Sub

提前致谢。

最佳答案

我已经找到了答案。它也可能对您有用。将 dll 添加到安装项目后,转到 dll 属性。有一个名为 CustomActionData 的属性。填写如下

/CheckBoxSequenceGenerator="[CheckBoxName]"

现在您可以通过以下代码访问它

Context.Parameters("CheckBoxSequenceGenerator")

关于vb.net - 安装设置问题(访问自定义对话框中的复选框),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6839295/

33 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com