设置文件的自定义操作 [英] custom action to setup file

查看:97
本文介绍了设置文件的自定义操作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我如何使安装文件通过VB 2010 Ultimate或其他方式执行我想做的任何事情?
让我解释一下.

我希望安装程序文件在首次运行时获得该PC的处理器ID.

然后我要它保存该ID.当我在另一台PC上再次运行它时,我希望它获得处理器ID并将其与第一次运行时获得的ID进行比较.如果相同,它将再次运行.如果不相同,则它将无法运行.那就是我想要它做的.

对不起,我的英语.谢谢您的帮助!

how can i make the setup file to do whatever i want it to do via VB 2010 ultimate or anything else?
Let me explain.

I want the setup file when runs for first time to get the processor ID of that pc.

Then i want it to save that ID. When i run it again in a different pc i want it to get the processor ID and compare it with the one that got when it runned for first time.If its the same it will run again.If its not the same then it wont run. Thats what i want it to do .

Sorry for my english.Appreciate your help!

推荐答案

,您可以创建安装和部署项目并创建自定义操作,该操作将在以下特定位置检查处理器ID.注册表或Windows驱动器中的某个位置.这也可以保存在两个位置.

如果安装程序找到相应位置的处理器ID,则可以根据需要继续安装.

您可以通过检查文章 Visual Studio设置项目中的自定义操作"来创建自定义操作 [ ^ ]
you can create a setup and deployment project and create a custom action which will check the processor ID at some particular place in registry or at some place in windows drive. This can be saved at both position also.

If installer find the processor ID that respective position then it can continue its installation as needed else not.

You can create custom action by checking the article Custom Action in Visual Studio setup projects[^]


我可以获取处理器ID,但是如何保存它,以便setup.exe文件即使在另一台PC上下次运行时也可以读取它,以及如何我告诉安装程序停止安装.如何使用我在自定义操作中编写的代码引用安装文件.对不起,我的英语...感谢您的帮助!.
忘了告诉你我使用Visual Basic 2010 Ultimate ...
i can get the processor ID but how can i save it so that the setup.exe file can read it next time it runs even in another pc and how can i tell the setup to stop the instalation.How can i refer to setup file with code that i have written in the custom action.Sorry for my english... Appreciate your help!.
Forgot to tell you that i use Visual Basic 2010 Ultimate...


这篇关于设置文件的自定义操作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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