2010-09-22 15 views
0

J'ai un code qui fonctionne sur un système XP standard, mais échoue sur XP Machine de test intégrée.WMI Win32_Printer ne fonctionne pas sur XP Embedded

Je reçois System.Management.ManagementException: fournisseur charge non

Voici mon code:

string query = "Select * From Win32_Printer"; 
    ManagementObjectSearcher searcher = new ManagementObjectSearcher(query); 
    ManagementObjectCollection results = searcher.Get(); 

Y at-il des services pour démarrer ou DLL pour vous inscrire?

S'il vous plaît, aidez-moi à trouver la réponse!

Merci à l'avance, puces

Répondre

0

Vous devez vérifier Wich la bibliothèque System.Management.Instrumentation.dll est correctement enregistré.

essayer ce lien

+0

Salut, merci pour la réponse! Le problème est que je travaille avec .NET 2.0 et cette bibliothèque n'existe pas. – Flea