المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : Continuation of Correct way of doing installers



C# Programming
07-03-2012, 05:43 PM
Hi All (especially Pete O'Hanlon),

I have now found the driver I think I am looking for the " KernelDriver,FTDIBUS,USB Serial Converter Driver" I can now check for this driver find it using the code:
ServiceController[] scDevices = ServiceController.GetDevices(); MessageBox.Show("Device driver services on the local computer"); foreach (ServiceController scTemp in scDevices) { lstDrivers.Items.Add(scTemp.ServiceType + "," + scTemp.ServiceName + "," + scTemp.DisplayName); }I think if I can check the value of this it will do.
Pete O'Hanlon gave me some code in a question called "Correct way of doing installers"
using a Dictionary command, in copying this and trying to use it, I have obviously lost something / not understood something as the red wiggly line for syntax errors appear in System.Management. commands, I am using VS 2008 (.NET 3.5) and using System.Management only give one . option Instrumentation(?). Should I be using a Build option I have not seen before. So really the question is if I can't do it from here how can I get Petes example to work in VS 2008?
Glenn