Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
ae9697f1
Commit
ae9697f1
authored
Jun 19, 2012
by
Hans Leidekker
Committed by
Alexandre Julliard
Jun 19, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wmic: Add support for querying class properties.
parent
f18b24ad
Hide whitespace changes
Inline
Side-by-side
Showing
51 changed files
with
1007 additions
and
9 deletions
+1007
-9
configure
configure
+1
-1
configure.ac
configure.ac
+1
-1
ar.po
po/ar.po
+13
-0
bg.po
po/bg.po
+14
-0
ca.po
po/ca.po
+18
-0
cs.po
po/cs.po
+17
-0
da.po
po/da.po
+18
-0
de.po
po/de.po
+18
-0
el.po
po/el.po
+15
-0
en.po
po/en.po
+12
-0
en_US.po
po/en_US.po
+12
-0
eo.po
po/eo.po
+16
-0
es.po
po/es.po
+18
-0
fa.po
po/fa.po
+13
-0
fi.po
po/fi.po
+18
-0
fr.po
po/fr.po
+18
-0
he.po
po/he.po
+17
-0
hi.po
po/hi.po
+12
-0
hu.po
po/hu.po
+18
-0
it.po
po/it.po
+18
-0
ja.po
po/ja.po
+18
-0
ko.po
po/ko.po
+18
-0
lt.po
po/lt.po
+18
-0
ml.po
po/ml.po
+12
-0
nb_NO.po
po/nb_NO.po
+17
-0
nl.po
po/nl.po
+18
-0
or.po
po/or.po
+12
-0
pa.po
po/pa.po
+12
-0
pl.po
po/pl.po
+18
-0
pt_BR.po
po/pt_BR.po
+18
-0
pt_PT.po
po/pt_PT.po
+18
-0
rm.po
po/rm.po
+12
-0
ro.po
po/ro.po
+17
-0
ru.po
po/ru.po
+18
-0
sk.po
po/sk.po
+13
-0
sl.po
po/sl.po
+18
-0
sr_RS@cyrillic.po
po/sr_RS@cyrillic.po
+17
-0
sr_RS@latin.po
po/sr_RS@latin.po
+17
-0
sv.po
po/sv.po
+18
-0
te.po
po/te.po
+12
-0
th.po
po/th.po
+13
-0
tr.po
po/tr.po
+16
-0
uk.po
po/uk.po
+18
-0
wa.po
po/wa.po
+13
-0
wine.pot
po/wine.pot
+12
-0
zh_CN.po
po/zh_CN.po
+18
-0
zh_TW.po
po/zh_TW.po
+18
-0
Makefile.in
programs/wmic/Makefile.in
+4
-0
main.c
programs/wmic/main.c
+236
-7
wmic.h
programs/wmic/wmic.h
+23
-0
wmic.rc
programs/wmic/wmic.rc
+28
-0
No files found.
configure
View file @
ae9697f1
...
...
@@ -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 winoldap.mod16 enable_win16
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 write enable_write
install
,po
wine_fn_config_program wscript enable_wscript
install
...
...
configure.ac
View file @
ae9697f1
...
...
@@ -3091,7 +3091,7 @@ WINE_CONFIG_PROGRAM(winhelp.exe16,enable_win16,[install])
WINE_CONFIG_PROGRAM(winhlp32,,[install,po])
WINE_CONFIG_PROGRAM(winoldap.mod16,enable_win16,[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(write,,[install,po])
WINE_CONFIG_PROGRAM(wscript,,[install])
...
...
po/ar.po
View file @
ae9697f1
...
...
@@ -13272,6 +13272,19 @@ msgstr ""
msgid "Help topics: "
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
#, fuzzy
msgid "&New...\tCtrl+N"
...
...
po/bg.po
View file @
ae9697f1
...
...
@@ -13475,6 +13475,20 @@ msgstr ""
msgid "Help topics: "
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
#, fuzzy
msgid "&New...\tCtrl+N"
...
...
po/ca.po
View file @
ae9697f1
...
...
@@ -13799,6 +13799,24 @@ msgstr "No es pot trobar una implementació de richedit...Avortant"
msgid "Help topics: "
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
msgid "&New...\tCtrl+N"
msgstr "&Nou...\tCtrl+N"
...
...
po/cs.po
View file @
ae9697f1
...
...
@@ -13831,6 +13831,23 @@ msgstr "Nemohu najít implementaci richedit... Přerušuji"
msgid "Help topics: "
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
msgid "&New...\tCtrl+N"
msgstr "&Nový...\tCtrl+N"
...
...
po/da.po
View file @
ae9697f1
...
...
@@ -13692,6 +13692,24 @@ msgstr "Kan ikke finde en 'richedit' implementering... Afbryder"
msgid "Help topics: "
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
msgid "&New...\tCtrl+N"
msgstr "&Ny...\tCtrl+N"
...
...
po/de.po
View file @
ae9697f1
...
...
@@ -13730,6 +13730,24 @@ msgstr "Die Richedit Implementation konnte nicht gefunden werden... Breche ab"
msgid "Help topics: "
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
msgid "&New...\tCtrl+N"
msgstr "&Neu...\tStrg+N"
...
...
po/el.po
View file @
ae9697f1
...
...
@@ -13227,6 +13227,21 @@ msgstr ""
msgid "Help topics: "
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
msgid "&New...\tCtrl+N"
msgstr ""
...
...
po/en.po
View file @
ae9697f1
...
...
@@ -13633,6 +13633,18 @@ msgstr "Cannot find a richedit implementation... Aborting"
msgid "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
msgid "&New...\tCtrl+N"
msgstr "&New...\tCtrl+N"
...
...
po/en_US.po
View file @
ae9697f1
...
...
@@ -13638,6 +13638,18 @@ msgstr "Cannot find a richedit implementation... Aborting"
msgid "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
msgid "&New...\tCtrl+N"
msgstr "&New...\tCtrl+N"
...
...
po/eo.po
View file @
ae9697f1
...
...
@@ -13036,6 +13036,22 @@ msgstr "Ne eblas trovi realigon de richedit... Ĉesigante"
msgid "Help topics: "
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
msgid "&New...\tCtrl+N"
msgstr "&Nova...\tStir+N"
...
...
po/es.po
View file @
ae9697f1
...
...
@@ -13798,6 +13798,24 @@ msgstr "No se pudo encontrar una implementación de richedit... Abortando"
msgid "Help topics: "
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
msgid "&New...\tCtrl+N"
msgstr "&Nuevo...\tCtrl+N"
...
...
po/fa.po
View file @
ae9697f1
...
...
@@ -13273,6 +13273,19 @@ msgstr ""
msgid "Help topics: "
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
#, fuzzy
msgid "&New...\tCtrl+N"
...
...
po/fi.po
View file @
ae9697f1
...
...
@@ -13616,6 +13616,24 @@ msgstr "Richedit-toteutusta ei löytynyt... Keskeytetään"
msgid "Help topics: "
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
msgid "&New...\tCtrl+N"
msgstr "&Uusi...\tCtrl+N"
...
...
po/fr.po
View file @
ae9697f1
...
...
@@ -13803,6 +13803,24 @@ msgstr "Aucune implémentation richedit détectée... Abandon"
msgid "Help topics: "
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
msgid "&New...\tCtrl+N"
msgstr "&Nouveau...\tCtrl+N"
...
...
po/he.po
View file @
ae9697f1
...
...
@@ -13848,6 +13848,23 @@ msgstr "לא ניתן למצוא יישום של richedit... התכנית תצא
msgid "Help topics: "
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
msgid "&New...\tCtrl+N"
msgstr "&חדש...\tCtrl+N"
...
...
po/hi.po
View file @
ae9697f1
...
...
@@ -13049,6 +13049,18 @@ msgstr ""
msgid "Help topics: "
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
msgid "&New...\tCtrl+N"
msgstr ""
...
...
po/hu.po
View file @
ae9697f1
...
...
@@ -13703,6 +13703,24 @@ msgstr "Nem található richedit megvalósítás... Megszakítás"
msgid "Help topics: "
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
msgid "&New...\tCtrl+N"
msgstr "&Új...\tCtrl+N"
...
...
po/it.po
View file @
ae9697f1
...
...
@@ -13795,6 +13795,24 @@ msgstr ""
msgid "Help topics: "
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
msgid "&New...\tCtrl+N"
msgstr "&Nuovo...\tCtrl+N"
...
...
po/ja.po
View file @
ae9697f1
...
...
@@ -13631,6 +13631,24 @@ msgstr "Richedit が見つかりません... 終了します"
msgid "Help topics: "
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
msgid "&New...\tCtrl+N"
msgstr "新規作成(&N)...\tCtrl+N"
...
...
po/ko.po
View file @
ae9697f1
...
...
@@ -13598,6 +13598,24 @@ msgstr "richedit 구현을 찾을수 없습니다... 취소중"
msgid "Help topics: "
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
msgid "&New...\tCtrl+N"
msgstr "새 파일(&N)...\tCtrl+N"
...
...
po/lt.po
View file @
ae9697f1
...
...
@@ -13664,6 +13664,24 @@ msgstr "Nepavyko rasti RichEdit realizacijos... Nutraukiama"
msgid "Help topics: "
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
msgid "&New...\tCtrl+N"
msgstr "&Naujas...\tVald+N"
...
...
po/ml.po
View file @
ae9697f1
...
...
@@ -13049,6 +13049,18 @@ msgstr ""
msgid "Help topics: "
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
msgid "&New...\tCtrl+N"
msgstr ""
...
...
po/nb_NO.po
View file @
ae9697f1
...
...
@@ -14059,6 +14059,23 @@ msgstr "Klarte ikke finne richedit; avbryter"
msgid "Help topics: "
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
msgid "&New...\tCtrl+N"
msgstr "&Ny...\tCtrl+N"
...
...
po/nl.po
View file @
ae9697f1
...
...
@@ -13896,6 +13896,24 @@ msgstr "Kan geen richedit implementatie vinden... Actie afgebroken"
msgid "Help topics: "
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
msgid "&New...\tCtrl+N"
msgstr "&Nieuw...\tCtrl+N"
...
...
po/or.po
View file @
ae9697f1
...
...
@@ -13049,6 +13049,18 @@ msgstr ""
msgid "Help topics: "
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
msgid "&New...\tCtrl+N"
msgstr ""
...
...
po/pa.po
View file @
ae9697f1
...
...
@@ -13049,6 +13049,18 @@ msgstr ""
msgid "Help topics: "
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
msgid "&New...\tCtrl+N"
msgstr ""
...
...
po/pl.po
View file @
ae9697f1
...
...
@@ -13698,6 +13698,24 @@ msgstr ""
msgid "Help topics: "
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
msgid "&New...\tCtrl+N"
msgstr "&Nowy...\tCtrl+N"
...
...
po/pt_BR.po
View file @
ae9697f1
...
...
@@ -13777,6 +13777,24 @@ msgstr "Não foi possível encontrar uma implementação do richedit... Abortand
msgid "Help topics: "
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
msgid "&New...\tCtrl+N"
msgstr "&Novo...\tCtrl+N"
...
...
po/pt_PT.po
View file @
ae9697f1
...
...
@@ -13709,6 +13709,24 @@ msgstr "Não foi possível encontrar uma implementação do richedit... A aborta
msgid "Help topics: "
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
msgid "&New...\tCtrl+N"
msgstr "&Novo...\tCtrl+N"
...
...
po/rm.po
View file @
ae9697f1
...
...
@@ -13141,6 +13141,18 @@ msgstr ""
msgid "Help topics: "
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
msgid "&New...\tCtrl+N"
msgstr ""
...
...
po/ro.po
View file @
ae9697f1
...
...
@@ -13891,6 +13891,23 @@ msgstr "Nu am găsit o implementare pentru richedit... Abandonez"
msgid "Help topics: "
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
msgid "&New...\tCtrl+N"
msgstr "&Nou...\tCtrl+N"
...
...
po/ru.po
View file @
ae9697f1
...
...
@@ -13659,6 +13659,24 @@ msgstr "Не могу найти richedit"
msgid "Help topics: "
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
msgid "&New...\tCtrl+N"
msgstr "Созд&ать...\tCtrl+N"
...
...
po/sk.po
View file @
ae9697f1
...
...
@@ -13230,6 +13230,19 @@ msgstr ""
msgid "Help topics: "
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
msgid "&New...\tCtrl+N"
msgstr "&Nový...\tCtrl+N"
...
...
po/sl.po
View file @
ae9697f1
...
...
@@ -13722,6 +13722,24 @@ msgstr "Ni mogoče najti knjižnice richedit ... Prekinjanje"
msgid "Help topics: "
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
msgid "&New...\tCtrl+N"
msgstr "&Nova ...\tCtrl+N"
...
...
po/sr_RS@cyrillic.po
View file @
ae9697f1
...
...
@@ -13770,6 +13770,23 @@ msgstr ""
msgid "Help topics: "
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
#, fuzzy
msgid "&New...\tCtrl+N"
...
...
po/sr_RS@latin.po
View file @
ae9697f1
...
...
@@ -13911,6 +13911,23 @@ msgstr "Ne mogu naći richedit ubacen... Prekidam"
msgid "Help topics: "
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
#, fuzzy
msgid "&New...\tCtrl+N"
...
...
po/sv.po
View file @
ae9697f1
...
...
@@ -13566,6 +13566,24 @@ msgstr "Kan inte hitta en implementation av richedit... Avslutar"
msgid "Help topics: "
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
msgid "&New...\tCtrl+N"
msgstr "&Nytt...\tCtrl+N"
...
...
po/te.po
View file @
ae9697f1
...
...
@@ -13049,6 +13049,18 @@ msgstr ""
msgid "Help topics: "
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
msgid "&New...\tCtrl+N"
msgstr ""
...
...
po/th.po
View file @
ae9697f1
...
...
@@ -13284,6 +13284,19 @@ msgstr ""
msgid "Help topics: "
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
#, fuzzy
msgid "&New...\tCtrl+N"
...
...
po/tr.po
View file @
ae9697f1
...
...
@@ -13359,6 +13359,22 @@ msgstr ""
msgid "Help topics: "
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
msgid "&New...\tCtrl+N"
msgstr "&Yeni...\tCtrl+N"
...
...
po/uk.po
View file @
ae9697f1
...
...
@@ -13701,6 +13701,24 @@ msgstr "Не можу знайти richedit... Скасовую"
msgid "Help topics: "
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
msgid "&New...\tCtrl+N"
msgstr "&Новий...\tCtrl+N"
...
...
po/wa.po
View file @
ae9697f1
...
...
@@ -13215,6 +13215,19 @@ msgstr ""
msgid "Help topics: "
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
#, fuzzy
msgid "&New...\tCtrl+N"
...
...
po/wine.pot
View file @
ae9697f1
...
...
@@ -12971,6 +12971,18 @@ msgstr ""
msgid "Help topics: "
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
msgid "&New...\tCtrl+N"
msgstr ""
...
...
po/zh_CN.po
View file @
ae9697f1
...
...
@@ -13131,6 +13131,24 @@ msgstr "找不到 richedit 的实现……终止"
msgid "Help topics: "
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
msgid "&New...\tCtrl+N"
msgstr "新建(&N)...\tCtrl+N"
...
...
po/zh_TW.po
View file @
ae9697f1
...
...
@@ -13070,6 +13070,24 @@ msgstr "找不到 richedit... 終止"
msgid "Help topics: "
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
msgid "&New...\tCtrl+N"
msgstr "新增(&N)...\tCtrl+N"
...
...
programs/wmic/Makefile.in
View file @
ae9697f1
MODULE
=
wmic.exe
APPMODE
=
-mconsole
-municode
IMPORTS
=
oleaut32 ole32 user32
C_SRCS
=
\
main.c
RC_SRCS
=
wmic.rc
PO_SRCS
=
wmic.rc
@MAKE_PROG_RULES@
programs/wmic/main.c
View file @
ae9697f1
/*
* Copyright 2010 Louis Lenders
* 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
...
...
@@ -16,18 +17,246 @@
* 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/unicode.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
wmic
);
int
wmain
(
int
argc
,
WCHAR
*
argv
[])
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
)
{
int
i
;
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
;
WINE_FIXME
(
"stub:"
);
for
(
i
=
0
;
i
<
argc
;
i
++
)
WINE_FIXME
(
" %s"
,
wine_dbgstr_w
(
argv
[
i
]));
WINE_FIXME
(
"
\n
"
);
/* 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
[])
{
static
const
WCHAR
getW
[]
=
{
'g'
,
'e'
,
't'
,
0
};
return
0
;
if
(
argc
!=
4
||
strcmpiW
(
argv
[
2
],
getW
))
{
output_message
(
STRING_CMDLINE_NOT_SUPPORTED
);
return
-
1
;
}
return
query_prop
(
argv
[
1
],
argv
[
3
]
);
}
programs/wmic/wmic.h
0 → 100644
View file @
ae9697f1
/*
* 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
programs/wmic/wmic.rc
0 → 100644
View file @
ae9697f1
/*
* 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"
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment