wmic: Add support for querying class properties.

This commit is contained in:
Hans Leidekker 2012-06-19 10:19:59 +02:00 committed by Alexandre Julliard
parent f18b24ad39
commit ae9697f117
51 changed files with 1007 additions and 9 deletions

2
configure vendored
View File

@ -15675,7 +15675,7 @@ wine_fn_config_program winhelp.exe16 enable_win16 install
wine_fn_config_program winhlp32 enable_winhlp32 install,po wine_fn_config_program winhlp32 enable_winhlp32 install,po
wine_fn_config_program winoldap.mod16 enable_win16 install wine_fn_config_program winoldap.mod16 enable_win16 install
wine_fn_config_program winver enable_winver install wine_fn_config_program winver enable_winver install
wine_fn_config_program wmic enable_wmic install wine_fn_config_program wmic enable_wmic install,po
wine_fn_config_program wordpad enable_wordpad install,po wine_fn_config_program wordpad enable_wordpad install,po
wine_fn_config_program write enable_write install,po wine_fn_config_program write enable_write install,po
wine_fn_config_program wscript enable_wscript install wine_fn_config_program wscript enable_wscript install

View File

@ -3091,7 +3091,7 @@ WINE_CONFIG_PROGRAM(winhelp.exe16,enable_win16,[install])
WINE_CONFIG_PROGRAM(winhlp32,,[install,po]) WINE_CONFIG_PROGRAM(winhlp32,,[install,po])
WINE_CONFIG_PROGRAM(winoldap.mod16,enable_win16,[install]) WINE_CONFIG_PROGRAM(winoldap.mod16,enable_win16,[install])
WINE_CONFIG_PROGRAM(winver,,[install]) WINE_CONFIG_PROGRAM(winver,,[install])
WINE_CONFIG_PROGRAM(wmic,,[install]) WINE_CONFIG_PROGRAM(wmic,,[install,po])
WINE_CONFIG_PROGRAM(wordpad,,[install,po]) WINE_CONFIG_PROGRAM(wordpad,,[install,po])
WINE_CONFIG_PROGRAM(write,,[install,po]) WINE_CONFIG_PROGRAM(write,,[install,po])
WINE_CONFIG_PROGRAM(wscript,,[install]) WINE_CONFIG_PROGRAM(wscript,,[install])

View File

@ -13272,6 +13272,19 @@ msgstr ""
msgid "Help topics: " msgid "Help topics: "
msgstr "" msgstr ""
#: wmic.rc:25
msgid "Error: Command line not supported\n"
msgstr ""
#: wmic.rc:26
#, fuzzy
msgid "Error: Alias not found\n"
msgstr "تعذّر إيجاد '%s'."
#: wmic.rc:27
msgid "Error: Invalid query\n"
msgstr ""
#: wordpad.rc:28 #: wordpad.rc:28
#, fuzzy #, fuzzy
msgid "&New...\tCtrl+N" msgid "&New...\tCtrl+N"

View File

@ -13475,6 +13475,20 @@ msgstr ""
msgid "Help topics: " msgid "Help topics: "
msgstr "" msgstr ""
#: wmic.rc:25
msgid "Error: Command line not supported\n"
msgstr ""
#: wmic.rc:26
#, fuzzy
msgid "Error: Alias not found\n"
msgstr "Файлът не е намерен.\n"
#: wmic.rc:27
#, fuzzy
msgid "Error: Invalid query\n"
msgstr "Невалидни знаци в пътя.\n"
#: wordpad.rc:28 #: wordpad.rc:28
#, fuzzy #, fuzzy
msgid "&New...\tCtrl+N" msgid "&New...\tCtrl+N"

View File

@ -13799,6 +13799,24 @@ msgstr "No es pot trobar una implementació de richedit...Avortant"
msgid "Help topics: " msgid "Help topics: "
msgstr "Temes d'ajuda: " msgstr "Temes d'ajuda: "
#: wmic.rc:25
#, fuzzy
#| msgid "Error: Invalid command line parameters\n"
msgid "Error: Command line not supported\n"
msgstr "Error: Paràmetres de línia d'ordres no vàlids\n"
#: wmic.rc:26
#, fuzzy
#| msgid "Property set not found.\n"
msgid "Error: Alias not found\n"
msgstr "Conjunt de propietats no trobat.\n"
#: wmic.rc:27
#, fuzzy
#| msgid "Error: Invalid key name\n"
msgid "Error: Invalid query\n"
msgstr "Error: Nom de clau invàlid\n"
#: wordpad.rc:28 #: wordpad.rc:28
msgid "&New...\tCtrl+N" msgid "&New...\tCtrl+N"
msgstr "&Nou...\tCtrl+N" msgstr "&Nou...\tCtrl+N"

View File

@ -13831,6 +13831,23 @@ msgstr "Nemohu najít implementaci richedit... Přerušuji"
msgid "Help topics: " msgid "Help topics: "
msgstr "Témata nápovědy: " msgstr "Témata nápovědy: "
#: wmic.rc:25
#, fuzzy
#| msgid "Error: Invalid command line parameters\n"
msgid "Error: Command line not supported\n"
msgstr "Chyba: Neplatné parametry příkazové řádky\n"
#: wmic.rc:26
#, fuzzy
msgid "Error: Alias not found\n"
msgstr "Soubor nebyl nalezen.\n"
#: wmic.rc:27
#, fuzzy
#| msgid "Error: Invalid key name\n"
msgid "Error: Invalid query\n"
msgstr "Chyba: Neplatný název klíče\n"
#: wordpad.rc:28 #: wordpad.rc:28
msgid "&New...\tCtrl+N" msgid "&New...\tCtrl+N"
msgstr "&Nový...\tCtrl+N" msgstr "&Nový...\tCtrl+N"

View File

@ -13692,6 +13692,24 @@ msgstr "Kan ikke finde en 'richedit' implementering... Afbryder"
msgid "Help topics: " msgid "Help topics: "
msgstr "Hjælp emner: " msgstr "Hjælp emner: "
#: wmic.rc:25
#, fuzzy
#| msgid "Error: Invalid command line parameters\n"
msgid "Error: Command line not supported\n"
msgstr "Fejl: Ugyldige kommando linje parametre\n"
#: wmic.rc:26
#, fuzzy
#| msgid "Property set not found.\n"
msgid "Error: Alias not found\n"
msgstr "Egenskabs sæt ikke fundet.\n"
#: wmic.rc:27
#, fuzzy
#| msgid "Error: Invalid key name\n"
msgid "Error: Invalid query\n"
msgstr "Fejl: Ugyldigt nøgle navn\n"
#: wordpad.rc:28 #: wordpad.rc:28
msgid "&New...\tCtrl+N" msgid "&New...\tCtrl+N"
msgstr "&Ny...\tCtrl+N" msgstr "&Ny...\tCtrl+N"

View File

@ -13730,6 +13730,24 @@ msgstr "Die Richedit Implementation konnte nicht gefunden werden... Breche ab"
msgid "Help topics: " msgid "Help topics: "
msgstr "Hilfethemen: " msgstr "Hilfethemen: "
#: wmic.rc:25
#, fuzzy
#| msgid "Error: Invalid command line parameters\n"
msgid "Error: Command line not supported\n"
msgstr "Fehler: Ungültige Befehlszeilenargumente\n"
#: wmic.rc:26
#, fuzzy
#| msgid "Property set not found.\n"
msgid "Error: Alias not found\n"
msgstr "Eigenschaften nicht gefunden.\n"
#: wmic.rc:27
#, fuzzy
#| msgid "Error: Invalid key name\n"
msgid "Error: Invalid query\n"
msgstr "Fehler: Ungültiger Schlüssel\n"
#: wordpad.rc:28 #: wordpad.rc:28
msgid "&New...\tCtrl+N" msgid "&New...\tCtrl+N"
msgstr "&Neu...\tStrg+N" msgstr "&Neu...\tStrg+N"

View File

@ -13227,6 +13227,21 @@ msgstr ""
msgid "Help topics: " msgid "Help topics: "
msgstr "" msgstr ""
#: wmic.rc:25
#, fuzzy
msgid "Error: Command line not supported\n"
msgstr "Επιλογές.\n"
#: wmic.rc:26
#, fuzzy
msgid "Error: Alias not found\n"
msgstr "Το αρχείο δε βρέθηκε.\n"
#: wmic.rc:27
#, fuzzy
msgid "Error: Invalid query\n"
msgstr "Μη έγγυρος(οι) χαρακτήρας(ες) στο μονοπάτι.\n"
#: wordpad.rc:28 #: wordpad.rc:28
msgid "&New...\tCtrl+N" msgid "&New...\tCtrl+N"
msgstr "" msgstr ""

View File

@ -13633,6 +13633,18 @@ msgstr "Cannot find a richedit implementation... Aborting"
msgid "Help topics: " msgid "Help topics: "
msgstr "Help topics: " msgstr "Help topics: "
#: wmic.rc:25
msgid "Error: Command line not supported\n"
msgstr "Error: Command line not supported\n"
#: wmic.rc:26
msgid "Error: Alias not found\n"
msgstr "Error: Alias not found\n"
#: wmic.rc:27
msgid "Error: Invalid query\n"
msgstr "Error: Invalid query\n"
#: wordpad.rc:28 #: wordpad.rc:28
msgid "&New...\tCtrl+N" msgid "&New...\tCtrl+N"
msgstr "&New...\tCtrl+N" msgstr "&New...\tCtrl+N"

View File

@ -13638,6 +13638,18 @@ msgstr "Cannot find a richedit implementation... Aborting"
msgid "Help topics: " msgid "Help topics: "
msgstr "Help topics: " msgstr "Help topics: "
#: wmic.rc:25
msgid "Error: Command line not supported\n"
msgstr "Error: Command line not supported\n"
#: wmic.rc:26
msgid "Error: Alias not found\n"
msgstr "Error: Alias not found\n"
#: wmic.rc:27
msgid "Error: Invalid query\n"
msgstr "Error: Invalid query\n"
#: wordpad.rc:28 #: wordpad.rc:28
msgid "&New...\tCtrl+N" msgid "&New...\tCtrl+N"
msgstr "&New...\tCtrl+N" msgstr "&New...\tCtrl+N"

View File

@ -13036,6 +13036,22 @@ msgstr "Ne eblas trovi realigon de richedit... Ĉesigante"
msgid "Help topics: " msgid "Help topics: "
msgstr "Helpaj tempoj: " msgstr "Helpaj tempoj: "
#: wmic.rc:25
msgid "Error: Command line not supported\n"
msgstr ""
#: wmic.rc:26
#, fuzzy
#| msgid "Property set not found.\n"
msgid "Error: Alias not found\n"
msgstr "Ecaro ne estis trovita.\n"
#: wmic.rc:27
#, fuzzy
#| msgid "Invalid query syntax.\n"
msgid "Error: Invalid query\n"
msgstr "Nevalida menda sintakso.\n"
#: wordpad.rc:28 #: wordpad.rc:28
msgid "&New...\tCtrl+N" msgid "&New...\tCtrl+N"
msgstr "&Nova...\tStir+N" msgstr "&Nova...\tStir+N"

View File

@ -13798,6 +13798,24 @@ msgstr "No se pudo encontrar una implementación de richedit... Abortando"
msgid "Help topics: " msgid "Help topics: "
msgstr "Temas de ayuda: " msgstr "Temas de ayuda: "
#: wmic.rc:25
#, fuzzy
#| msgid "Error: Invalid command line parameters\n"
msgid "Error: Command line not supported\n"
msgstr "Error: parámetros de línea de comandos inválidos\n"
#: wmic.rc:26
#, fuzzy
#| msgid "Property set not found.\n"
msgid "Error: Alias not found\n"
msgstr "No se ha encontrado el conjunto de propiedades.\n"
#: wmic.rc:27
#, fuzzy
#| msgid "Error: Invalid key name\n"
msgid "Error: Invalid query\n"
msgstr "Error: nombre de clave inválido\n"
#: wordpad.rc:28 #: wordpad.rc:28
msgid "&New...\tCtrl+N" msgid "&New...\tCtrl+N"
msgstr "&Nuevo...\tCtrl+N" msgstr "&Nuevo...\tCtrl+N"

View File

@ -13273,6 +13273,19 @@ msgstr ""
msgid "Help topics: " msgid "Help topics: "
msgstr "" msgstr ""
#: wmic.rc:25
msgid "Error: Command line not supported\n"
msgstr ""
#: wmic.rc:26
#, fuzzy
msgid "Error: Alias not found\n"
msgstr "'%s' پیدا نشد."
#: wmic.rc:27
msgid "Error: Invalid query\n"
msgstr ""
#: wordpad.rc:28 #: wordpad.rc:28
#, fuzzy #, fuzzy
msgid "&New...\tCtrl+N" msgid "&New...\tCtrl+N"

View File

@ -13616,6 +13616,24 @@ msgstr "Richedit-toteutusta ei löytynyt... Keskeytetään"
msgid "Help topics: " msgid "Help topics: "
msgstr "Ohjeen otsikot: " msgstr "Ohjeen otsikot: "
#: wmic.rc:25
#, fuzzy
#| msgid "Error: Invalid command line parameters\n"
msgid "Error: Command line not supported\n"
msgstr "Virhe: Viallisia komentoriviparametreja\n"
#: wmic.rc:26
#, fuzzy
#| msgid "Property set not found.\n"
msgid "Error: Alias not found\n"
msgstr "Ominaisuusjoukkoa ei löytynyt.\n"
#: wmic.rc:27
#, fuzzy
#| msgid "Error: Invalid key name\n"
msgid "Error: Invalid query\n"
msgstr "Virhe: Viallinen avaimen nimi\n"
#: wordpad.rc:28 #: wordpad.rc:28
msgid "&New...\tCtrl+N" msgid "&New...\tCtrl+N"
msgstr "&Uusi...\tCtrl+N" msgstr "&Uusi...\tCtrl+N"

View File

@ -13803,6 +13803,24 @@ msgstr "Aucune implémentation richedit détectée... Abandon"
msgid "Help topics: " msgid "Help topics: "
msgstr "Rubriques d'aide : " msgstr "Rubriques d'aide : "
#: wmic.rc:25
#, fuzzy
#| msgid "Error: Invalid command line parameters\n"
msgid "Error: Command line not supported\n"
msgstr "Erreur : paramètre de ligne de commande invalide\n"
#: wmic.rc:26
#, fuzzy
#| msgid "Property set not found.\n"
msgid "Error: Alias not found\n"
msgstr "Jeu de propriétés introuvable.\n"
#: wmic.rc:27
#, fuzzy
#| msgid "Error: Invalid key name\n"
msgid "Error: Invalid query\n"
msgstr "Erreur : nom de clé invalide\n"
#: wordpad.rc:28 #: wordpad.rc:28
msgid "&New...\tCtrl+N" msgid "&New...\tCtrl+N"
msgstr "&Nouveau...\tCtrl+N" msgstr "&Nouveau...\tCtrl+N"

View File

@ -13848,6 +13848,23 @@ msgstr "לא ניתן למצוא יישום של richedit... התכנית תצא
msgid "Help topics: " msgid "Help topics: "
msgstr "נושאי העזרה: " msgstr "נושאי העזרה: "
#: wmic.rc:25
#, fuzzy
#| msgid "Error: Invalid command line parameters\n"
msgid "Error: Command line not supported\n"
msgstr "Error: Invalid command line parameters\n"
#: wmic.rc:26
#, fuzzy
msgid "Error: Alias not found\n"
msgstr "PATH not found.\n"
#: wmic.rc:27
#, fuzzy
#| msgid "Error: Invalid key name\n"
msgid "Error: Invalid query\n"
msgstr "Error: Invalid key name\n"
#: wordpad.rc:28 #: wordpad.rc:28
msgid "&New...\tCtrl+N" msgid "&New...\tCtrl+N"
msgstr "&חדש...\tCtrl+N" msgstr "&חדש...\tCtrl+N"

View File

@ -13049,6 +13049,18 @@ msgstr ""
msgid "Help topics: " msgid "Help topics: "
msgstr "" msgstr ""
#: wmic.rc:25
msgid "Error: Command line not supported\n"
msgstr ""
#: wmic.rc:26
msgid "Error: Alias not found\n"
msgstr ""
#: wmic.rc:27
msgid "Error: Invalid query\n"
msgstr ""
#: wordpad.rc:28 #: wordpad.rc:28
msgid "&New...\tCtrl+N" msgid "&New...\tCtrl+N"
msgstr "" msgstr ""

View File

@ -13703,6 +13703,24 @@ msgstr "Nem található richedit megvalósítás... Megszakítás"
msgid "Help topics: " msgid "Help topics: "
msgstr "Súgó témák: " msgstr "Súgó témák: "
#: wmic.rc:25
#, fuzzy
#| msgid "Error: Invalid command line parameters\n"
msgid "Error: Command line not supported\n"
msgstr "Hiba: Érvénytelen parancssor paraméterek\n"
#: wmic.rc:26
#, fuzzy
#| msgid "Property set not found.\n"
msgid "Error: Alias not found\n"
msgstr "Beállítás nem található.\n"
#: wmic.rc:27
#, fuzzy
#| msgid "Error: Invalid key name\n"
msgid "Error: Invalid query\n"
msgstr "Hiba: Érvénytelen kulcsnév\n"
#: wordpad.rc:28 #: wordpad.rc:28
msgid "&New...\tCtrl+N" msgid "&New...\tCtrl+N"
msgstr "&Új...\tCtrl+N" msgstr "&Új...\tCtrl+N"

View File

@ -13795,6 +13795,24 @@ msgstr ""
msgid "Help topics: " msgid "Help topics: "
msgstr "Argomenti di aiuto: " msgstr "Argomenti di aiuto: "
#: wmic.rc:25
#, fuzzy
#| msgid "Error: Invalid command line parameters\n"
msgid "Error: Command line not supported\n"
msgstr "Errore: parametri della linea di comando non validi\n"
#: wmic.rc:26
#, fuzzy
#| msgid "Property set not found.\n"
msgid "Error: Alias not found\n"
msgstr "Insieme di proprietà non trovato.\n"
#: wmic.rc:27
#, fuzzy
#| msgid "Error: Invalid key name\n"
msgid "Error: Invalid query\n"
msgstr "Errore: nome della chiave non valido\n"
#: wordpad.rc:28 #: wordpad.rc:28
msgid "&New...\tCtrl+N" msgid "&New...\tCtrl+N"
msgstr "&Nuovo...\tCtrl+N" msgstr "&Nuovo...\tCtrl+N"

View File

@ -13631,6 +13631,24 @@ msgstr "Richedit が見つかりません... 終了します"
msgid "Help topics: " msgid "Help topics: "
msgstr "ヘルプ トピック: " msgstr "ヘルプ トピック: "
#: wmic.rc:25
#, fuzzy
#| msgid "Error: Invalid command line parameters\n"
msgid "Error: Command line not supported\n"
msgstr "エラー: コマンド ライン引数が無効です\n"
#: wmic.rc:26
#, fuzzy
#| msgid "Property set not found.\n"
msgid "Error: Alias not found\n"
msgstr "プロパティ セットが見つかりません。\n"
#: wmic.rc:27
#, fuzzy
#| msgid "Error: Invalid key name\n"
msgid "Error: Invalid query\n"
msgstr "エラー: キー名が無効です\n"
#: wordpad.rc:28 #: wordpad.rc:28
msgid "&New...\tCtrl+N" msgid "&New...\tCtrl+N"
msgstr "新規作成(&N)...\tCtrl+N" msgstr "新規作成(&N)...\tCtrl+N"

View File

@ -13598,6 +13598,24 @@ msgstr "richedit 구현을 찾을수 없습니다... 취소중"
msgid "Help topics: " msgid "Help topics: "
msgstr "도움말 목차: " msgstr "도움말 목차: "
#: wmic.rc:25
#, fuzzy
#| msgid "Error: Invalid command line parameters\n"
msgid "Error: Command line not supported\n"
msgstr "오류:올바르지 않은 명령라인 매개변수\n"
#: wmic.rc:26
#, fuzzy
#| msgid "Property set not found.\n"
msgid "Error: Alias not found\n"
msgstr "속성 세트를 찾을 수 없습니다.\n"
#: wmic.rc:27
#, fuzzy
#| msgid "Error: Invalid key name\n"
msgid "Error: Invalid query\n"
msgstr "오류: 올바르지 않은 키 이름\n"
#: wordpad.rc:28 #: wordpad.rc:28
msgid "&New...\tCtrl+N" msgid "&New...\tCtrl+N"
msgstr "새 파일(&N)...\tCtrl+N" msgstr "새 파일(&N)...\tCtrl+N"

View File

@ -13664,6 +13664,24 @@ msgstr "Nepavyko rasti RichEdit realizacijos... Nutraukiama"
msgid "Help topics: " msgid "Help topics: "
msgstr "Žinyno temos: " msgstr "Žinyno temos: "
#: wmic.rc:25
#, fuzzy
#| msgid "Error: Invalid command line parameters\n"
msgid "Error: Command line not supported\n"
msgstr "Klaida: Netinkami komandos eilutės parametrai\n"
#: wmic.rc:26
#, fuzzy
#| msgid "Property set not found.\n"
msgid "Error: Alias not found\n"
msgstr "Savybių aibė nerasta.\n"
#: wmic.rc:27
#, fuzzy
#| msgid "Error: Invalid key name\n"
msgid "Error: Invalid query\n"
msgstr "Klaida: Netinkamas rakto vardas\n"
#: wordpad.rc:28 #: wordpad.rc:28
msgid "&New...\tCtrl+N" msgid "&New...\tCtrl+N"
msgstr "&Naujas...\tVald+N" msgstr "&Naujas...\tVald+N"

View File

@ -13049,6 +13049,18 @@ msgstr ""
msgid "Help topics: " msgid "Help topics: "
msgstr "" msgstr ""
#: wmic.rc:25
msgid "Error: Command line not supported\n"
msgstr ""
#: wmic.rc:26
msgid "Error: Alias not found\n"
msgstr ""
#: wmic.rc:27
msgid "Error: Invalid query\n"
msgstr ""
#: wordpad.rc:28 #: wordpad.rc:28
msgid "&New...\tCtrl+N" msgid "&New...\tCtrl+N"
msgstr "" msgstr ""

View File

@ -14059,6 +14059,23 @@ msgstr "Klarte ikke finne richedit; avbryter"
msgid "Help topics: " msgid "Help topics: "
msgstr "Emner i Hjelp: " msgstr "Emner i Hjelp: "
#: wmic.rc:25
#, fuzzy
#| msgid "Error: Invalid command line parameters\n"
msgid "Error: Command line not supported\n"
msgstr "Feil: Ugyldige parametere på kommandolinjen\n"
#: wmic.rc:26
#, fuzzy
msgid "Error: Alias not found\n"
msgstr "Fant ikke prosedyren.\n"
#: wmic.rc:27
#, fuzzy
#| msgid "Error: Invalid key name\n"
msgid "Error: Invalid query\n"
msgstr "Feil: Ugyldig nøkkelnavn\n"
#: wordpad.rc:28 #: wordpad.rc:28
msgid "&New...\tCtrl+N" msgid "&New...\tCtrl+N"
msgstr "&Ny...\tCtrl+N" msgstr "&Ny...\tCtrl+N"

View File

@ -13896,6 +13896,24 @@ msgstr "Kan geen richedit implementatie vinden... Actie afgebroken"
msgid "Help topics: " msgid "Help topics: "
msgstr "Help-onderwerpen: " msgstr "Help-onderwerpen: "
#: wmic.rc:25
#, fuzzy
#| msgid "Error: Invalid command line parameters\n"
msgid "Error: Command line not supported\n"
msgstr "Fout: Foutieve commandoregel-parameters\n"
#: wmic.rc:26
#, fuzzy
#| msgid "Property set not found.\n"
msgid "Error: Alias not found\n"
msgstr "Verzameling eigenschappen niet gevonden.\n"
#: wmic.rc:27
#, fuzzy
#| msgid "Error: Invalid key name\n"
msgid "Error: Invalid query\n"
msgstr "Fout: Foutieve sleutelnaam\n"
#: wordpad.rc:28 #: wordpad.rc:28
msgid "&New...\tCtrl+N" msgid "&New...\tCtrl+N"
msgstr "&Nieuw...\tCtrl+N" msgstr "&Nieuw...\tCtrl+N"

View File

@ -13049,6 +13049,18 @@ msgstr ""
msgid "Help topics: " msgid "Help topics: "
msgstr "" msgstr ""
#: wmic.rc:25
msgid "Error: Command line not supported\n"
msgstr ""
#: wmic.rc:26
msgid "Error: Alias not found\n"
msgstr ""
#: wmic.rc:27
msgid "Error: Invalid query\n"
msgstr ""
#: wordpad.rc:28 #: wordpad.rc:28
msgid "&New...\tCtrl+N" msgid "&New...\tCtrl+N"
msgstr "" msgstr ""

View File

@ -13049,6 +13049,18 @@ msgstr ""
msgid "Help topics: " msgid "Help topics: "
msgstr "" msgstr ""
#: wmic.rc:25
msgid "Error: Command line not supported\n"
msgstr ""
#: wmic.rc:26
msgid "Error: Alias not found\n"
msgstr ""
#: wmic.rc:27
msgid "Error: Invalid query\n"
msgstr ""
#: wordpad.rc:28 #: wordpad.rc:28
msgid "&New...\tCtrl+N" msgid "&New...\tCtrl+N"
msgstr "" msgstr ""

View File

@ -13698,6 +13698,24 @@ msgstr ""
msgid "Help topics: " msgid "Help topics: "
msgstr "Tematy pomocy: " msgstr "Tematy pomocy: "
#: wmic.rc:25
#, fuzzy
#| msgid "Error: Invalid command line parameters\n"
msgid "Error: Command line not supported\n"
msgstr "Błąd: Niewłaściwe parametry wiersza poleceń\n"
#: wmic.rc:26
#, fuzzy
#| msgid "Property set not found.\n"
msgid "Error: Alias not found\n"
msgstr "Nie znaleziono zestawu właściwości.\n"
#: wmic.rc:27
#, fuzzy
#| msgid "Error: Invalid key name\n"
msgid "Error: Invalid query\n"
msgstr "Błąd: Niewłaściwa nazwa klucza\n"
#: wordpad.rc:28 #: wordpad.rc:28
msgid "&New...\tCtrl+N" msgid "&New...\tCtrl+N"
msgstr "&Nowy...\tCtrl+N" msgstr "&Nowy...\tCtrl+N"

View File

@ -13777,6 +13777,24 @@ msgstr "Não foi possível encontrar uma implementação do richedit... Abortand
msgid "Help topics: " msgid "Help topics: "
msgstr "Tópicos de ajuda: " msgstr "Tópicos de ajuda: "
#: wmic.rc:25
#, fuzzy
#| msgid "Error: Invalid command line parameters\n"
msgid "Error: Command line not supported\n"
msgstr "Erro: Parâmetros da linha de comandos inválidos\n"
#: wmic.rc:26
#, fuzzy
#| msgid "Property set not found.\n"
msgid "Error: Alias not found\n"
msgstr "Propriedade não encontrada.\n"
#: wmic.rc:27
#, fuzzy
#| msgid "Error: Invalid key name\n"
msgid "Error: Invalid query\n"
msgstr "Erro: Nome de chave inválido\n"
#: wordpad.rc:28 #: wordpad.rc:28
msgid "&New...\tCtrl+N" msgid "&New...\tCtrl+N"
msgstr "&Novo...\tCtrl+N" msgstr "&Novo...\tCtrl+N"

View File

@ -13709,6 +13709,24 @@ msgstr "Não foi possível encontrar uma implementação do richedit... A aborta
msgid "Help topics: " msgid "Help topics: "
msgstr "Tópicos de ajuda: " msgstr "Tópicos de ajuda: "
#: wmic.rc:25
#, fuzzy
#| msgid "Error: Invalid command line parameters\n"
msgid "Error: Command line not supported\n"
msgstr "Erro: Parâmetros da linha de comandos inválidos\n"
#: wmic.rc:26
#, fuzzy
#| msgid "Property set not found.\n"
msgid "Error: Alias not found\n"
msgstr "Conjunto de propriedades não encontrado.\n"
#: wmic.rc:27
#, fuzzy
#| msgid "Error: Invalid key name\n"
msgid "Error: Invalid query\n"
msgstr "Erro: Nome de chave inválido\n"
#: wordpad.rc:28 #: wordpad.rc:28
msgid "&New...\tCtrl+N" msgid "&New...\tCtrl+N"
msgstr "&Novo...\tCtrl+N" msgstr "&Novo...\tCtrl+N"

View File

@ -13141,6 +13141,18 @@ msgstr ""
msgid "Help topics: " msgid "Help topics: "
msgstr "" msgstr ""
#: wmic.rc:25
msgid "Error: Command line not supported\n"
msgstr ""
#: wmic.rc:26
msgid "Error: Alias not found\n"
msgstr ""
#: wmic.rc:27
msgid "Error: Invalid query\n"
msgstr ""
#: wordpad.rc:28 #: wordpad.rc:28
msgid "&New...\tCtrl+N" msgid "&New...\tCtrl+N"
msgstr "" msgstr ""

View File

@ -13891,6 +13891,23 @@ msgstr "Nu am găsit o implementare pentru richedit... Abandonez"
msgid "Help topics: " msgid "Help topics: "
msgstr "Subiecte de ajutor: " msgstr "Subiecte de ajutor: "
#: wmic.rc:25
#, fuzzy
#| msgid "Error: Invalid command line parameters\n"
msgid "Error: Command line not supported\n"
msgstr "Eroare: Parametri nevalizi pentru linia de comandă\n"
#: wmic.rc:26
#, fuzzy
msgid "Error: Alias not found\n"
msgstr "PATH negăsită.\n"
#: wmic.rc:27
#, fuzzy
#| msgid "Error: Invalid key name\n"
msgid "Error: Invalid query\n"
msgstr "Eroare: Nume de cheie nevalid\n"
#: wordpad.rc:28 #: wordpad.rc:28
msgid "&New...\tCtrl+N" msgid "&New...\tCtrl+N"
msgstr "&Nou...\tCtrl+N" msgstr "&Nou...\tCtrl+N"

View File

@ -13659,6 +13659,24 @@ msgstr "Не могу найти richedit"
msgid "Help topics: " msgid "Help topics: "
msgstr "Содержание: " msgstr "Содержание: "
#: wmic.rc:25
#, fuzzy
#| msgid "Error: Invalid command line parameters\n"
msgid "Error: Command line not supported\n"
msgstr "Ошибка: неправильные параметры командной строки\n"
#: wmic.rc:26
#, fuzzy
#| msgid "Property set not found.\n"
msgid "Error: Alias not found\n"
msgstr "Набор свойств не найден.\n"
#: wmic.rc:27
#, fuzzy
#| msgid "Error: Invalid key name\n"
msgid "Error: Invalid query\n"
msgstr "Ошибка: неправильное имя раздела\n"
#: wordpad.rc:28 #: wordpad.rc:28
msgid "&New...\tCtrl+N" msgid "&New...\tCtrl+N"
msgstr "Созд&ать...\tCtrl+N" msgstr "Созд&ать...\tCtrl+N"

View File

@ -13230,6 +13230,19 @@ msgstr ""
msgid "Help topics: " msgid "Help topics: "
msgstr "" msgstr ""
#: wmic.rc:25
msgid "Error: Command line not supported\n"
msgstr ""
#: wmic.rc:26
#, fuzzy
msgid "Error: Alias not found\n"
msgstr "Súbor nenájdený.\n"
#: wmic.rc:27
msgid "Error: Invalid query\n"
msgstr ""
#: wordpad.rc:28 #: wordpad.rc:28
msgid "&New...\tCtrl+N" msgid "&New...\tCtrl+N"
msgstr "&Nový...\tCtrl+N" msgstr "&Nový...\tCtrl+N"

View File

@ -13722,6 +13722,24 @@ msgstr "Ni mogoče najti knjižnice richedit ... Prekinjanje"
msgid "Help topics: " msgid "Help topics: "
msgstr "Teme pomoči: " msgstr "Teme pomoči: "
#: wmic.rc:25
#, fuzzy
#| msgid "Error: Invalid command line parameters\n"
msgid "Error: Command line not supported\n"
msgstr "Napaka: neveljaven parameter v ukazni vrstici\n"
#: wmic.rc:26
#, fuzzy
#| msgid "Property set not found.\n"
msgid "Error: Alias not found\n"
msgstr "Nastavljene lastnosti ni mogoče najti.\n"
#: wmic.rc:27
#, fuzzy
#| msgid "Error: Invalid key name\n"
msgid "Error: Invalid query\n"
msgstr "Napaka: neveljavno ime ključa\n"
#: wordpad.rc:28 #: wordpad.rc:28
msgid "&New...\tCtrl+N" msgid "&New...\tCtrl+N"
msgstr "&Nova ...\tCtrl+N" msgstr "&Nova ...\tCtrl+N"

View File

@ -13770,6 +13770,23 @@ msgstr ""
msgid "Help topics: " msgid "Help topics: "
msgstr "" msgstr ""
#: wmic.rc:25
#, fuzzy
#| msgid "Error: Invalid command line parameters\n"
msgid "Error: Command line not supported\n"
msgstr ""
"Грешка: унесени су непознати или неисправни параметри наредбене линије\n"
#: wmic.rc:26
#, fuzzy
msgid "Error: Alias not found\n"
msgstr "Датотека није пронађена.\n"
#: wmic.rc:27
#, fuzzy
msgid "Error: Invalid query\n"
msgstr "Неисправна синтакса.\n"
#: wordpad.rc:28 #: wordpad.rc:28
#, fuzzy #, fuzzy
msgid "&New...\tCtrl+N" msgid "&New...\tCtrl+N"

View File

@ -13911,6 +13911,23 @@ msgstr "Ne mogu naći richedit ubacen... Prekidam"
msgid "Help topics: " msgid "Help topics: "
msgstr "Teme pomoći: " msgstr "Teme pomoći: "
#: wmic.rc:25
#, fuzzy
#| msgid "Error: Invalid command line parameters\n"
msgid "Error: Command line not supported\n"
msgstr ""
"Greška: uneseni su nepoznati ili neispravni parametri naredbene linije\n"
#: wmic.rc:26
#, fuzzy
msgid "Error: Alias not found\n"
msgstr "Datoteka nije pronađena.\n"
#: wmic.rc:27
#, fuzzy
msgid "Error: Invalid query\n"
msgstr "Neispravna sintaksa.\n"
#: wordpad.rc:28 #: wordpad.rc:28
#, fuzzy #, fuzzy
msgid "&New...\tCtrl+N" msgid "&New...\tCtrl+N"

View File

@ -13566,6 +13566,24 @@ msgstr "Kan inte hitta en implementation av richedit... Avslutar"
msgid "Help topics: " msgid "Help topics: "
msgstr "Hjälprubriker: " msgstr "Hjälprubriker: "
#: wmic.rc:25
#, fuzzy
#| msgid "Error: Invalid command line parameters\n"
msgid "Error: Command line not supported\n"
msgstr "Fel: ogiltiga kommandoradsparametrar\n"
#: wmic.rc:26
#, fuzzy
#| msgid "Property set not found.\n"
msgid "Error: Alias not found\n"
msgstr "Egenskapsmängden hittades inte.\n"
#: wmic.rc:27
#, fuzzy
#| msgid "Error: Invalid key name\n"
msgid "Error: Invalid query\n"
msgstr "Fel: ogiltigt nyckelnamn\n"
#: wordpad.rc:28 #: wordpad.rc:28
msgid "&New...\tCtrl+N" msgid "&New...\tCtrl+N"
msgstr "&Nytt...\tCtrl+N" msgstr "&Nytt...\tCtrl+N"

View File

@ -13049,6 +13049,18 @@ msgstr ""
msgid "Help topics: " msgid "Help topics: "
msgstr "" msgstr ""
#: wmic.rc:25
msgid "Error: Command line not supported\n"
msgstr ""
#: wmic.rc:26
msgid "Error: Alias not found\n"
msgstr ""
#: wmic.rc:27
msgid "Error: Invalid query\n"
msgstr ""
#: wordpad.rc:28 #: wordpad.rc:28
msgid "&New...\tCtrl+N" msgid "&New...\tCtrl+N"
msgstr "" msgstr ""

View File

@ -13284,6 +13284,19 @@ msgstr ""
msgid "Help topics: " msgid "Help topics: "
msgstr "" msgstr ""
#: wmic.rc:25
msgid "Error: Command line not supported\n"
msgstr ""
#: wmic.rc:26
#, fuzzy
msgid "Error: Alias not found\n"
msgstr "ไม่พบแฟ้ม.\n"
#: wmic.rc:27
msgid "Error: Invalid query\n"
msgstr ""
#: wordpad.rc:28 #: wordpad.rc:28
#, fuzzy #, fuzzy
msgid "&New...\tCtrl+N" msgid "&New...\tCtrl+N"

View File

@ -13359,6 +13359,22 @@ msgstr ""
msgid "Help topics: " msgid "Help topics: "
msgstr "Yardım konuları: " msgstr "Yardım konuları: "
#: wmic.rc:25
msgid "Error: Command line not supported\n"
msgstr ""
#: wmic.rc:26
#, fuzzy
#| msgid "Entry not found.\n"
msgid "Error: Alias not found\n"
msgstr "Girdi bulunamadı.\n"
#: wmic.rc:27
#, fuzzy
#| msgid "Invalid entry.\n"
msgid "Error: Invalid query\n"
msgstr "Geçersiz giriş.\n"
#: wordpad.rc:28 #: wordpad.rc:28
msgid "&New...\tCtrl+N" msgid "&New...\tCtrl+N"
msgstr "&Yeni...\tCtrl+N" msgstr "&Yeni...\tCtrl+N"

View File

@ -13701,6 +13701,24 @@ msgstr "Не можу знайти richedit... Скасовую"
msgid "Help topics: " msgid "Help topics: "
msgstr "Розділи Довідки: " msgstr "Розділи Довідки: "
#: wmic.rc:25
#, fuzzy
#| msgid "Error: Invalid command line parameters\n"
msgid "Error: Command line not supported\n"
msgstr "Помилка: неправильні параметри командного рядка\n"
#: wmic.rc:26
#, fuzzy
#| msgid "Property set not found.\n"
msgid "Error: Alias not found\n"
msgstr "Набір властивостей не знайдено.\n"
#: wmic.rc:27
#, fuzzy
#| msgid "Error: Invalid key name\n"
msgid "Error: Invalid query\n"
msgstr "Помилка: неправильне ім'я ключа\n"
#: wordpad.rc:28 #: wordpad.rc:28
msgid "&New...\tCtrl+N" msgid "&New...\tCtrl+N"
msgstr "&Новий...\tCtrl+N" msgstr "&Новий...\tCtrl+N"

View File

@ -13215,6 +13215,19 @@ msgstr ""
msgid "Help topics: " msgid "Help topics: "
msgstr "" msgstr ""
#: wmic.rc:25
msgid "Error: Command line not supported\n"
msgstr ""
#: wmic.rc:26
#, fuzzy
msgid "Error: Alias not found\n"
msgstr "'%s' pout nén esse trové."
#: wmic.rc:27
msgid "Error: Invalid query\n"
msgstr ""
#: wordpad.rc:28 #: wordpad.rc:28
#, fuzzy #, fuzzy
msgid "&New...\tCtrl+N" msgid "&New...\tCtrl+N"

View File

@ -12971,6 +12971,18 @@ msgstr ""
msgid "Help topics: " msgid "Help topics: "
msgstr "" msgstr ""
#: wmic.rc:25
msgid "Error: Command line not supported\n"
msgstr ""
#: wmic.rc:26
msgid "Error: Alias not found\n"
msgstr ""
#: wmic.rc:27
msgid "Error: Invalid query\n"
msgstr ""
#: wordpad.rc:28 #: wordpad.rc:28
msgid "&New...\tCtrl+N" msgid "&New...\tCtrl+N"
msgstr "" msgstr ""

View File

@ -13131,6 +13131,24 @@ msgstr "找不到 richedit 的实现……终止"
msgid "Help topics: " msgid "Help topics: "
msgstr "帮助主题: " msgstr "帮助主题: "
#: wmic.rc:25
#, fuzzy
#| msgid "Operation not supported.\n"
msgid "Error: Command line not supported\n"
msgstr "不支持此操作。\n"
#: wmic.rc:26
#, fuzzy
#| msgid "Property set not found.\n"
msgid "Error: Alias not found\n"
msgstr "找不到属性集。\n"
#: wmic.rc:27
#, fuzzy
#| msgid "Invalid query syntax.\n"
msgid "Error: Invalid query\n"
msgstr "请求语法无效。\n"
#: wordpad.rc:28 #: wordpad.rc:28
msgid "&New...\tCtrl+N" msgid "&New...\tCtrl+N"
msgstr "新建(&N)...\tCtrl+N" msgstr "新建(&N)...\tCtrl+N"

View File

@ -13070,6 +13070,24 @@ msgstr "找不到 richedit... 終止"
msgid "Help topics: " msgid "Help topics: "
msgstr "說明主題:" msgstr "說明主題:"
#: wmic.rc:25
#, fuzzy
#| msgid "Extended attributes not supported.\n"
msgid "Error: Command line not supported\n"
msgstr "不支援延伸屬性。\n"
#: wmic.rc:26
#, fuzzy
#| msgid "Sector not found.\n"
msgid "Error: Alias not found\n"
msgstr "找不到磁區。\n"
#: wmic.rc:27
#, fuzzy
#| msgid "Invalid key.\n"
msgid "Error: Invalid query\n"
msgstr "無效的機碼。\n"
#: wordpad.rc:28 #: wordpad.rc:28
msgid "&New...\tCtrl+N" msgid "&New...\tCtrl+N"
msgstr "新增(&N)...\tCtrl+N" msgstr "新增(&N)...\tCtrl+N"

View File

@ -1,7 +1,11 @@
MODULE = wmic.exe MODULE = wmic.exe
APPMODE = -mconsole -municode APPMODE = -mconsole -municode
IMPORTS = oleaut32 ole32 user32
C_SRCS = \ C_SRCS = \
main.c main.c
RC_SRCS = wmic.rc
PO_SRCS = wmic.rc
@MAKE_PROG_RULES@ @MAKE_PROG_RULES@

View File

@ -1,5 +1,6 @@
/* /*
* Copyright 2010 Louis Lenders * Copyright 2010 Louis Lenders
* Copyright 2012 Hans Leidekker for CodeWeavers
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public * modify it under the terms of the GNU Lesser General Public
@ -16,18 +17,246 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/ */
#define COBJMACROS
#include <stdio.h>
#include "windows.h"
#include "ocidl.h"
#include "initguid.h"
#include "objidl.h"
#include "wbemcli.h"
#include "wmic.h"
#include "wine/debug.h" #include "wine/debug.h"
#include "wine/unicode.h"
WINE_DEFAULT_DEBUG_CHANNEL(wmic); WINE_DEFAULT_DEBUG_CHANNEL(wmic);
static const WCHAR biosW[] =
{'b','i','o','s',0};
static const WCHAR computersystemW[] =
{'c','o','m','p','u','t','e','r','s','y','s','t','e','m',0};
static const WCHAR cpuW[] =
{'c','p','u',0};
static const WCHAR logicaldiskW[] =
{'L','o','g','i','c','a','l','D','i','s','k',0};
static const WCHAR nicW[] =
{'n','i','c',0};
static const WCHAR osW[] =
{'o','s',0};
static const WCHAR processW[] =
{'p','r','o','c','e','s','s',0};
static const WCHAR win32_biosW[] =
{'W','i','n','3','2','_','B','I','O','S',0};
static const WCHAR win32_computersystemW[] =
{'W','i','n','3','2','_','C','o','m','p','u','t','e','r','S','y','s','t','e','m',0};
static const WCHAR win32_logicaldiskW[] =
{'W','i','n','3','2','_','L','o','g','i','c','a','l','D','i','s','k',0};
static const WCHAR win32_networkadapterW[] =
{'W','i','n','3','2','_','N','e','t','w','o','r','k','A','d','a','p','t','e','r',0};
static const WCHAR win32_operatingsystemW[] =
{'W','i','n','3','2','_','O','p','e','r','a','t','i','n','g','S','y','s','t','e','m',0};
static const WCHAR win32_processW[] =
{'W','i','n','3','2','_','P','r','o','c','e','s','s',0};
static const WCHAR win32_processorW[] =
{'W','i','n','3','2','_','P','r','o','c','e','s','s','o','r',0};
static const struct
{
const WCHAR *alias;
const WCHAR *class;
}
alias_map[] =
{
{ biosW, win32_biosW },
{ computersystemW, win32_computersystemW },
{ cpuW, win32_processorW },
{ logicaldiskW, win32_logicaldiskW },
{ nicW, win32_networkadapterW },
{ osW, win32_operatingsystemW },
{ processW, win32_processW }
};
static const WCHAR *find_class( const WCHAR *alias )
{
unsigned int i;
for (i = 0; i < sizeof(alias_map)/sizeof(alias_map[0]); i++)
{
if (!strcmpiW( alias, alias_map[i].alias )) return alias_map[i].class;
}
return NULL;
}
static inline WCHAR *strdupW( const WCHAR *src )
{
WCHAR *dst;
if (!src) return NULL;
if (!(dst = HeapAlloc( GetProcessHeap(), 0, (strlenW( src ) + 1) * sizeof(WCHAR) ))) return NULL;
strcpyW( dst, src );
return dst;
}
static WCHAR *find_prop( IWbemClassObject *class, const WCHAR *prop )
{
SAFEARRAY *sa;
WCHAR *ret = NULL;
LONG i, last_index = 0;
BSTR str;
if (IWbemClassObject_GetNames( class, NULL, WBEM_FLAG_ALWAYS, NULL, &sa ) != S_OK) return NULL;
SafeArrayGetUBound( sa, 1, &last_index );
for (i = 0; i <= last_index; i++)
{
SafeArrayGetElement( sa, &i, &str );
if (!strcmpiW( str, prop ))
{
ret = strdupW( str );
break;
}
}
SafeArrayDestroy( sa );
return ret;
}
static int output_string( const WCHAR *msg, ... )
{
va_list va_args;
int wlen;
DWORD count, ret;
WCHAR buffer[8192];
va_start( va_args, msg );
vsprintfW( buffer, msg, va_args );
va_end( va_args );
wlen = strlenW( buffer );
ret = WriteConsoleW( GetStdHandle(STD_OUTPUT_HANDLE), buffer, wlen, &count, NULL );
if (!ret)
{
DWORD len;
char *msgA;
/* On Windows WriteConsoleW() fails if the output is redirected. So fall
* back to WriteFile(), assuming the console encoding is still the right
* one in that case.
*/
len = WideCharToMultiByte( GetConsoleOutputCP(), 0, buffer, wlen, NULL, 0, NULL, NULL );
if (!(msgA = HeapAlloc( GetProcessHeap(), 0, len * sizeof(char) ))) return 0;
WideCharToMultiByte( GetConsoleOutputCP(), 0, buffer, wlen, msgA, len, NULL, NULL );
WriteFile( GetStdHandle(STD_OUTPUT_HANDLE), msgA, len, &count, FALSE );
HeapFree( GetProcessHeap(), 0, msgA );
}
return count;
}
static int output_message( int msg )
{
static const WCHAR fmtW[] = {'%','s',0};
WCHAR buffer[8192];
LoadStringW( GetModuleHandleW(NULL), msg, buffer, sizeof(buffer)/sizeof(WCHAR) );
return output_string( fmtW, buffer );
}
static int query_prop( const WCHAR *alias, const WCHAR *propname )
{
static const WCHAR select_allW[] = {'S','E','L','E','C','T',' ','*',' ','F','R','O','M',' ',0};
static const WCHAR cimv2W[] = {'R','O','O','T','\\','C','I','M','V','2',0};
static const WCHAR wqlW[] = {'W','Q','L',0};
static const WCHAR newlineW[] = {'\n',0};
static const WCHAR fmtW[] = {'%','s','\n',0};
HRESULT hr;
IWbemLocator *locator = NULL;
IWbemServices *services = NULL;
IEnumWbemClassObject *result = NULL;
LONG flags = WBEM_FLAG_RETURN_IMMEDIATELY | WBEM_FLAG_FORWARD_ONLY;
BSTR path = NULL, wql = NULL, query = NULL;
const WCHAR *class;
WCHAR *prop = NULL;
BOOL first = TRUE;
int len, ret = -1;
WINE_TRACE("%s, %s\n", debugstr_w(alias), debugstr_w(propname));
if (!(class = find_class( alias )))
{
output_message( STRING_ALIAS_NOT_FOUND );
return -1;
}
CoInitialize( NULL );
CoInitializeSecurity( NULL, -1, NULL, NULL, RPC_C_AUTHN_LEVEL_DEFAULT,
RPC_C_IMP_LEVEL_IMPERSONATE, NULL, EOAC_NONE, NULL );
hr = CoCreateInstance( &CLSID_WbemLocator, NULL, CLSCTX_INPROC_SERVER, &IID_IWbemLocator,
(void **)&locator );
if (hr != S_OK) goto done;
if (!(path = SysAllocString( cimv2W ))) goto done;
hr = IWbemLocator_ConnectServer( locator, path, NULL, NULL, NULL, 0, NULL, NULL, &services );
if (hr != S_OK) goto done;
len = strlenW( class ) + sizeof(select_allW) / sizeof(select_allW[0]);
if (!(query = SysAllocStringLen( NULL, len ))) goto done;
strcpyW( query, select_allW );
strcatW( query, class );
if (!(wql = SysAllocString( wqlW ))) goto done;
hr = IWbemServices_ExecQuery( services, wql, query, flags, NULL, &result );
if (hr != S_OK) goto done;
for (;;)
{
IWbemClassObject *obj;
ULONG count;
VARIANT v;
IEnumWbemClassObject_Next( result, WBEM_INFINITE, 1, &obj, &count );
if (!count) break;
if (first)
{
if (!(prop = find_prop( obj, propname )))
{
output_message( STRING_INVALID_QUERY );
goto done;
}
output_string( fmtW, prop );
first = FALSE;
}
if (IWbemClassObject_Get( obj, prop, 0, &v, NULL, NULL ) == WBEM_S_NO_ERROR)
{
output_string( fmtW, V_BSTR( &v ) );
VariantClear( &v );
}
IWbemClassObject_Release( obj );
}
output_string( newlineW );
ret = 0;
done:
if (result) IEnumWbemClassObject_Release( result );
if (services) IWbemServices_Release( services );
if (locator) IWbemLocator_Release( locator );
SysFreeString( path );
SysFreeString( query );
SysFreeString( wql );
HeapFree( GetProcessHeap(), 0, prop );
CoUninitialize();
return ret;
}
int wmain(int argc, WCHAR *argv[]) int wmain(int argc, WCHAR *argv[])
{ {
int i; static const WCHAR getW[] = {'g','e','t',0};
WINE_FIXME("stub:"); if (argc != 4 || strcmpiW( argv[2], getW ))
for (i = 0; i < argc; i++) {
WINE_FIXME(" %s", wine_dbgstr_w(argv[i])); output_message( STRING_CMDLINE_NOT_SUPPORTED );
WINE_FIXME("\n"); return -1;
}
return 0; return query_prop( argv[1], argv[3] );
} }

23
programs/wmic/wmic.h Normal file
View File

@ -0,0 +1,23 @@
/*
* Copyright 2012 Hans Leidekker for CodeWeavers
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <windef.h>
#define STRING_CMDLINE_NOT_SUPPORTED 101
#define STRING_ALIAS_NOT_FOUND 102
#define STRING_INVALID_QUERY 103

28
programs/wmic/wmic.rc Normal file
View File

@ -0,0 +1,28 @@
/*
* Copyright 2012 Hans Leidekker for CodeWeavers
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "wmic.h"
LANGUAGE LANG_ENGLISH, SUBLANG_DEFAULT
STRINGTABLE
{
STRING_CMDLINE_NOT_SUPPORTED, "Error: Command line not supported\n"
STRING_ALIAS_NOT_FOUND, "Error: Alias not found\n"
STRING_INVALID_QUERY, "Error: Invalid query\n"
}