Author: dchapyshev
Date: Sat Oct 24 15:32:45 2009
New Revision: 43714
URL:
http://svn.reactos.org/svn/reactos?rev=43714&view=rev
Log:
- Add reg.exe from Wine 1.1.31
Added:
trunk/reactos/base/applications/cmdutils/reg/ (with props)
trunk/reactos/base/applications/cmdutils/reg/Da.rc (with props)
trunk/reactos/base/applications/cmdutils/reg/De.rc (with props)
trunk/reactos/base/applications/cmdutils/reg/En.rc (with props)
trunk/reactos/base/applications/cmdutils/reg/Fr.rc (with props)
trunk/reactos/base/applications/cmdutils/reg/Ja.rc (with props)
trunk/reactos/base/applications/cmdutils/reg/Ko.rc (with props)
trunk/reactos/base/applications/cmdutils/reg/Lt.rc (with props)
trunk/reactos/base/applications/cmdutils/reg/Nl.rc (with props)
trunk/reactos/base/applications/cmdutils/reg/No.rc (with props)
trunk/reactos/base/applications/cmdutils/reg/Pl.rc (with props)
trunk/reactos/base/applications/cmdutils/reg/Pt.rc (with props)
trunk/reactos/base/applications/cmdutils/reg/Ru.rc (with props)
trunk/reactos/base/applications/cmdutils/reg/Si.rc (with props)
trunk/reactos/base/applications/cmdutils/reg/reg.c (with props)
trunk/reactos/base/applications/cmdutils/reg/reg.h (with props)
trunk/reactos/base/applications/cmdutils/reg/reg.rbuild (with props)
trunk/reactos/base/applications/cmdutils/reg/rsrc.rc (with props)
Modified:
trunk/reactos/base/applications/cmdutils/cmdutils.rbuild
trunk/reactos/boot/bootdata/packages/reactos.dff
Modified: trunk/reactos/base/applications/cmdutils/cmdutils.rbuild
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/cmdutils…
==============================================================================
--- trunk/reactos/base/applications/cmdutils/cmdutils.rbuild [iso-8859-1] (original)
+++ trunk/reactos/base/applications/cmdutils/cmdutils.rbuild [iso-8859-1] Sat Oct 24
15:32:45 2009
@@ -19,6 +19,9 @@
<directory name="more">
<xi:include href="more/more.rbuild" />
</directory>
+ <directory name="reg">
+ <xi:include href="reg/reg.rbuild" />
+ </directory>
<directory name="xcopy">
<xi:include href="xcopy/xcopy.rbuild" />
</directory>
Propchange: trunk/reactos/base/applications/cmdutils/reg/
------------------------------------------------------------------------------
--- bugtraq:logregex (added)
+++ bugtraq:logregex Sat Oct 24 15:32:45 2009
@@ -1,0 +1,2 @@
+([Ii]ssue|[Bb]ug)s? #?(\d+)(,? ?#?(\d+))*(,? ?(and |or )?#?(\d+))?
+(\d+)
Propchange: trunk/reactos/base/applications/cmdutils/reg/
------------------------------------------------------------------------------
bugtraq:message = See issue #%BUGID% for more details.
Propchange: trunk/reactos/base/applications/cmdutils/reg/
------------------------------------------------------------------------------
bugtraq:url =
http://www.reactos.org/bugzilla/show_bug.cgi?id=%BUGID%
Propchange: trunk/reactos/base/applications/cmdutils/reg/
------------------------------------------------------------------------------
tsvn:logminsize = 10
Added: trunk/reactos/base/applications/cmdutils/reg/Da.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/cmdutils…
==============================================================================
--- trunk/reactos/base/applications/cmdutils/reg/Da.rc (added)
+++ trunk/reactos/base/applications/cmdutils/reg/Da.rc [iso-8859-1] Sat Oct 24 15:32:45
2009
@@ -1,0 +1,32 @@
+/*
+ * REG.EXE - Wine-compatible reg program.
+ * Danish language support
+ *
+ * Copyright 2008 Jens Albretsen <jens(a)albretsen.dk>
+ *
+ * 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 "reg.h"
+
+LANGUAGE LANG_DANISH, SUBLANG_DEFAULT
+
+STRINGTABLE
+{
+ STRING_USAGE, "Syntaksen for dette kommando er:\n\nREG [ ADD | DELETE | QUERY
]\nREG kommando /?\n"
+ STRING_ADD_USAGE, "REG ADD nøgle_navn [/v værdi | /ve] [/t type] [/s separator]
[/d data] [/f]\n"
+ STRING_DELETE_USAGE, "REG DELETE nøgle_navn [/v værdi | /ve | /va] [/f]\n"
+ STRING_QUERY_USAGE, "REG QUERY nøgle_navn [/v værdi | /ve] [/s]\n"
+}
Propchange: trunk/reactos/base/applications/cmdutils/reg/Da.rc
------------------------------------------------------------------------------
svn:eol-style = native
Added: trunk/reactos/base/applications/cmdutils/reg/De.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/cmdutils…
==============================================================================
--- trunk/reactos/base/applications/cmdutils/reg/De.rc (added)
+++ trunk/reactos/base/applications/cmdutils/reg/De.rc [iso-8859-1] Sat Oct 24 15:32:45
2009
@@ -1,0 +1,40 @@
+/*
+ * REG.EXE - Wine-compatible reg program.
+ * German language support
+ *
+ * Copyright 2008 Andrej Sinicyn
+ * Copyright 2009 Michael Stefaniuc
+ *
+ * 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 "reg.h"
+
+LANGUAGE LANG_GERMAN, SUBLANG_NEUTRAL
+
+#pragma code_page(65001)
+
+STRINGTABLE
+{
+ STRING_USAGE, "Die Syntax von diesem Befehl ist:\n\nREG [ ADD | DELETE | QUERY
]\nREG Befehl /?\n"
+ STRING_ADD_USAGE, "REG ADD Schlüssel [/v Wert | /ve] [/t Typ] [/s Trenner] [/d
Daten] [/f]\n"
+ STRING_DELETE_USAGE, "REG DELETE Schlüssel [/v Wert | /ve | /va] [/f]\n"
+ STRING_QUERY_USAGE, "REG QUERY Schlüssel [/v Wert | /ve] [/s]\n"
+ STRING_SUCCESS, "Der Vorgang wurde erfolgreich abgeschlossen\n"
+ STRING_INVALID_KEY, "Fehler: Ungültiger Schlüssel\n"
+ STRING_INVALID_CMDLINE, "Fehler: Ungültige Befehlszeilenargumente\n"
+ STRING_NO_REMOTE, "Fehler: Konnte Schlüssel nicht zum remote Rechner
hinzufügen\n"
+ STRING_CANNOT_FIND, "Fehler: Der angegebene Schlüssel oder Wert konnte nicht
gefunden werden\n"
+}
Propchange: trunk/reactos/base/applications/cmdutils/reg/De.rc
------------------------------------------------------------------------------
svn:eol-style = native
Added: trunk/reactos/base/applications/cmdutils/reg/En.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/cmdutils…
==============================================================================
--- trunk/reactos/base/applications/cmdutils/reg/En.rc (added)
+++ trunk/reactos/base/applications/cmdutils/reg/En.rc [iso-8859-1] Sat Oct 24 15:32:45
2009
@@ -1,0 +1,37 @@
+/*
+ * REG.EXE - Wine-compatible reg program.
+ * English language support
+ *
+ * Copyright 2008 Andrew Riedi
+ *
+ * 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 "reg.h"
+
+LANGUAGE LANG_ENGLISH, SUBLANG_DEFAULT
+
+STRINGTABLE
+{
+ STRING_USAGE, "The syntax of this command is:\n\nREG [ ADD | DELETE | QUERY
]\nREG command /?\n"
+ STRING_ADD_USAGE, "REG ADD key_name [/v value_name | /ve] [/t type] [/s
separator] [/d data] [/f]\n"
+ STRING_DELETE_USAGE, "REG DELETE key_name [/v value_name | /ve | /va]
[/f]\n"
+ STRING_QUERY_USAGE, "REG QUERY key_name [/v value_name | /ve] [/s]\n"
+ STRING_SUCCESS, "The operation completed successfully\n"
+ STRING_INVALID_KEY, "Error: Invalid key name\n"
+ STRING_INVALID_CMDLINE, "Error: Invalid command line parameters\n"
+ STRING_NO_REMOTE, "Error: Unable to add keys to remote machine\n"
+ STRING_CANNOT_FIND, "Error: The system was unable to find the specified registry
key or value\n"
+}
Propchange: trunk/reactos/base/applications/cmdutils/reg/En.rc
------------------------------------------------------------------------------
svn:eol-style = native
Added: trunk/reactos/base/applications/cmdutils/reg/Fr.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/cmdutils…
==============================================================================
--- trunk/reactos/base/applications/cmdutils/reg/Fr.rc (added)
+++ trunk/reactos/base/applications/cmdutils/reg/Fr.rc [iso-8859-1] Sat Oct 24 15:32:45
2009
@@ -1,0 +1,41 @@
+/*
+ * REG.EXE - Wine-compatible reg program.
+ * French language support
+ *
+ * Copyright 2008 Francois Gouget
+ * Copyright 2009 Jonathan Ernst
+ *
+ * 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 "reg.h"
+
+/* UTF-8 */
+#pragma code_page(65001)
+
+LANGUAGE LANG_FRENCH, SUBLANG_NEUTRAL
+
+STRINGTABLE
+{
+ STRING_USAGE, "La syntaxe de cette commande est :\n\nREG [ ADD | DELETE | QUERY
]\nREG commande /?\n"
+ STRING_ADD_USAGE, "REG ADD nom_de_clé [/v nom_de_valeur | /ve] [/t type] [/s
séparateur] [/d données] [/f]\n"
+ STRING_DELETE_USAGE, "REG DELETE nom_de_clé [/v nom_de_valeur | /ve | /va]
[/f]\n"
+ STRING_QUERY_USAGE, "REG QUERY nom_de_clé [/v nom_de_valeur | /ve]
[/s]\n"
+ STRING_SUCCESS, "L'opération s'est terminée avec succès\n"
+ STRING_INVALID_KEY, "Erreur : nom de clé non valable\n"
+ STRING_INVALID_CMDLINE, "Erreur : paramètre de ligne de commande non
valable\n"
+ STRING_NO_REMOTE, "Erreur : impossible d'ajouter des clés à une machine
distante\n"
+ STRING_CANNOT_FIND, "Erreur : le système n'a pas pu trouver la clé ou la
valeur de registre spécifiée\n"
+}
Propchange: trunk/reactos/base/applications/cmdutils/reg/Fr.rc
------------------------------------------------------------------------------
svn:eol-style = native
Added: trunk/reactos/base/applications/cmdutils/reg/Ja.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/cmdutils…
==============================================================================
--- trunk/reactos/base/applications/cmdutils/reg/Ja.rc (added)
+++ trunk/reactos/base/applications/cmdutils/reg/Ja.rc [iso-8859-1] Sat Oct 24 15:32:45
2009
@@ -1,0 +1,40 @@
+/*
+ * REG.EXE - Wine-compatible reg program.
+ * Japanese language support
+ *
+ * Copyright 2008 Andrew Riedi
+ *
+ * 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 "reg.h"
+
+/* UTF-8 */
+#pragma code_page(65001)
+
+LANGUAGE LANG_JAPANESE, SUBLANG_DEFAULT
+
+STRINGTABLE
+{
+ STRING_USAGE, "ãã®ã³ãã³ãã®æ§æã¯æ¬¡ã®ã¨ããã§ã:\n\nREG [ ADD
| DELETE | QUERY ]\nREG ã³ãã³ã /?\n"
+ STRING_ADD_USAGE, "REG ADD ãã¼å [/v å¤å | /ve] [/t type] [/s
ã»ãã¬ã¼ã¿] [/d ãã¼ã¿] [/f]\n"
+ STRING_DELETE_USAGE, "REG DELETE ãã¼å [/v å¤å | /ve | /va] [/f]\n"
+ STRING_QUERY_USAGE, "REG QUERY ãã¼å [/v å¤å | /ve] [/s]\n"
+ STRING_SUCCESS, "æä½ã¯æ£å¸¸ã«å®äºãã¾ãã\n"
+ STRING_INVALID_KEY, "ã¨ã©ã¼: ãã¼åãç¡å¹ã§ã\n"
+ STRING_INVALID_CMDLINE, "ã¨ã©ã¼: ã³ãã³ã
ã©ã¤ã³å¼æ°ãç¡å¹ã§ã\n"
+ STRING_NO_REMOTE, "ã¨ã©ã¼: ãªã¢ã¼ã
ãã·ã³ã«ãã¼ã追å ã§ãã¾ããã§ãã\n"
+ STRING_CANNOT_FIND, "ã¨ã©ã¼:
ã·ã¹ãã ã¯æå®ããããã¼ã¾ãã¯å¤ãè¦ã¤ãããã¾ããã§ãã\n"
+}
Propchange: trunk/reactos/base/applications/cmdutils/reg/Ja.rc
------------------------------------------------------------------------------
svn:eol-style = native
Added: trunk/reactos/base/applications/cmdutils/reg/Ko.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/cmdutils…
==============================================================================
--- trunk/reactos/base/applications/cmdutils/reg/Ko.rc (added)
+++ trunk/reactos/base/applications/cmdutils/reg/Ko.rc [iso-8859-1] Sat Oct 24 15:32:45
2009
@@ -1,0 +1,38 @@
+/*
+ * REG.EXE - Wine-compatible reg program.
+ * Korean language support
+ *
+ * Copyright 2008 Andrew Riedi
+ * Copyright 2008 YunSong Hwang
+ *
+ * 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 "reg.h"
+
+LANGUAGE LANG_KOREAN, SUBLANG_DEFAULT
+
+STRINGTABLE
+{
+ STRING_USAGE, "¸í·É¾î Çü½Ä:\n\nREG [ ADD | DELETE | QUERY ]\nREG ¸í·É¾î
/?\n"
+ STRING_ADD_USAGE, "REG ADD °ª [/v °ª | /ve] [/t Çü½Ä] [/s ºÐ¸®±âÈ£] [/d µ¥ÀÌŸ]
[/f]\n"
+ STRING_DELETE_USAGE, "REG DELETE Å° À̸§ [/v °ª | /ve | /va] [/f]\n"
+ STRING_QUERY_USAGE, "REG QUERY Å° À̸§ [/v °ª| /ve] [/s]\n"
+ STRING_SUCCESS, "ÀÛ¾÷ÀÌ ¼º°øÀûÀ¸·Î ³¡³µ½À´Ï´Ù\n"
+ STRING_INVALID_KEY, "¿¡·¯: ¿Ã¹Ù¸£Áö ¾ÊÀº Å° À̸§\n"
+ STRING_INVALID_CMDLINE, "¿¡·¯:¿Ã¹Ù¸£Áö ¾ÊÀº ¸í·É¶óÀÎ ¸Å°³º¯¼ö\n"
+ STRING_NO_REMOTE, "¿¡·¯: ¿ø°Ý ¸Ó½Å¿¡ Å°¸¦ ´õÇÏ´Â °ÍÀº °¡´ÉÇÏÁö
¾Ê½À´Ï´Ù\n"
+ STRING_CANNOT_FIND, "¿¡·¯: ÀÌ ½Ã½ºÅÛ¿¡¼ ÁöÁ¤µÈ ·¹Áö½ºÆ®¸® Å°³ª °ªÀ» ãÀ»¼ö
¾ø½À´Ï´Ù\n"
+}
Propchange: trunk/reactos/base/applications/cmdutils/reg/Ko.rc
------------------------------------------------------------------------------
svn:eol-style = native
Added: trunk/reactos/base/applications/cmdutils/reg/Lt.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/cmdutils…
==============================================================================
--- trunk/reactos/base/applications/cmdutils/reg/Lt.rc (added)
+++ trunk/reactos/base/applications/cmdutils/reg/Lt.rc [iso-8859-1] Sat Oct 24 15:32:45
2009
@@ -1,0 +1,40 @@
+/*
+ * REG.EXE - Wine-compatible reg program.
+ * Lithuanian language support
+ *
+ * Copyright 2009 Aurimas Fišeras <aurimas(a)gmail.com>
+ *
+ * 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 "reg.h"
+
+/* UTF-8 */
+#pragma code_page(65001)
+
+LANGUAGE LANG_LITHUANIAN, SUBLANG_NEUTRAL
+
+STRINGTABLE
+{
+ STRING_USAGE, "Å ios komandos sintaksÄ yra:\n\nREG [ ADD | DELETE | QUERY
]\nREG komanda /?\n"
+ STRING_ADD_USAGE, "REG ADD rakto_vardas [/v reikÅ¡mÄs_vardas | /ve] [/t tipas]
[/s skirtukas] [/d duomenys] [/f]\n"
+ STRING_DELETE_USAGE, "REG DELETE rakto_vardas [/v reikÅ¡mÄs_vardas | /ve | /va]
[/f]\n"
+ STRING_QUERY_USAGE, "REG QUERY rakto_vardas [/v reikÅ¡mÄs_vardas | /ve]
[/s]\n"
+ STRING_SUCCESS, "Operacija sÄkmingai įvykdyta\n"
+ STRING_INVALID_KEY, "Klaida: Netinkamas rakto vardas\n"
+ STRING_INVALID_CMDLINE, "Klaida: Netinkami komandos eilutÄs parametrai\n"
+ STRING_NO_REMOTE, "Klaida: Negalima pridÄti raktų nuotoliniame
kompiuteryje\n"
+ STRING_CANNOT_FIND, "Klaida: Sistemai nepavyko rasti nurodyto registro rakto ar
reikÅ¡mÄs\n"
+}
Propchange: trunk/reactos/base/applications/cmdutils/reg/Lt.rc
------------------------------------------------------------------------------
svn:eol-style = native
Added: trunk/reactos/base/applications/cmdutils/reg/Nl.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/cmdutils…
==============================================================================
--- trunk/reactos/base/applications/cmdutils/reg/Nl.rc (added)
+++ trunk/reactos/base/applications/cmdutils/reg/Nl.rc [iso-8859-1] Sat Oct 24 15:32:45
2009
@@ -1,0 +1,37 @@
+/*
+ * REG.EXE - Wine-compatible reg program.
+ * Dutch language support
+ *
+ * Copyright 2008 Frans Kool
+ *
+ * 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 "reg.h"
+
+LANGUAGE LANG_DUTCH, SUBLANG_NEUTRAL
+
+STRINGTABLE
+{
+ STRING_USAGE, "Gebruik van dit commando is:\n\nREG [ ADD | DELETE | QUERY ]\nREG
commando /?\n"
+ STRING_ADD_USAGE, "REG ADD sleutel_naam [/v waarde_naam | /ve] [/t type] [/s
scheidingsteken] [/d data] [/f]\n"
+ STRING_DELETE_USAGE, "REG DELETE sleutel_naam [/v waarde_naam | /ve | /va]
[/f]\n"
+ STRING_QUERY_USAGE, "REG QUERY sleutel_naam [/v waarde_naam | /ve] [/s]\n"
+ STRING_SUCCESS, "De bewerking is succesvol voltooid\n"
+ STRING_INVALID_KEY, "Fout: Foutieve sleutel naam\n"
+ STRING_INVALID_CMDLINE, "Fout: Foutieve commando regel parameters\n"
+ STRING_NO_REMOTE, "Fout: Sleutels konden niet toegevoegd worden aan de remote
machine\n"
+ STRING_CANNOT_FIND, "Fout: Het systeem kon de gespecificeerde registry sleutel
of waarde niet vinden\n"
+}
Propchange: trunk/reactos/base/applications/cmdutils/reg/Nl.rc
------------------------------------------------------------------------------
svn:eol-style = native
Added: trunk/reactos/base/applications/cmdutils/reg/No.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/cmdutils…
==============================================================================
--- trunk/reactos/base/applications/cmdutils/reg/No.rc (added)
+++ trunk/reactos/base/applications/cmdutils/reg/No.rc [iso-8859-1] Sat Oct 24 15:32:45
2009
@@ -1,0 +1,39 @@
+/*
+ * REG.EXE - Wine-compatible reg program.
+ * Norwegian (Bokmål) language support
+ *
+ * Copyright 2008-2009 Alexander N. Sørnes <alex(a)thehandofagony.com>
+ *
+ * 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 "reg.h"
+
+#pragma code_page(65001)
+
+LANGUAGE LANG_NORWEGIAN, SUBLANG_NORWEGIAN_BOKMAL
+
+STRINGTABLE
+{
+ STRING_USAGE, "Programmer kjøres som følger:\n\nREG [ ADD | DELETE | QUERY
]\nREG kommando /?\n"
+ STRING_ADD_USAGE, "REG ADD nøkkelnavn [/v verdi | /ve] [/t type] [/s separator]
[/d data] [/f]\n"
+ STRING_DELETE_USAGE, "REG DELETE nøkkelnavn [/v verdi | /ve | /va]
[/f]\n"
+ STRING_QUERY_USAGE, "REG QUERY nøkkelnavn [/v verdi | /ve] [/s]\n"
+ STRING_SUCCESS, "Operasjonen ble utført\n"
+ STRING_INVALID_KEY, "Feil: Ugyldig nøkkelnavn\n"
+ STRING_INVALID_CMDLINE, "Feil: Ugyldige parametere på kommandolinjen\n"
+ STRING_NO_REMOTE, "Feil: Kan ikke legge til nøkler på ekstern maskin\n"
+ STRING_CANNOT_FIND, "Feil: Systemet klarte ikke finne den angitte
registernøkkelen eller -verdien\n"
+}
Propchange: trunk/reactos/base/applications/cmdutils/reg/No.rc
------------------------------------------------------------------------------
svn:eol-style = native
Added: trunk/reactos/base/applications/cmdutils/reg/Pl.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/cmdutils…
==============================================================================
--- trunk/reactos/base/applications/cmdutils/reg/Pl.rc (added)
+++ trunk/reactos/base/applications/cmdutils/reg/Pl.rc [iso-8859-1] Sat Oct 24 15:32:45
2009
@@ -1,0 +1,33 @@
+/*
+ * REG.EXE - Wine-compatible reg program.
+ * Polish language support
+ *
+ * Copyright 2008 Andrew Riedi
+ * Copyright 2008 Mikolaj Zalewski
+ *
+ * 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 "reg.h"
+
+LANGUAGE LANG_POLISH, SUBLANG_DEFAULT
+
+STRINGTABLE
+{
+ STRING_USAGE, "Sk³adnia tego polecenia:\n\nREG [ ADD | DELETE | QUERY ]\nREG
polecenie /?\n"
+ STRING_ADD_USAGE, "REG ADD nazwa_klucza [/v nazwa_wartoci | /ve] [/t typ] [/s
separator] [/d dane] [/f]\n"
+ STRING_DELETE_USAGE, "REG DELETE nazwa_klucza [/v nazwa_wartoci | /ve | /va]
[/f]\n"
+ STRING_QUERY_USAGE, "REG QUERY nazwa_klucza [/v nazwa_wartoci | /ve]
[/s]\n"
+}
Propchange: trunk/reactos/base/applications/cmdutils/reg/Pl.rc
------------------------------------------------------------------------------
svn:eol-style = native
Added: trunk/reactos/base/applications/cmdutils/reg/Pt.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/cmdutils…
==============================================================================
--- trunk/reactos/base/applications/cmdutils/reg/Pt.rc (added)
+++ trunk/reactos/base/applications/cmdutils/reg/Pt.rc [iso-8859-1] Sat Oct 24 15:32:45
2009
@@ -1,0 +1,40 @@
+/*
+ * REG.EXE - Wine-compatible reg program.
+ * Portuguese language support
+ *
+ * Copyright 2008 Andrew Riedi
+ * Copyright 2008 Ricardo Filipe
+ *
+ * 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 "reg.h"
+
+#pragma code_page(65001)
+
+LANGUAGE LANG_PORTUGUESE, SUBLANG_PORTUGUESE
+
+STRINGTABLE
+{
+ STRING_USAGE, "A sintaxe deste comando é:\n\nREG [ ADD | DELETE | QUERY ]\nREG
comando /?\n"
+ STRING_ADD_USAGE, "REG ADD nome_chave [/v nome_valor | /ve] [/t tipo] [/s
separador] [/d dados] [/f]\n"
+ STRING_DELETE_USAGE, "REG DELETE nome_chave [/v nome_valor | /ve | /va]
[/f]\n"
+ STRING_QUERY_USAGE, "REG QUERY nome_chave [/v nome_valor | /ve] [/s]\n"
+ STRING_SUCCESS, "A operação foi completada com sucesso\n"
+ STRING_INVALID_KEY, "Erro: Nome de chave inválido\n"
+ STRING_INVALID_CMDLINE, "Erro: Parâmetros da linha de comandos
inválidos\n"
+ STRING_NO_REMOTE, "Erro: Incapaz de adicionar chaves à máquina remota\n"
+ STRING_CANNOT_FIND, "Erro: O sistema foi incapaz de encontrar a chave de registo
ou valor especificado\n"
+}
Propchange: trunk/reactos/base/applications/cmdutils/reg/Pt.rc
------------------------------------------------------------------------------
svn:eol-style = native
Added: trunk/reactos/base/applications/cmdutils/reg/Ru.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/cmdutils…
==============================================================================
--- trunk/reactos/base/applications/cmdutils/reg/Ru.rc (added)
+++ trunk/reactos/base/applications/cmdutils/reg/Ru.rc [iso-8859-1] Sat Oct 24 15:32:45
2009
@@ -1,0 +1,34 @@
+/*
+ * Russian language support
+ *
+ * Copyright 2008 Vitaliy Margolen
+ *
+ * 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 "reg.h"
+
+/* UTF-8 */
+#pragma code_page(65001)
+
+LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT
+
+STRINGTABLE
+{
+ STRING_USAGE, "ÐÑполÑзование пÑогÑаммÑ:\n\nREG [ ADD |
DELETE | QUERY ]\nREG <команда> /?\n"
+ STRING_ADD_USAGE, "REG ADD <клÑÑ> [/v <паÑамеÑÑ> | /ve]
[/t <Ñип>] [/s <ÑазделиÑелÑ>] [/d даннÑе] [/f]\n"
+ STRING_DELETE_USAGE, "REG DELETE <клÑÑ> [/v <паÑамеÑÑ> |
/ve | /va] [/f]\n"
+ STRING_QUERY_USAGE, "REG QUERY <клÑÑ> [/v <паÑамеÑÑ> |
/ve] [/s]\n"
+}
Propchange: trunk/reactos/base/applications/cmdutils/reg/Ru.rc
------------------------------------------------------------------------------
svn:eol-style = native
Added: trunk/reactos/base/applications/cmdutils/reg/Si.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/cmdutils…
==============================================================================
--- trunk/reactos/base/applications/cmdutils/reg/Si.rc (added)
+++ trunk/reactos/base/applications/cmdutils/reg/Si.rc [iso-8859-1] Sat Oct 24 15:32:45
2009
@@ -1,0 +1,39 @@
+/*
+ * REG.EXE - Wine-compatible reg program.
+ * Slovenian language support
+ *
+ * Copyright 2008 Rok Mandeljc
+ *
+ * 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 "reg.h"
+
+#pragma code_page(65001)
+
+LANGUAGE LANG_SLOVENIAN, SUBLANG_DEFAULT
+
+STRINGTABLE
+{
+ STRING_USAGE, "Sintaksa ukaza:\n\nREG [ ADD | DELETE | QUERY ]\nREG ukaz
/?\n"
+ STRING_ADD_USAGE, "REG ADD ime_kljuÄa [/v ime_vrednosti | /ve] [/t vrsta] [/s
loÄilo] [/d podatki] [/f]\n"
+ STRING_DELETE_USAGE, "REG DELETE ime_kljuÄa [/v ime_vrednosti | /ve | /va]
[/f]\n"
+ STRING_QUERY_USAGE, "REG QUERY ime_kljuÄa [/v ime_vrednosti | /ve]
[/s]\n"
+ STRING_SUCCESS, "Operacija se je uspešno izvedla\n"
+ STRING_INVALID_KEY, "Napaka: NapaÄno ime kljuÄa\n"
+ STRING_INVALID_CMDLINE, "Napaka: NapaÄen parameter v ukazni vrstici\n"
+ STRING_NO_REMOTE, "Napaka: Na morem dodati kljuÄa na oddaljen
raÄunalnik\n"
+ STRING_CANNOT_FIND, "Napaka: Sistem ni naÅ¡el zahtevanega kljuÄa ali
vrednosti\n"
+}
Propchange: trunk/reactos/base/applications/cmdutils/reg/Si.rc
------------------------------------------------------------------------------
svn:eol-style = native
Added: trunk/reactos/base/applications/cmdutils/reg/reg.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/cmdutils…
==============================================================================
--- trunk/reactos/base/applications/cmdutils/reg/reg.c (added)
+++ trunk/reactos/base/applications/cmdutils/reg/reg.c [iso-8859-1] Sat Oct 24 15:32:45
2009
@@ -1,0 +1,471 @@
+/*
+ * Copyright 2008 Andrew Riedi
+ *
+ * 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 <windows.h>
+#include <wine/unicode.h>
+#include "reg.h"
+
+static int reg_printfW(const WCHAR *msg, ...)
+{
+ va_list va_args;
+ int wlen;
+ DWORD count, ret;
+ WCHAR msg_buffer[8192];
+
+ va_start(va_args, msg);
+ vsprintfW(msg_buffer, msg, va_args);
+ va_end(va_args);
+
+ wlen = lstrlenW(msg_buffer);
+ ret = WriteConsoleW(GetStdHandle(STD_OUTPUT_HANDLE), msg_buffer, wlen, &count,
NULL);
+ if (!ret)
+ {
+ DWORD len;
+ char *msgA;
+
+ len = WideCharToMultiByte(GetConsoleOutputCP(), 0, msg_buffer, wlen,
+ NULL, 0, NULL, NULL);
+ msgA = HeapAlloc(GetProcessHeap(), 0, len * sizeof(char));
+ if (!msgA)
+ return 0;
+
+ WideCharToMultiByte(GetConsoleOutputCP(), 0, msg_buffer, wlen, msgA, len,
+ NULL, NULL);
+ WriteFile(GetStdHandle(STD_OUTPUT_HANDLE), msgA, len, &count, FALSE);
+ HeapFree(GetProcessHeap(), 0, msgA);
+ }
+
+ return count;
+}
+
+static int reg_message(int msg)
+{
+ static const WCHAR formatW[] = {'%','s',0};
+ WCHAR msg_buffer[8192];
+
+ LoadStringW(GetModuleHandleW(NULL), msg, msg_buffer,
+ sizeof(msg_buffer)/sizeof(WCHAR));
+ return reg_printfW(formatW, msg_buffer);
+}
+
+static HKEY get_rootkey(LPWSTR key)
+{
+ static const WCHAR szHKLM[] = {'H','K','L','M',0};
+ static const WCHAR szHKCU[] = {'H','K','C','U',0};
+ static const WCHAR szHKCR[] = {'H','K','C','R',0};
+ static const WCHAR szHKU[] = {'H','K','U',0};
+ static const WCHAR szHKCC[] = {'H','K','C','C',0};
+
+ if (CompareStringW(CP_ACP,NORM_IGNORECASE,key,4,szHKLM,4)==2)
+ return HKEY_LOCAL_MACHINE;
+ else if (CompareStringW(CP_ACP,NORM_IGNORECASE,key,4,szHKCU,4)==2)
+ return HKEY_CURRENT_USER;
+ else if (CompareStringW(CP_ACP,NORM_IGNORECASE,key,4,szHKCR,4)==2)
+ return HKEY_CLASSES_ROOT;
+ else if (CompareStringW(CP_ACP,NORM_IGNORECASE,key,3,szHKU,3)==2)
+ return HKEY_USERS;
+ else if (CompareStringW(CP_ACP,NORM_IGNORECASE,key,4,szHKCC,4)==2)
+ return HKEY_CURRENT_CONFIG;
+ else return NULL;
+}
+
+static DWORD get_regtype(LPWSTR type)
+{
+ static const WCHAR szREG_SZ[] =
{'R','E','G','_','S','Z',0};
+ static const WCHAR szREG_MULTI_SZ[] =
{'R','E','G','_','M','U','L','T','I','_','S','Z',0};
+ static const WCHAR szREG_DWORD_BIG_ENDIAN[] =
{'R','E','G','_','D','W','O','R','D','_','B','I','G','_','E','N','D','I','A','N',0};
+ static const WCHAR szREG_DWORD[] =
{'R','E','G','_','D','W','O','R','D',0};
+ static const WCHAR szREG_BINARY[] =
{'R','E','G','_','B','I','N','A','R','Y',0};
+ static const WCHAR szREG_DWORD_LITTLE_ENDIAN[] =
{'R','E','G','_','D','W','O','R','D','_','L','I','T','T','L','E','_','E','N','D','I','A','N',0};
+ static const WCHAR szREG_NONE[] =
{'R','E','G','_','N','O','N','E',0};
+ static const WCHAR szREG_EXPAND_SZ[] =
{'R','E','G','_','E','X','P','A','N','D','_','S','Z',0};
+
+ if (!type)
+ return REG_SZ;
+
+ if (lstrcmpiW(type,szREG_SZ)==0) return REG_SZ;
+ if (lstrcmpiW(type,szREG_DWORD)==0) return REG_DWORD;
+ if (lstrcmpiW(type,szREG_MULTI_SZ)==0) return REG_MULTI_SZ;
+ if (lstrcmpiW(type,szREG_EXPAND_SZ)==0) return REG_EXPAND_SZ;
+ if (lstrcmpiW(type,szREG_DWORD_BIG_ENDIAN)==0) return REG_DWORD_BIG_ENDIAN;
+ if (lstrcmpiW(type,szREG_DWORD_LITTLE_ENDIAN)==0) return REG_DWORD_LITTLE_ENDIAN;
+ if (lstrcmpiW(type,szREG_BINARY)==0) return REG_BINARY;
+ if (lstrcmpiW(type,szREG_NONE)==0) return REG_NONE;
+
+ return -1;
+}
+
+static LPBYTE get_regdata(LPWSTR data, DWORD reg_type, WCHAR separator, DWORD
*reg_count)
+{
+ LPBYTE out_data = NULL;
+ *reg_count = 0;
+
+ switch (reg_type)
+ {
+ case REG_SZ:
+ {
+ *reg_count = (lstrlenW(data) + 1) * sizeof(WCHAR);
+ out_data = HeapAlloc(GetProcessHeap(),0,*reg_count);
+ lstrcpyW((LPWSTR)out_data,data);
+ break;
+ }
+ default:
+ {
+ static const WCHAR unhandled[] =
{'U','n','h','a','n','d','l','e','d','
','T','y','p','e','
','0','x','%','x',' ','
','d','a','t','a','
','%','s','\n',0};
+ reg_printfW(unhandled, reg_type,data);
+ }
+ }
+
+ return out_data;
+}
+
+static int reg_add(WCHAR *key_name, WCHAR *value_name, BOOL value_empty,
+ WCHAR *type, WCHAR separator, WCHAR *data, BOOL force)
+{
+ static const WCHAR stubW[] = {'A','D','D','
','-',' ','%','s',
+ ' ','%','s',' ','%','d','
','%','s',' ','%','s','
','%','d','\n',0};
+ LPWSTR p;
+ HKEY root,subkey;
+
+ reg_printfW(stubW, key_name, value_name, value_empty, type, data, force);
+
+ if (key_name[0]=='\\' && key_name[1]=='\\')
+ {
+ reg_message(STRING_NO_REMOTE);
+ return 1;
+ }
+
+ p = strchrW(key_name,'\\');
+ if (!p)
+ {
+ reg_message(STRING_INVALID_KEY);
+ return 1;
+ }
+ p++;
+
+ root = get_rootkey(key_name);
+ if (!root)
+ {
+ reg_message(STRING_INVALID_KEY);
+ return 1;
+ }
+
+ if(RegCreateKeyW(root,p,&subkey)!=ERROR_SUCCESS)
+ {
+ reg_message(STRING_INVALID_KEY);
+ return 1;
+ }
+
+ if (value_name || data)
+ {
+ DWORD reg_type;
+ DWORD reg_count = 0;
+ BYTE* reg_data = NULL;
+
+ if (!force)
+ {
+ if (RegQueryValueW(subkey,value_name,NULL,NULL)==ERROR_SUCCESS)
+ {
+ /* FIXME: Prompt for overwrite */
+ }
+ }
+
+ reg_type = get_regtype(type);
+ if (reg_type == -1)
+ {
+ RegCloseKey(subkey);
+ reg_message(STRING_INVALID_CMDLINE);
+ return 1;
+ }
+
+ if (data)
+ reg_data = get_regdata(data,reg_type,separator,®_count);
+
+ RegSetValueExW(subkey,value_name,0,reg_type,reg_data,reg_count);
+ HeapFree(GetProcessHeap(),0,reg_data);
+ }
+
+ RegCloseKey(subkey);
+ reg_message(STRING_SUCCESS);
+
+ return 0;
+}
+
+static int reg_delete(WCHAR *key_name, WCHAR *value_name, BOOL value_empty,
+ BOOL value_all, BOOL force)
+{
+ LPWSTR p;
+ HKEY root,subkey;
+
+ static const WCHAR stubW[] =
{'D','E','L','E','T','E',
+ ' ','-',' ','%','s','
','%','s',' ','%','d','
','%','d',' ','%','d','\n'
+ ,0};
+ reg_printfW(stubW, key_name, value_name, value_empty, value_all, force);
+
+ if (key_name[0]=='\\' && key_name[1]=='\\')
+ {
+ reg_message(STRING_NO_REMOTE);
+ return 1;
+ }
+
+ p = strchrW(key_name,'\\');
+ if (!p)
+ {
+ reg_message(STRING_INVALID_KEY);
+ return 1;
+ }
+ p++;
+
+ root = get_rootkey(key_name);
+ if (!root)
+ {
+ reg_message(STRING_INVALID_KEY);
+ return 1;
+ }
+
+ if (value_name && value_empty)
+ {
+ reg_message(STRING_INVALID_CMDLINE);
+ return 1;
+ }
+
+ if (value_empty && value_all)
+ {
+ reg_message(STRING_INVALID_CMDLINE);
+ return 1;
+ }
+
+ if (!force)
+ {
+ /* FIXME: Prompt for delete */
+ }
+
+ if (!value_name)
+ {
+ if (RegDeleteTreeW(root,p)!=ERROR_SUCCESS)
+ {
+ reg_message(STRING_CANNOT_FIND);
+ return 1;
+ }
+ reg_message(STRING_SUCCESS);
+ return 0;
+ }
+
+ if(RegOpenKeyW(root,p,&subkey)!=ERROR_SUCCESS)
+ {
+ reg_message(STRING_CANNOT_FIND);
+ return 1;
+ }
+
+ if (value_all)
+ {
+ LPWSTR szValue;
+ DWORD maxValue;
+ DWORD count;
+ LONG rc;
+
+ if (value_name)
+ {
+ RegCloseKey(subkey);
+ reg_message(STRING_INVALID_CMDLINE);
+ return 1;
+ }
+
+ rc = RegQueryInfoKeyW(subkey, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+ &maxValue, NULL, NULL, NULL);
+ if (rc != ERROR_SUCCESS)
+ {
+ /* FIXME: failure */
+ RegCloseKey(subkey);
+ return 1;
+ }
+ maxValue++;
+ szValue = HeapAlloc(GetProcessHeap(),0,maxValue*sizeof(WCHAR));
+
+ while (1)
+ {
+ count = maxValue;
+ rc = RegEnumValueW(subkey, 0, value_name, &count, NULL, NULL, NULL,
NULL);
+ if (rc == ERROR_SUCCESS)
+ {
+ rc = RegDeleteValueW(subkey,value_name);
+ if (rc != ERROR_SUCCESS)
+ break;
+ }
+ else break;
+ }
+ if (rc != ERROR_SUCCESS)
+ {
+ /* FIXME delete failed */
+ }
+ }
+ else if (value_name)
+ {
+ if (RegDeleteValueW(subkey,value_name) != ERROR_SUCCESS)
+ {
+ RegCloseKey(subkey);
+ reg_message(STRING_CANNOT_FIND);
+ return 1;
+ }
+ }
+ else if (value_empty)
+ {
+ RegSetValueExW(subkey,NULL,0,REG_SZ,NULL,0);
+ }
+
+ RegCloseKey(subkey);
+ reg_message(STRING_SUCCESS);
+ return 0;
+}
+
+static int reg_query(WCHAR *key_name, WCHAR *value_name, BOOL value_empty,
+ BOOL subkey)
+{
+ static const WCHAR stubW[] = {'S','T','U','B','
','Q','U','E','R','Y',' ',
+ '-',' ','%','s','
','%','s',' ','%','d','
','%','d','\n',0};
+ reg_printfW(stubW, key_name, value_name, value_empty, subkey);
+
+ return 1;
+}
+
+int wmain(int argc, WCHAR *argvW[])
+{
+ int i;
+
+ static const WCHAR addW[] = {'a','d','d',0};
+ static const WCHAR deleteW[] =
{'d','e','l','e','t','e',0};
+ static const WCHAR queryW[] =
{'q','u','e','r','y',0};
+ static const WCHAR slashDW[] = {'/','d',0};
+ static const WCHAR slashFW[] = {'/','f',0};
+ static const WCHAR slashHW[] = {'/','h',0};
+ static const WCHAR slashSW[] = {'/','s',0};
+ static const WCHAR slashTW[] = {'/','t',0};
+ static const WCHAR slashVW[] = {'/','v',0};
+ static const WCHAR slashVAW[] = {'/','v','a',0};
+ static const WCHAR slashVEW[] = {'/','v','e',0};
+ static const WCHAR slashHelpW[] = {'/','?',0};
+
+ if (argc < 2 || !lstrcmpW(argvW[1], slashHelpW)
+ || !lstrcmpiW(argvW[1], slashHW))
+ {
+ reg_message(STRING_USAGE);
+ return 0;
+ }
+
+ if (!lstrcmpiW(argvW[1], addW))
+ {
+ WCHAR *key_name, *value_name = NULL, *type = NULL, separator = '\0',
*data = NULL;
+ BOOL value_empty = FALSE, force = FALSE;
+
+ if (argc < 3)
+ {
+ reg_message(STRING_INVALID_CMDLINE);
+ return 1;
+ }
+ else if (argc == 3 && (!lstrcmpW(argvW[2], slashHelpW) ||
+ !lstrcmpiW(argvW[2], slashHW)))
+ {
+ reg_message(STRING_ADD_USAGE);
+ return 0;
+ }
+
+ key_name = argvW[2];
+ for (i = 1; i < argc; i++)
+ {
+ if (!lstrcmpiW(argvW[i], slashVW))
+ value_name = argvW[++i];
+ else if (!lstrcmpiW(argvW[i], slashVEW))
+ value_empty = TRUE;
+ else if (!lstrcmpiW(argvW[i], slashTW))
+ type = argvW[++i];
+ else if (!lstrcmpiW(argvW[i], slashSW))
+ separator = argvW[++i][0];
+ else if (!lstrcmpiW(argvW[i], slashDW))
+ data = argvW[++i];
+ else if (!lstrcmpiW(argvW[i], slashFW))
+ force = TRUE;
+ }
+ return reg_add(key_name, value_name, value_empty, type, separator,
+ data, force);
+ }
+ else if (!lstrcmpiW(argvW[1], deleteW))
+ {
+ WCHAR *key_name, *value_name = NULL;
+ BOOL value_empty = FALSE, value_all = FALSE, force = FALSE;
+
+ if (argc < 3)
+ {
+ reg_message(STRING_INVALID_CMDLINE);
+ return 1;
+ }
+ else if (argc == 3 && (!lstrcmpW(argvW[2], slashHelpW) ||
+ !lstrcmpiW(argvW[2], slashHW)))
+ {
+ reg_message(STRING_DELETE_USAGE);
+ return 0;
+ }
+
+ key_name = argvW[2];
+ for (i = 1; i < argc; i++)
+ {
+ if (!lstrcmpiW(argvW[i], slashVW))
+ value_name = argvW[++i];
+ else if (!lstrcmpiW(argvW[i], slashVEW))
+ value_empty = TRUE;
+ else if (!lstrcmpiW(argvW[i], slashVAW))
+ value_all = TRUE;
+ else if (!lstrcmpiW(argvW[i], slashFW))
+ force = TRUE;
+ }
+ return reg_delete(key_name, value_name, value_empty, value_all, force);
+ }
+ else if (!lstrcmpiW(argvW[1], queryW))
+ {
+ WCHAR *key_name, *value_name = NULL;
+ BOOL value_empty = FALSE, subkey = FALSE;
+
+ if (argc < 3)
+ {
+ reg_message(STRING_INVALID_CMDLINE);
+ return 1;
+ }
+ else if (argc == 3 && (!lstrcmpW(argvW[2], slashHelpW) ||
+ !lstrcmpiW(argvW[2], slashHW)))
+ {
+ reg_message(STRING_QUERY_USAGE);
+ return 0;
+ }
+
+ key_name = argvW[2];
+ for (i = 1; i < argc; i++)
+ {
+ if (!lstrcmpiW(argvW[i], slashVW))
+ value_name = argvW[++i];
+ else if (!lstrcmpiW(argvW[i], slashVEW))
+ value_empty = TRUE;
+ else if (!lstrcmpiW(argvW[i], slashSW))
+ subkey = TRUE;
+ }
+ return reg_query(key_name, value_name, value_empty, subkey);
+ }
+ else
+ {
+ reg_message(STRING_INVALID_CMDLINE);
+ return 1;
+ }
+}
Propchange: trunk/reactos/base/applications/cmdutils/reg/reg.c
------------------------------------------------------------------------------
svn:eol-style = native
Added: trunk/reactos/base/applications/cmdutils/reg/reg.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/cmdutils…
==============================================================================
--- trunk/reactos/base/applications/cmdutils/reg/reg.h (added)
+++ trunk/reactos/base/applications/cmdutils/reg/reg.h [iso-8859-1] Sat Oct 24 15:32:45
2009
@@ -1,0 +1,32 @@
+/*
+ * REG.EXE - Wine-compatible reg program.
+ *
+ * Copyright 2008 Andrew Riedi
+ *
+ * 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>
+
+/* Translation IDs. */
+#define STRING_USAGE 101
+#define STRING_ADD_USAGE 102
+#define STRING_DELETE_USAGE 103
+#define STRING_QUERY_USAGE 104
+#define STRING_SUCCESS 105
+#define STRING_INVALID_KEY 106
+#define STRING_INVALID_CMDLINE 107
+#define STRING_NO_REMOTE 108
+#define STRING_CANNOT_FIND 109
Propchange: trunk/reactos/base/applications/cmdutils/reg/reg.h
------------------------------------------------------------------------------
svn:eol-style = native
Added: trunk/reactos/base/applications/cmdutils/reg/reg.rbuild
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/cmdutils…
==============================================================================
--- trunk/reactos/base/applications/cmdutils/reg/reg.rbuild (added)
+++ trunk/reactos/base/applications/cmdutils/reg/reg.rbuild [iso-8859-1] Sat Oct 24
15:32:45 2009
@@ -1,0 +1,10 @@
+<module name="reg" type="win32cui"
installbase="system32" installname="reg.exe"
unicode="true">
+ <include base="reg">.</include>
+ <redefine name="_WIN32_WINNT">0x600</redefine>
+ <library>wine</library>
+ <library>advapi32</library>
+ <library>user32</library>
+ <library>kernel32</library>
+ <file>reg.c</file>
+ <file>rsrc.rc</file>
+</module>
Propchange: trunk/reactos/base/applications/cmdutils/reg/reg.rbuild
------------------------------------------------------------------------------
svn:eol-style = native
Added: trunk/reactos/base/applications/cmdutils/reg/rsrc.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/cmdutils…
==============================================================================
--- trunk/reactos/base/applications/cmdutils/reg/rsrc.rc (added)
+++ trunk/reactos/base/applications/cmdutils/reg/rsrc.rc [iso-8859-1] Sat Oct 24 15:32:45
2009
@@ -1,0 +1,13 @@
+#include "Da.rc"
+#include "De.rc"
+#include "En.rc"
+#include "Fr.rc"
+#include "Ja.rc"
+//#include "Ko.rc"
+#include "Lt.rc"
+#include "Nl.rc"
+#include "No.rc"
+//#include "Pl.rc"
+#include "Pt.rc"
+#include "Ru.rc"
+#include "Si.rc"
Propchange: trunk/reactos/base/applications/cmdutils/reg/rsrc.rc
------------------------------------------------------------------------------
svn:eol-style = native
Modified: trunk/reactos/boot/bootdata/packages/reactos.dff
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/bootdata/packages/rea…
==============================================================================
--- trunk/reactos/boot/bootdata/packages/reactos.dff [iso-8859-1] (original)
+++ trunk/reactos/boot/bootdata/packages/reactos.dff [iso-8859-1] Sat Oct 24 15:32:45
2009
@@ -40,6 +40,7 @@
base\applications\cmdutils\hostname\hostname.exe 1
base\applications\cmdutils\lodctr\lodctr.exe 1
base\applications\cmdutils\more\more.exe 1
+base\applications\cmdutils\reg\reg.exe 1
base\applications\cmdutils\xcopy\xcopy.exe 1
base\applications\control\control.exe 1
base\applications\dxdiag\dxdiag.exe 1