Click here to Skip to main content
15,887,845 members
Home / Discussions / C#
   

C#

 
GeneralContinuation of Correct way of doing installers Pin
glennPattonWork33-Jul-12 1:39
professionalglennPattonWork33-Jul-12 1:39 
GeneralRe: Continuation of Correct way of doing installers Pin
Pete O'Hanlon3-Jul-12 1:52
mvePete O'Hanlon3-Jul-12 1:52 
GeneralRe: Continuation of Correct way of doing installers Pin
glennPattonWork33-Jul-12 2:09
professionalglennPattonWork33-Jul-12 2:09 
GeneralRe: Continuation of Correct way of doing installers Pin
Pete O'Hanlon3-Jul-12 2:41
mvePete O'Hanlon3-Jul-12 2:41 
GeneralRe: Continuation of Correct way of doing installers Pin
glennPattonWork33-Jul-12 2:46
professionalglennPattonWork33-Jul-12 2:46 
GeneralRe: Continuation of Correct way of doing installers Pin
Pete O'Hanlon3-Jul-12 2:49
mvePete O'Hanlon3-Jul-12 2:49 
GeneralRe: Continuation of Correct way of doing installers Pin
glennPattonWork33-Jul-12 3:03
professionalglennPattonWork33-Jul-12 3:03 
GeneralRe: Continuation of Correct way of doing installers Pin
Pete O'Hanlon3-Jul-12 3:46
mvePete O'Hanlon3-Jul-12 3:46 
Change the method to this:
C#
public static Dictionary<string, string> GetDriverInfo(string driverName)
{
    Dictionary<string, string> driver = new Dictionary<string, string>();
    System.Management.SelectQuery query = new System.Management.SelectQuery("Win32_SystemDriver");
    query.Condition = string.Format("Name='{0}'", driverName);
    System.Management.ManagementObjectSearcher searcher = new System.Management.ManagementObjectSearcher(query);
    foreach (System.Management.ManagementObject manageObject in searcher.Get())
    {
        driver.Add("PathName", manageObject["PathName"].ToString());
        driver.Add("Description", manageObject["Description"].ToString());
        driver.Add("State", manageObject["State"].ToString());
        driver.Add("StartMode", manageObject["StartMode"].ToString());
    }

    return driver;
}
That should do it.

*pre-emptive celebratory nipple tassle jiggle* - Sean Ewington

"Mind bleach! Send me mind bleach!" - Nagy Vilmos


CodeStash - Online Snippet Management | My blog | MoXAML PowerToys | Mole 2010 - debugging made easier

GeneralRe: Continuation of Correct way of doing installers Pin
glennPattonWork33-Jul-12 3:53
professionalglennPattonWork33-Jul-12 3:53 
GeneralRe: Continuation of Correct way of doing installers Pin
Pete O'Hanlon3-Jul-12 4:15
mvePete O'Hanlon3-Jul-12 4:15 
GeneralRe: Continuation of Correct way of doing installers Pin
glennPattonWork33-Jul-12 4:52
professionalglennPattonWork33-Jul-12 4:52 
GeneralRe: Continuation of Correct way of doing installers Pin
Pete O'Hanlon3-Jul-12 5:41
mvePete O'Hanlon3-Jul-12 5:41 
GeneralRe: Continuation of Correct way of doing installers Pin
glennPattonWork33-Jul-12 5:46
professionalglennPattonWork33-Jul-12 5:46 
GeneralRe: Continuation of Correct way of doing installers Pin
glennPattonWork33-Jul-12 5:59
professionalglennPattonWork33-Jul-12 5:59 
GeneralRe: Continuation of Correct way of doing installers Pin
glennPattonWork33-Jul-12 3:20
professionalglennPattonWork33-Jul-12 3:20 
QuestionText conversion Pin
Satay843-Jul-12 0:09
Satay843-Jul-12 0:09 
AnswerRe: Text conversion Pin
Eddy Vluggen3-Jul-12 0:51
professionalEddy Vluggen3-Jul-12 0:51 
GeneralRe: Text conversion Pin
Satay843-Jul-12 19:36
Satay843-Jul-12 19:36 
AnswerRe: Text conversion Pin
Eddy Vluggen4-Jul-12 1:03
professionalEddy Vluggen4-Jul-12 1:03 
GeneralRe: Text conversion Pin
Satay844-Jul-12 2:05
Satay844-Jul-12 2:05 
AnswerRe: Text conversion Pin
Eddy Vluggen4-Jul-12 2:15
professionalEddy Vluggen4-Jul-12 2:15 
GeneralRe: Text conversion Pin
Satay844-Jul-12 2:45
Satay844-Jul-12 2:45 
AnswerRe: Text conversion Pin
Eddy Vluggen4-Jul-12 3:05
professionalEddy Vluggen4-Jul-12 3:05 
GeneralRe: Text conversion Pin
Satay844-Jul-12 3:21
Satay844-Jul-12 3:21 
GeneralRe: Text conversion Pin
Eddy Vluggen4-Jul-12 3:27
professionalEddy Vluggen4-Jul-12 3:27 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.