将自定义操作添加到 VS 2008 安装项目 [英] Add Custom action to VS 2008 Setup project

查看:34
本文介绍了将自定义操作添加到 VS 2008 安装项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用的是 VS 2008,我已经使用 C# 创建了一个应用程序和安装文件.安装文件仅包含visual studio 2008 提供的标准安装界面.我需要检查Windows 注册表并获取一些文件夹路径,并在安装时将一些文件复制到我的应用程序文件夹中.只是我需要在安装时添加自定义代码.标准接口.

<块引用>

  1. 欢迎
  2. 安装文件夹
  3. 确认安装
  4. 进展
  5. 完成了我需要的.
  6. 欢迎
  7. 安装文件夹
  8. 确认安装
  9. 进展
  10. 我的自定义操作界面
  11. 完成

我的自定义操作执行以下操作.

例如:获取注册表路径.

object test= Registry.GetValue("HKEY_LOCAL_MACHINE\\SOFTWARE\\Kofax Image Products\\Ascent Capture\\3.0","ExePath",null)如果(测试!=空){///从测试路径复制一些文件到我的应用程序文件夹.}

我该怎么做?

解决方案

您可以始终创建自己的自定义操作(基于 UI 的现有面板)>

看看 Scott 的 帖子条目 关于这个主题

您可以在那里找到如何创建安装项目向其中添加自定义操作.

希望能帮到你.

Im using VS 2008 and I have created an application and Setup file using C#. The setup file contain only standard setup interfaces provide by visual studio 2008. I need to check windows registry and get some folder path and copy some files to my application folder while installation. Simply I need to add custom code while installation. Standard interfaces.

  1. Welcome
  2. Installation Folder
  3. Confirm Installation
  4. Progress
  5. Finished I need.
  6. Welcome
  7. Installation Folder
  8. Confirm Installation
  9. Progress
  10. MY Custom ACTION INTERFACE
  11. Finished

MY Custom Action performs the below action.

Ex: Get registry path.

object test=  Registry.GetValue("HKEY_LOCAL_MACHINE\\SOFTWARE\\Kofax Image Products\\Ascent Capture\\3.0"
                ,"ExePath",null)

If(test!=null)
{
///Copy some files to my application folder from test path.
}

How can I do that?

解决方案

You can always create your own custom action (based on existing panels for the UI)

Take a look at Scott's post entry on the subject

you can find there how to create a Setup project and add a custom action to it.

I hope it helps.

这篇关于将自定义操作添加到 VS 2008 安装项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆