将自定义操作添加到 VS 2008 安装项目 [英] Add Custom action to VS 2008 Setup project
问题描述
我使用的是 VS 2008,我已经使用 C# 创建了一个应用程序和安装文件.安装文件仅包含visual studio 2008 提供的标准安装界面.我需要检查Windows 注册表并获取一些文件夹路径,并在安装时将一些文件复制到我的应用程序文件夹中.只是我需要在安装时添加自定义代码.标准接口.
<块引用>- 欢迎
- 安装文件夹
- 确认安装
- 进展
- 完成了我需要的.
- 欢迎
- 安装文件夹
- 确认安装
- 进展
- 我的自定义操作界面
- 完成
我的自定义操作执行以下操作.
例如:获取注册表路径.
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.
- Welcome
- Installation Folder
- Confirm Installation
- Progress
- Finished I need.
- Welcome
- Installation Folder
- Confirm Installation
- Progress
- MY Custom ACTION INTERFACE
- 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屋!