热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

Clickonce要求签署许可协议-ClickonceaskforaLicenseagreement

IsitpossibletobuildaClickOncedeployment,foraWinFormapplication,toaskfortheusertoa

Is it possible to build a ClickOnce deployment, for a Win Form application, to ask for the user to agree to a License Agreement before continuing?

是否可以为Win Form应用程序构建ClickOnce部署,以便在继续之前要求用户同意许可协议?

5 个解决方案

#1


Answer from MSDN by User Heath8041:

用户Heath8041从MSDN回答:

Sneaky Way to get an EULA displayed for your clickonce application in VS2005

Sneaky方法在VS2005中为您的clickonce应用程序显示EULA

Here's a round about way to get your clickonce applications to install with an End user license agreement. Basically you build a redistributable component that can be seen in your prerequsites dialog box under the publish window. This allows a nice way to have all your apps reuse the same agreement, if you want. It's very easy, you need only to create three files ("eula.txt", "product.xml", and "package.xml") and two folders in this case ("EULApackage", and "en"). I documented everything below on how I set mine up. it works great. the only thing you'll have to change is the Name of the component and of course you'll need your own end user licence agreement saved as eula.txt. The component needs to be put in the following path: C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\BootStrapper\Packages in this folder you should see some sub folders for other redistributable components. First make a new sub directory for your component. I called mine EULApackage. in this new folder you need the following. -A file called product.xml and a sub folder called "en" (for english) you can do various things with the product.xml file, but here's the way mine looks

以下是关于使用最终用户许可协议安装clickonce应用程序的方法。基本上,您构建了一个可再发行组件,可以在发布窗口下的prerequsites对话框中看到。如果您愿意,这可以让您的所有应用重用相同的协议。这很简单,你只需创建三个文件(“eula.txt”,“product.xml”和“package.xml”)和两个文件夹(“EULApackage”和“en”)。我在下面记录了我如何设置我的一切。它很棒。您唯一需要更改的是组件的名称,当然您需要将自己的最终用户许可协议保​​存为eula.txt。该组件需要放在以下路径中:C:\ Program Files \ Microsoft Visual Studio 8 \ SDK \ v2.0 \ BootStrapper \ Packages在此文件夹中,您应该看到其他可再发行组件的一些子文件夹。首先为组件创建一个新的子目录。我打电话给我的EULApackage。在这个新文件夹中,您需要以下内容。 - 一个名为product.xml的文件和一个名为“en”的子文件夹(英文版),你可以使用product.xml文件做各种事情,但这是我看起来的方式




  
  
    
  


  
    

       
         
       

    
  

*in this case the file eula.txt was the text file that was my license agreement. Note that it's not an rtf file. Rtf won't display propertly using this method.

*在这种情况下,文件eula.txt是我的许可协议的文本文件。请注意,它不是rtf文件。 Rtf不会使用此方法显示属性。

Now inside my "en" subfolder i put the eula.txt file and another xml file called package.xml, again this xml file can be used to do all kinds of stuff

现在在我的“en”子文件夹中,我将eula.txt文件和另一个名为package.xml的xml文件放在一起,再次将此xml文件用于执行各种操作

heres the contents of my version*

继承我的版本内容*

 



    
        
    

  
  
    Texas Instruments End User License Agreement
    en

    User Failed to Accept Texas Instruments End User License Agreement.
    A fatal error occurred during the installation of ELUA Component Execution
    You do not have the permissions required to install this application.  Please contact your administrator.
      

Note: whatever you put in the DisplayName field is what your user will see when he's confronted with the eula text If you have all this put together correctly and in the right folders, the next time you start up VS2005 and go to your publish tab -> prerequisites you should see the DisplayName field. Just check this as a prerequisite for you app. when the user clicks install on the publish.htm file it'll present the user with the conents of your eula.txt file inside of a standard license acceptance dialog box. if the choose accept your stuff installs, if they decline then it exits rather nicely and nothing is installed on their systems. If you mess up the formatting for either of the two files or if you leave out the "en" sub folder then the component won't show up in the prerequisites dialog (when publishing)

注意:您在DisplayName字段中放置的内容是您的用户在面对eula文本时会看到的内容如果您将所有这些放在正确的文件夹中并在正确的文件夹中,则下次启动VS2005并转到发布选项卡时 - >先决条件,您应该看到DisplayName字段。只需将此作为您应用的先决条件。当用户单击publish.htm文件上的install时,它将向用户显示标准许可证接受对话框中的eula.txt文件的标记。如果选择接受你的东西安装,如果他们下降然后它退出相当不错,他们的系统上没有安装任何东西。如果您弄乱了两个文件中的任何一个的格式,或者如果省略“en”子文件夹,则组件将不会显示在先决条件对话框中(发布时)

Additional notes: although this works great it is a round about method and their are ways around the eula, such as if your publish.htm file allows them to run the application directly (I guess without the bootstrapper starting)but if they click the install button it will run. This also has the benifits of not running every time you publish an update to your clickonce application. They have to run the boot strapper to get the eula to show up (by clicking the install button on publish.htm) I figured out this method by looking at some of the other redistributable components that were already in the path C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\BootStrapper\Packages. You can look in those other components product.xml and package.xml files to see what cool things they've done with them. Good luck

附加说明:虽然这很好用但它是一个圆形的方法,它们是eula的方法,例如,如果你的publish.htm文件允许它们直接运行应用程序(我猜没有启动引导程序),但如果他们点击安装按钮它会运行。每次向clickonce应用程序发布更新时,这也具有不运行的优点。他们必须运行引导过滤器以显示eula(通过单击publish.htm上的安装按钮)我通过查看已经在路径C:\ Program Files中的一些其他可再发行组件来找出这个方法\ Microsoft Visual Studio 8 \ SDK \ v2.0 \ BootStrapper \ Packages。您可以查看其他组件的product.xml和package.xml文件,看看他们用它们做了什么很酷的事情。祝好运

#2


For anyone who is trying to do this it will work... I am using Visual Studio 2008 and liek Coppermill said, the location is "C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bootstrapper\Packages\"

对于任何试图这样做的人来说,它都可以工作......我正在使用Visual Studio 2008和谎言Coppermill说,位置是“C:\ Program Files \ Microsoft SDKs \ Windows \ v6.0A \ Bootstrapper \ Packages \”

I also had to add a couple other things to the product.xml:

我还必须在product.xml中添加其他一些东西:




  
  
    
  


  
      
       
    
         
       

    
  

I also had to create a "Do nothing" executable otherwise the elcu.txt would open up in notepad. Anyway, good luck...

我还必须创建一个“什么都不做”的可执行文件,否则elcu.txt会在记事本中打开。祝你好运......

#3


I don't think there is.

我不认为有。

If you deploy your click-once app from a webpage, you could have the user accept the agreement there before installing the app. The effect will be the same.

如果您从网页部署一次性点击应用,则可以让用户在安装应用之前接受协议。效果是一样的。

#4


If we use Visual Studio 2010 then we had add it in "C:\Program Files\Microsoft SDKs\Windows\v7.0A\Bootstrapper\Packages" folder. It works now.

如果我们使用Visual Studio 2010,那么我们将其添加到“C:\ Program Files \ Microsoft SDKs \ Windows \ v7.0A \ Bootstrapper \ Packages”文件夹中。它现在有效。

#5


I am posting this as a reply to Yuki Izumi's post. Instead of using a batch file, I added an empty vbs file and modified the product.xml to

我发帖这是对Yuki Izumi的帖子的回复。我没有使用批处理文件,而是添加了一个空的vbs文件并将product.xml修改为


This is another way to prevent the eula.txt from opening up on clicking Accept. I also tried with an rtf file. That displayed properly (VS 2015).

这是防止eula.txt在单击Accept时打开的另一种方法。我也试过一个rtf文件。显示得当(VS 2015)。


推荐阅读
  • 本文介绍了Android 7的学习笔记总结,包括最新的移动架构视频、大厂安卓面试真题和项目实战源码讲义。同时还分享了开源的完整内容,并提醒读者在使用FileProvider适配时要注意不同模块的AndroidManfiest.xml中配置的xml文件名必须不同,否则会出现问题。 ... [详细]
  • YOLOv7基于自己的数据集从零构建模型完整训练、推理计算超详细教程
    本文介绍了关于人工智能、神经网络和深度学习的知识点,并提供了YOLOv7基于自己的数据集从零构建模型完整训练、推理计算的详细教程。文章还提到了郑州最低生活保障的话题。对于从事目标检测任务的人来说,YOLO是一个熟悉的模型。文章还提到了yolov4和yolov6的相关内容,以及选择模型的优化思路。 ... [详细]
  • 本文介绍了使用kotlin实现动画效果的方法,包括上下移动、放大缩小、旋转等功能。通过代码示例演示了如何使用ObjectAnimator和AnimatorSet来实现动画效果,并提供了实现抖动效果的代码。同时还介绍了如何使用translationY和translationX来实现上下和左右移动的效果。最后还提供了一个anim_small.xml文件的代码示例,可以用来实现放大缩小的效果。 ... [详细]
  • XML介绍与使用的概述及标签规则
    本文介绍了XML的基本概念和用途,包括XML的可扩展性和标签的自定义特性。同时还详细解释了XML标签的规则,包括标签的尖括号和合法标识符的组成,标签必须成对出现的原则以及特殊标签的使用方法。通过本文的阅读,读者可以对XML的基本知识有一个全面的了解。 ... [详细]
  • Android系统移植与调试之如何修改Android设备状态条上音量加减键在横竖屏切换的时候的显示于隐藏
    本文介绍了如何修改Android设备状态条上音量加减键在横竖屏切换时的显示与隐藏。通过修改系统文件system_bar.xml实现了该功能,并分享了解决思路和经验。 ... [详细]
  • MyBatis多表查询与动态SQL使用
    本文介绍了MyBatis多表查询与动态SQL的使用方法,包括一对一查询和一对多查询。同时还介绍了动态SQL的使用,包括if标签、trim标签、where标签、set标签和foreach标签的用法。文章还提供了相关的配置信息和示例代码。 ... [详细]
  • iOS超签签名服务器搭建及其优劣势
    本文介绍了搭建iOS超签签名服务器的原因和优势,包括不掉签、用户可以直接安装不需要信任、体验好等。同时也提到了超签的劣势,即一个证书只能安装100个,成本较高。文章还详细介绍了超签的实现原理,包括用户请求服务器安装mobileconfig文件、服务器调用苹果接口添加udid等步骤。最后,还提到了生成mobileconfig文件和导出AppleWorldwideDeveloperRelationsCertificationAuthority证书的方法。 ... [详细]
  • Activiti7流程定义开发笔记
    本文介绍了Activiti7流程定义的开发笔记,包括流程定义的概念、使用activiti-explorer和activiti-eclipse-designer进行建模的方式,以及生成流程图的方法。还介绍了流程定义部署的概念和步骤,包括将bpmn和png文件添加部署到activiti数据库中的方法,以及使用ZIP包进行部署的方式。同时还提到了activiti.cfg.xml文件的作用。 ... [详细]
  • 超级简单加解密工具的方案和功能
    本文介绍了一个超级简单的加解密工具的方案和功能。该工具可以读取文件头,并根据特定长度进行加密,加密后将加密部分写入源文件。同时,该工具也支持解密操作。加密和解密过程是可逆的。本文还提到了一些相关的功能和使用方法,并给出了Python代码示例。 ... [详细]
  • 带添加按钮的GridView,item的删除事件
    先上图片效果;gridView无数据时显示添加按钮,有数据时,第一格显示添加按钮,后面显示数据:布局文件:addr_manage.xml<?xmlve ... [详细]
  • 初识java关于JDK、JRE、JVM 了解一下 ... [详细]
  • 本文讨论了在手机移动端如何使用HTML5和JavaScript实现视频上传并压缩视频质量,或者降低手机摄像头拍摄质量的问题。作者指出HTML5和JavaScript无法直接压缩视频,只能通过将视频传送到服务器端由后端进行压缩。对于控制相机拍摄质量,只有使用JAVA编写Android客户端才能实现压缩。此外,作者还解释了在交作业时使用zip格式压缩包导致CSS文件和图片音乐丢失的原因,并提供了解决方法。最后,作者还介绍了一个用于处理图片的类,可以实现图片剪裁处理和生成缩略图的功能。 ... [详细]
  • Imtryingtofigureoutawaytogeneratetorrentfilesfromabucket,usingtheAWSSDKforGo.我正 ... [详细]
  • 本文介绍了在Mac上安装Xamarin并使用Windows上的VS开发iOS app的方法,包括所需的安装环境和软件,以及使用Xamarin.iOS进行开发的步骤。通过这种方法,即使没有Mac或者安装苹果系统,程序员们也能轻松开发iOS app。 ... [详细]
  • 本文讨论了如何使用Web.Config进行自定义配置节的配置转换。作者提到,他将msbuild设置为详细模式,但转换却忽略了带有替换转换的自定义部分的存在。 ... [详细]
author-avatar
Karson2012
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有