質問

たいと思い、コーポレート-ガバナンス.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.");
        }
    }
}
役に立ちましたか?

解決

いに関する部分を読む SetupAPIDIFx.Windowsドライバーキット サンプル の両方を含むDIFxに基づく統合モジュールやDIFxベWiX図書館があります。ソースのコマンドライン devcon 効用に基づくSetupAPIものWDKます。

他のヒント

お試しいシェてもインストールできます:

%SystemRoot%\System32\rundll32.exe setupapi,InstallHinfSection DefaultInstall 132 YOUR_FILE.inf

私も良い100%が良い方---

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top