मैं अपने इंस्टॉलर के साथ .inf आधारित यूएसबी ड्राइवर को तैनात करना चाहता हूं।मैं .inf आधारित ड्राइवर को कैसे तैनात करूं?
मुझे लगता है कि .inf को %SystemRoot%\inf
में रखा जाना चाहिए, लेकिन एक .cat (WHQL प्रमाणीकरण मुझे लगता है?), और .sys फ़ाइलें भी हैं। मैं उन लोगों के साथ क्या करूँ?
संपादित करें: हल किया गया, उपयोगी उत्तरों के लिए धन्यवाद।
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.");
}
}
}
सही लिंक: http://msdn.microsoft.com/en-us/ पुस्तकालय/ff550855.aspx और http://msdn.microsoft.com/en-us/library/ff544838.aspx –
@ Dercsár: धन्यवाद, मैं नए स्थानों को इंगित करने के लिए सभी 4 लिंक अपडेट करूंगा। – bk1e