如何在Windows注册表中存储安装路径? [英] how to store an setup path in windows registry?

查看:192
本文介绍了如何在Windows注册表中存储安装路径?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我有一个安装文件(例如:Test.Exe)

我想添加安装路径(例如:C \ Program Files \ -----------
或Windows注册表中的D:\ Program Files \ --------------或任何其他位置),方法是定义一个名为LocalApplicationExes的名称.

意味着所有这些过程都是在安装Test.Exe应用程序时发生的..

如何使用C#3.0做到这一点
有什么想法请告诉我.


问候,
Pawan.

解决方案

您可以为您的应用程序创建Visual Studio设置和部署项目,然后将其完成.安装和部署项目包含一个注册表编辑器,您可以通过它指定在安装应用程序时应创建的注册表项和值.您可以定义新的键和新的字符串值,并将字符串值设置为[TARGETDIR],并且在安装时,将在注册表中使用用户选择安装应用程序的文件夹创建字符串值.您可以在下面的链接中找到更多详细信息.

http://www.simple-talk.com/dotnet/visual -studio/getting-started-with-setup-projects/ [ 解决方案

You can create a visual studio setup and deployment project for your application and get it done. The setup and deployment project contains a registry editor through which you can specify registry keys and values that should be created when the application is installed. You can define a new key and a new string value and set the string value to [TARGETDIR] and at the time of the installation the string value will be created in the registry with the folder that the user chooses to install the application. You can find more details in the below link.

http://www.simple-talk.com/dotnet/visual-studio/getting-started-with-setup-projects/[^]


You can''t do anything with C# that involves what happens when you install an application, your C# does not run then. To store the path the user chose to install the app, during setup, you need a decent setup program that supports doing what you want.


这篇关于如何在Windows注册表中存储安装路径?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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