どんなコーポレート-ガバナンス.infに基づくドライバー?
-
21-08-2019 - |
質問
たいと思い、コーポレート-ガバナンス.infに基づくUSBドライバとしてインストーラを起動します。
しないといけないのではないか.infニーズに配置する %SystemRoot%\inf
, ものもあります。猫WHQL認証か?), ます。sysファイルです。どんな人?
編集: 解決への応答となります。このP/呼び出しの機能、ポインストールを行動に走るには、次のコード:
namespace DriverPackageInstallAction
{
static class Program
{
[DllImport("DIFXApi.dll", CharSet = CharSet.Unicode)]
public static extern Int32 DriverPackagePreinstall(string DriverPackageInfPath, Int32 Flags);
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
DirectoryInfo assemblyDir = new DirectoryInfo(Application.ExecutablePath);
DirectoryInfo installDir = assemblyDir.Parent;
int result = DriverPackagePreinstall(installDir.FullName + @"\Driver\XYZ.inf", 0);
if (result != 0)
MessageBox.Show("Driver installation failed.");
}
}
}
他のヒント
お試しいシェてもインストールできます:
%SystemRoot%\System32\rundll32.exe setupapi,InstallHinfSection DefaultInstall 132 YOUR_FILE.inf
私も良い100%が良い方---
所属していません StackOverflow