通过msi安装inf文件 [英] Install inf file through msi

查看:138
本文介绍了通过msi安装inf文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个驱动程序包文件夹,其中我有一个包含.inf,.cat和amd64和i386文件夹的文件夹(带有一堆.dll文件)。 

I have a driver package folder in which I have a folder with .inf, .cat and a amd64 and i386 folders(with a bunch of .dll files). 

直到现在,我已经右键单击了inf文件并安装了驱动程序,或者已经去设备管理器查找驱动程序并安装它。 

Till now, I have right clicked the inf file and have installed the driver, or have gone to the device manager to look up driver and installed it. 

现在我想要创建一个.msi,以便我可以用msi安装它,而不是右键单击.inf文件。为此,我创建了一个Windows设置项目,我无法弄清楚如何将我的.inf文件称为单击
.msi时需要执行的文件。这是安装此驱动程序的正确方法吗?还是有另一种更简单的方法。  

Now I want to create an .msi so that I can install it with msi instead of right clicking the .inf file. For this, I have created a windows set up project and I am unable to figure out how do I call my .inf file as the file that needs to be executed on clicking the .msi. Is this the right way of installing this driver? or is there another easier way.  

我创建了一个自定义文件夹,并在自定义文件夹中添加了我的.inf,.cat和amd64以及i36文件夹。但是当天结束时我不想将这个文件夹存储在任何地方,但是只能部署正确的二进制文件。 

I have created a custom folder and added my .inf, .cat and amd64 and i36 folders inside the custom folder. But end of the day I dont want this folder to be stored anywhere but, only the correct binaries be deployed. 

任何人都可以帮忙解决这个问题吗?

Can anyone please help on how to do this?

推荐答案

嗨KAMNAK,

Hi KAMNAK,

很抱歉迟到的回复。

>>如何将我的.inf文件称为单击.msi时需要执行的文件。 

>>how do I call my .inf file as the file that needs to be executed on clicking the .msi. 

你对这个目的是什么意思?

What do you mean about this purpose?

.msi文件是用于安装项目的包,所以你的意思是你要执行.inf安装过程中的文件?

The .msi file is a package what is used to install your project, so do you mean that you want to execute the .inf file during the installation process?

如果是这样,请参考以下步骤:

If so, please refer to the following steps for your purpose:

第1步:首先创建一个ClassLibrary,然后在其下添加一个类:

Step 1: Create a ClassLibrary first, then add a class under it:

第2步:创建一个安装项目,然后右键单击打开文件系统界面:

Step 2: Create a setup project then open the File System interface by right-clicking:

步骤3:在应用程序文件夹中,添加ClassLibrary作为输出:

Step 3: In the Application Folder, add the ClassLibrary as an output:

然后选择名为ClassLibraryMySetup的ClassLibrary:

Then select the ClassLibrary named ClassLibraryMySetup:

步骤4:打开自定义操作界面:

Step 4: Open the Custom Actions interface:

第5步:添加自定义操作:

然后从应用程序文件夹中选择输出ClassLibraryMySetup:

Then select the Output ClassLibraryMySetup from the Application Folder:

您可以执行.inf文件以下方式:

You can execute the .inf file by the following way:

在我上面所说的Installer1类中:

In the Installer1 class as I said above:

            InitializeComponent();
            //System.Diagnostics.Process.Start(@"D:\Log\log.txt");
            System.Diagnostics.Process.Start(@"TheFilePath");
        }

        //do some operation here

希望这会有所帮助!

最好的问候,

Stanly


这篇关于通过msi安装inf文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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