怎么在安装包的程序中控制下面的提示,也就是说,打开时不提示下面的,自动安装。无法验证发行者
是否确实要安装此定义项?

解决方案 »

  1.   

    看不到图片。安装部署中通过install安装类自定义相关操作
      

  2.   

    我已经在自定义安装类中加上了呀,参照如下代码,帮我检查有没问题?
        Public Overrides Sub Install(ByVal stateSaver As IDictionary)
            Try
                Dim securityPermission As SecurityPermission = New SecurityPermission(PermissionState.Unrestricted)
                securityPermission.Demand()
            Catch exception1 As SecurityException
                Throw New InstallException("对不起,您没有权限创建此软件的信用,请以管理员的身份登录!")
            End Try
            Dim deploymentManifestLocation As Uri = Nothing
            If Not Uri.TryCreate(MyBase.Context.Parameters.Item("deploymentManifestLocation"), UriKind.RelativeOrAbsolute, deploymentManifestLocation) Then
                Throw New InstallException("未找到指定位置的发布清单,请确认ICT.dll.manifest文件是否存在!")
            End If
            Dim entry As New AddInSecurityEntry(deploymentManifestLocation, RSA_PublicKey)
            UserInclusionList.Add(entry)
            stateSaver.Add("entryKey", deploymentManifestLocation)
            MyBase.Install(stateSaver)
        End Sub    Public Overrides Sub Uninstall(ByVal savedState As IDictionary)
            Dim deploymentManifestLocation As Uri = DirectCast(savedState.Item("entryKey"), Uri)
            If (Not deploymentManifestLocation Is Nothing) Then
                UserInclusionList.Remove(deploymentManifestLocation)
            End If
            MyBase.Uninstall(savedState)
        End Sub    Public Overrides Sub Commit(ByVal savedState As System.Collections.IDictionary)
            MyBase.Commit(savedState)
        End Sub    Public Overrides Sub Rollback(ByVal savedState As System.Collections.IDictionary)
            MyBase.Rollback(savedState)
        End SubEnd Class
      

  3.   

    我已经继承了install类,帮忙分析一下好吗,谢谢你了,(人生如梦) 
      

  4.   

    我在自定义操作中,设置CustomActionData属性中如下: /deploymentManifestLocation="[TARGETDIR]\NCT.vsto"