Vorrei installare un driver USB basato su inf con il mio programma di installazione.Come si distribuisce un driver basato su inf?
Immagino che l'inf. Debba essere inserito in %SystemRoot%\inf
, ma c'è anche un file .cat (certificazione WHQL credo?) E .sys. Cosa faccio con quelli?
MODIFICA: Risolto grazie alle utili risposte. ero in grado di P/Invoke la funzione, quindi ho un azione di post-installazione che gestisce il seguente codice:
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.");
}
}
}
link corretti: http://msdn.microsoft.com/en-us/ library/ff550855.aspx e http://msdn.microsoft.com/en-us/library/ff544838.aspx –
@ Dercsár: grazie, aggiornerò tutti e 4 i collegamenti per puntare alle nuove posizioni. – bk1e