inf 启动

How to install an INF file using Delphi

If you need to install an "inf" file using Delphi, you could use the next code:
~~~~~~~~~~~~~~~~~~~~~~~~~
{
Usage:
   InstallINF('C:\XYZ.inf', 0) ;
}
uses
   ShellAPI;

function InstallINF(const PathName: string; hParent: HWND): Boolean;
var
   instance: HINST;
begin
   instance := ShellExecute(hParent,
     PChar('open'),
     PChar('rundll32.exe'),
     PChar('setupapi,InstallHinfSection
           DefaultInstall 132 ' + PathName),
     nil,
     SW_HIDE) ;

Result := instance > 32;
end;

上一篇:php中读取中文文件夹及文件报错


下一篇:SpringBoot使用Mybatis注解开发教程-分页-动态sql