Author: jmorlan
Date: Mon Mar 16 21:18:26 2009
New Revision: 40062
URL:
http://svn.reactos.org/svn/reactos?rev=40062&view=rev
Log:
Implement ASSOC command (Bug 4275). Patch by Lee C. Baker <lee at leecbaker.com>.
Added:
trunk/reactos/base/shell/cmd/assoc.c (with props)
Modified:
trunk/reactos/base/shell/cmd/cmd.h
trunk/reactos/base/shell/cmd/cmd.rbuild
trunk/reactos/base/shell/cmd/cmdtable.c
trunk/reactos/base/shell/cmd/config.h
trunk/reactos/base/shell/cmd/lang/de-DE.rc
trunk/reactos/base/shell/cmd/lang/el-GR.rc
trunk/reactos/base/shell/cmd/lang/en-US.rc
trunk/reactos/base/shell/cmd/lang/es-ES.rc
trunk/reactos/base/shell/cmd/lang/fr-FR.rc
trunk/reactos/base/shell/cmd/lang/hu-HU.rc
trunk/reactos/base/shell/cmd/lang/id-ID.rc
trunk/reactos/base/shell/cmd/lang/it-IT.rc
trunk/reactos/base/shell/cmd/lang/ja-JP.rc
trunk/reactos/base/shell/cmd/lang/no-NO.rc
trunk/reactos/base/shell/cmd/lang/pl-PL.rc
trunk/reactos/base/shell/cmd/lang/ru-RU.rc
trunk/reactos/base/shell/cmd/lang/uk-UA.rc
trunk/reactos/base/shell/cmd/resource.h
Added: trunk/reactos/base/shell/cmd/assoc.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/assoc.c?rev…
==============================================================================
--- trunk/reactos/base/shell/cmd/assoc.c (added)
+++ trunk/reactos/base/shell/cmd/assoc.c [iso-8859-1] Mon Mar 16 21:18:26 2009
@@ -1,0 +1,262 @@
+/*
+ * Assoc.C - assoc internal command.
+ *
+ *
+ * History:
+ *
+ * 14-Mar-2009 Lee C. Baker
+ * - initial implementation
+ *
+ * 15-Mar-2009 Lee C. Baker
+ * - Don't write to (or use) HKEY_CLASSES_ROOT directly
+ * - Externalize strings
+ *
+ * TODO:
+ * - PrintAllAssociations might could be optimized to not fetch all registry subkeys
under 'Classes', just the ones that start with '.'
+ * - Make sure that non-administrator users can list associations, and get appropriate
error messages when they don't have sufficient
+ * priveleges to perform an operation
+ */
+
+#include <precomp.h>
+#include <tchar.h>
+
+#ifdef INCLUDE_CMD_ASSOC
+
+static INT
+PrintAssociation(LPTSTR extension)
+{
+ DWORD return_val;
+ HKEY hKey = NULL, hInsideKey = NULL;
+
+ DWORD fileTypeLength = 0;
+ LPTSTR fileType = NULL;
+
+ return_val = RegOpenKeyEx(HKEY_LOCAL_MACHINE, _T("SOFTWARE\\Classes"), 0,
KEY_READ, &hKey);
+
+ if(return_val != ERROR_SUCCESS)
+ {
+ RegCloseKey(hKey);
+ return -1;
+ }
+
+ return_val = RegOpenKeyEx(hKey, extension, 0, KEY_READ, &hInsideKey);
+
+ if(return_val != ERROR_SUCCESS)
+ {
+ RegCloseKey(hKey);
+ RegCloseKey(hInsideKey);
+ return 0;
+ }
+
+ /* obtain string length */
+ return_val = RegQueryValueEx(hInsideKey, NULL, NULL, NULL, NULL, &fileTypeLength);
+
+ if(return_val == ERROR_FILE_NOT_FOUND) /* no default value, don't display */
+ {
+ RegCloseKey(hInsideKey);
+ RegCloseKey(hKey);
+ return 0;
+ }
+
+ if(return_val != ERROR_SUCCESS)
+ {
+ RegCloseKey(hInsideKey);
+ RegCloseKey(hKey);
+ return -2;
+ }
+
+ fileType = cmd_alloc(fileTypeLength * sizeof(TCHAR));
+
+ /* obtain actual file type */
+ return_val = RegQueryValueEx(hInsideKey, NULL, NULL, NULL, (LPBYTE) fileType,
&fileTypeLength);
+
+ RegCloseKey(hInsideKey);
+ RegCloseKey(hKey);
+
+ if(return_val != ERROR_SUCCESS)
+ {
+ cmd_free(fileType);
+ return -2;
+ }
+
+ if(fileTypeLength != 0) /* if there is a default key, display relevant information */
+ {
+ ConOutPrintf(_T("%s=%s\r\n"), extension, fileType);
+ }
+
+ if(fileTypeLength)
+ cmd_free(fileType);
+
+ return 1;
+}
+
+static INT
+PrintAllAssociations()
+{
+ DWORD return_val = 0;
+ HKEY hKey = NULL;
+ DWORD numKeys = 0;
+
+ DWORD extLength = 0;
+ LPTSTR extName = NULL;
+ DWORD keyCtr = 0;
+
+ return_val = RegOpenKeyEx(HKEY_LOCAL_MACHINE, _T("SOFTWARE\\Classes"), 0,
KEY_READ, &hKey);
+
+ if(return_val != ERROR_SUCCESS)
+ {
+ RegCloseKey(hKey);
+ return -1;
+ }
+
+ return_val = RegQueryInfoKey(hKey, NULL, NULL, NULL, &numKeys, &extLength, NULL,
NULL, NULL, NULL, NULL, NULL);
+
+ if(return_val != ERROR_SUCCESS)
+ {
+ RegCloseKey(hKey);
+ return -2;
+ }
+
+ extName = cmd_alloc(extLength * sizeof(TCHAR));
+
+ for(keyCtr = 0; keyCtr < numKeys; keyCtr++)
+ {
+ DWORD buffer_size = extLength;
+ return_val = RegEnumKeyEx(hKey, keyCtr, extName, &buffer_size, NULL, NULL, NULL,
NULL);
+
+ if(return_val == ERROR_SUCCESS || return_val == ERROR_MORE_DATA)
+ {
+ if(*extName == _T('.'))
+ PrintAssociation(extName);
+ }
+ else
+ {
+ cmd_free(extName);
+ RegCloseKey(hKey);
+ return -1;
+ }
+ }
+
+ RegCloseKey(hKey);
+
+ if(extName)
+ cmd_free(extName);
+
+ return numKeys;
+}
+
+static INT
+AddAssociation(LPTSTR extension, LPTSTR type)
+{
+ DWORD return_val;
+ HKEY hKey = NULL, insideKey = NULL;
+
+ return_val = RegOpenKeyEx(HKEY_LOCAL_MACHINE, _T("SOFTWARE\\Classes"), 0,
KEY_ALL_ACCESS, &hKey);
+
+ if(return_val != ERROR_SUCCESS)
+ return -1;
+
+ return_val = RegCreateKeyEx(hKey, extension, 0, NULL, REG_OPTION_NON_VOLATILE,
KEY_ALL_ACCESS, NULL, &insideKey, NULL);
+
+ if(return_val != ERROR_SUCCESS)
+ {
+ RegCloseKey(hKey);
+ return -1;
+ }
+
+ return_val = RegSetValueEx(insideKey, NULL, 0, REG_SZ, (LPBYTE)type, (_tcslen(type) + 1)
* sizeof(TCHAR));
+
+ if(return_val != ERROR_SUCCESS)
+ {
+ RegCloseKey(insideKey);
+ RegCloseKey(hKey);
+ return -2;
+ }
+
+ RegCloseKey(insideKey);
+ RegCloseKey(hKey);
+ return 0;
+}
+
+
+static int
+RemoveAssociation(LPTSTR extension)
+{
+ DWORD return_val;
+ HKEY hKey;
+
+ return_val = RegOpenKeyEx(HKEY_LOCAL_MACHINE, _T("SOFTWARE\\Classes"), 0,
KEY_ALL_ACCESS, &hKey);
+
+ if(return_val != ERROR_SUCCESS)
+ return -1;
+
+ return_val = RegDeleteKey(hKey, extension);
+
+ if(return_val != ERROR_SUCCESS)
+ {
+ RegCloseKey(hKey);
+ return -2;
+ }
+
+ RegCloseKey(hKey);
+ return 0;
+}
+
+
+
+INT CommandAssoc (LPTSTR param)
+{
+
+ LPTSTR lpEqualSign = NULL;
+
+ /* print help */
+ if (!_tcsncmp (param, _T("/?"), 2))
+ {
+ ConOutResPaging(TRUE,STRING_ASSOC_HELP);
+ return 0;
+ }
+
+ nErrorLevel = 0;
+
+ if(_tcslen(param) == 0)
+ PrintAllAssociations();
+ else
+ {
+ lpEqualSign = _tcschr(param, _T('='));
+ if(lpEqualSign != NULL)
+ {
+ LPTSTR fileType = lpEqualSign + 1;
+ LPTSTR extension = cmd_alloc((lpEqualSign - param + 1) * sizeof(TCHAR));
+
+ _tcsncpy(extension, param, lpEqualSign - param);
+ extension[lpEqualSign - param] = (TCHAR)0;
+
+ if(_tcslen(fileType) == 0)
+ /* if the equal sign is the last character
+ in the string, then delete the key */
+ {
+ RemoveAssociation(extension);
+ }
+ else
+ /* otherwise, add the key and print out the association*/
+ {
+ AddAssociation( extension, fileType);
+ PrintAssociation(extension);
+ }
+
+ cmd_free(extension);
+ }
+ else
+ {
+ /* no equal sign, print all associations */
+ INT retval = PrintAssociation(param);
+
+ if(retval == 0) /* if nothing printed out */
+ ConOutResPrintf(STRING_ASSOC_ERROR, param);
+ }
+ }
+
+ return 0;
+}
+
+#endif /* INCLUDE_CMD_ASSOC */
Propchange: trunk/reactos/base/shell/cmd/assoc.c
------------------------------------------------------------------------------
svn:eol-style = native
Modified: trunk/reactos/base/shell/cmd/cmd.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/cmd.h?rev=4…
==============================================================================
--- trunk/reactos/base/shell/cmd/cmd.h [iso-8859-1] (original)
+++ trunk/reactos/base/shell/cmd/cmd.h [iso-8859-1] Mon Mar 16 21:18:26 2009
@@ -70,6 +70,9 @@
/* Prototypes for ALIAS.C */
VOID ExpandAlias (LPTSTR, INT);
INT CommandAlias (LPTSTR);
+
+/* Prototypes for ASSOC.C */
+INT CommandAssoc (LPTSTR);
/* Prototypes for ATTRIB.C */
INT CommandAttrib (LPTSTR);
Modified: trunk/reactos/base/shell/cmd/cmd.rbuild
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/cmd.rbuild?…
==============================================================================
--- trunk/reactos/base/shell/cmd/cmd.rbuild [iso-8859-1] (original)
+++ trunk/reactos/base/shell/cmd/cmd.rbuild [iso-8859-1] Mon Mar 16 21:18:26 2009
@@ -16,6 +16,7 @@
<pch>precomp.h</pch>
<compilationunit name="unit.c">
<file>alias.c</file>
+ <file>assoc.c</file>
<file>attrib.c</file>
<file>batch.c</file>
<file>beep.c</file>
Modified: trunk/reactos/base/shell/cmd/cmdtable.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/cmdtable.c?…
==============================================================================
--- trunk/reactos/base/shell/cmd/cmdtable.c [iso-8859-1] (original)
+++ trunk/reactos/base/shell/cmd/cmdtable.c [iso-8859-1] Mon Mar 16 21:18:26 2009
@@ -35,6 +35,10 @@
#ifdef FEATURE_ALIASES
{_T("alias"), 0, CommandAlias},
+#endif
+
+#ifdef INCLUDE_CMD_ASSOC
+ {_T("assoc"), 0, CommandAssoc},
#endif
#ifdef INCLUDE_CMD_ATTRIB
Modified: trunk/reactos/base/shell/cmd/config.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/config.h?re…
==============================================================================
--- trunk/reactos/base/shell/cmd/config.h [iso-8859-1] (original)
+++ trunk/reactos/base/shell/cmd/config.h [iso-8859-1] Mon Mar 16 21:18:26 2009
@@ -50,6 +50,7 @@
#ifdef NT4_INTERNAL_COMMANDS
#define INCLUDE_CMD_ACTIVATE
#endif
+#define INCLUDE_CMD_ASSOC
#define INCLUDE_CMD_ATTRIB
#define INCLUDE_CMD_CHCP
#define INCLUDE_CMD_CHDIR
Modified: trunk/reactos/base/shell/cmd/lang/de-DE.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/lang/de-DE.…
==============================================================================
--- trunk/reactos/base/shell/cmd/lang/de-DE.rc [iso-8859-1] (original)
+++ trunk/reactos/base/shell/cmd/lang/de-DE.rc [iso-8859-1] Mon Mar 16 21:18:26 2009
@@ -8,6 +8,14 @@
LANGUAGE LANG_GERMAN, SUBLANG_NEUTRAL
STRINGTABLE DISCARDABLE
BEGIN
+
+STRING_ASSOC_HELP, "Modify file extension associations.\n\n\
+assoc [.ext[=[FileType]]]\n\
+\n\
+assoc (print all associations)\n\
+assoc .ext (print specific association)\n\
+assoc .ext= (remove specific association)\n\
+assoc .ext=FileType (add new association)\n"
STRING_ATTRIB_HELP, "Zeigt Dateiattribute an oder ändert sie.\n\n\
ATTRIB [+R | -R] [+A | -A] [+S | -S] [+H | -H] Dateiname ...\n\
@@ -600,6 +608,7 @@
STRING_COPY_OPTION, "JNA"
STRING_ALIAS_ERROR, "Die Befehlszeile ist zu lange nach der
Alias-Erweiterung!\n"
+STRING_ASSOC_ERROR, "File association not found for extension %s\n"
STRING_BATCH_ERROR, "Es trat ein Fehler auf, während die Batch-Datei
geöffnet wurde.\n"
STRING_CHCP_ERROR1, "Aktive Code-Page: %u\n"
STRING_CHCP_ERROR4, "Ungültige Code-Page\n"
Modified: trunk/reactos/base/shell/cmd/lang/el-GR.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/lang/el-GR.…
==============================================================================
--- trunk/reactos/base/shell/cmd/lang/el-GR.rc [iso-8859-1] (original)
+++ trunk/reactos/base/shell/cmd/lang/el-GR.rc [iso-8859-1] Mon Mar 16 21:18:26 2009
@@ -8,6 +8,14 @@
LANGUAGE LANG_GREEK, SUBLANG_DEFAULT
STRINGTABLE DISCARDABLE
BEGIN
+
+STRING_ASSOC_HELP, "Modify file extension associations.\n\n\
+assoc [.ext[=[FileType]]]\n\
+\n\
+assoc (print all associations)\n\
+assoc .ext (print specific association)\n\
+assoc .ext= (remove specific association)\n\
+assoc .ext=FileType (add new association)\n"
STRING_ATTRIB_HELP, "ÐñïâïëÞ Þ áëëáãÞ ôùí ÷áñáêôçñéóôéêþí ôùí áñ÷åßùí.\n\n\
ATTRIB [+R | -R] [+A | -A] [+S | -S] [+H | -H] file ...\n\
@@ -605,6 +613,7 @@
STRING_ALIAS_ERROR, "Command line too long after alias expansion!\n"
+STRING_ASSOC_ERROR, "File association not found for extension %s\n"
STRING_BATCH_ERROR, "Error opening batch file\n"
STRING_CHCP_ERROR1, "Active code page: %u\n"
STRING_CHCP_ERROR4, "Invalid code page\n"
Modified: trunk/reactos/base/shell/cmd/lang/en-US.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/lang/en-US.…
==============================================================================
--- trunk/reactos/base/shell/cmd/lang/en-US.rc [iso-8859-1] (original)
+++ trunk/reactos/base/shell/cmd/lang/en-US.rc [iso-8859-1] Mon Mar 16 21:18:26 2009
@@ -8,6 +8,14 @@
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
STRINGTABLE DISCARDABLE
BEGIN
+
+STRING_ASSOC_HELP, "Modify file extension associations.\n\n\
+assoc [.ext[=[FileType]]]\n\
+\n\
+assoc (print all associations)\n\
+assoc .ext (print specific association)\n\
+assoc .ext= (remove specific association)\n\
+assoc .ext=FileType (add new association)\n"
STRING_ATTRIB_HELP, "Displays or changes file attributes.\n\n\
ATTRIB [+R | -R] [+A | -A] [+S | -S] [+H | -H] file ...\n\
@@ -608,7 +616,7 @@
STRING_CHOICE_OPTION, "YN"
STRING_COPY_OPTION, "YNA"
-
+STRING_ASSOC_ERROR, "File association not found for extension %s\n"
STRING_ALIAS_ERROR, "Command line too long after alias expansion!\n"
STRING_BATCH_ERROR, "Error opening batch file\n"
STRING_CHCP_ERROR1, "Active code page: %u\n"
Modified: trunk/reactos/base/shell/cmd/lang/es-ES.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/lang/es-ES.…
==============================================================================
--- trunk/reactos/base/shell/cmd/lang/es-ES.rc [iso-8859-1] (original)
+++ trunk/reactos/base/shell/cmd/lang/es-ES.rc [iso-8859-1] Mon Mar 16 21:18:26 2009
@@ -8,6 +8,14 @@
LANGUAGE LANG_SPANISH, SUBLANG_NEUTRAL
STRINGTABLE DISCARDABLE
BEGIN
+
+STRING_ASSOC_HELP, "Modify file extension associations.\n\n\
+assoc [.ext[=[FileType]]]\n\
+\n\
+assoc (print all associations)\n\
+assoc .ext (print specific association)\n\
+assoc .ext= (remove specific association)\n\
+assoc .ext=FileType (add new association)\n"
STRING_ATTRIB_HELP, "Muestra o cambia los atributos de los archivos.\n\n\
ATTRIB [+R | -R] [+A | -A] [+S | -S] [+H | -H] file ...\n\
@@ -567,6 +575,7 @@
STRING_ALIAS_ERROR, "¡Linea de comandos demasiado larga tras la expansión
del alias!\n"
+STRING_ASSOC_ERROR, "File association not found for extension %s\n"
STRING_BATCH_ERROR, "Error abriendo el archivo por lotes\n"
STRING_CHCP_ERROR1, "Página de códigos activa: %u\n"
STRING_CHCP_ERROR4, "Código de página inválido\n"
Modified: trunk/reactos/base/shell/cmd/lang/fr-FR.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/lang/fr-FR.…
==============================================================================
--- trunk/reactos/base/shell/cmd/lang/fr-FR.rc [iso-8859-1] (original)
+++ trunk/reactos/base/shell/cmd/lang/fr-FR.rc [iso-8859-1] Mon Mar 16 21:18:26 2009
@@ -9,6 +9,14 @@
LANGUAGE LANG_FRENCH, SUBLANG_NEUTRAL
STRINGTABLE DISCARDABLE
BEGIN
+
+STRING_ASSOC_HELP, "Modify file extension associations.\n\n\
+assoc [.ext[=[FileType]]]\n\
+\n\
+assoc (print all associations)\n\
+assoc .ext (print specific association)\n\
+assoc .ext= (remove specific association)\n\
+assoc .ext=FileType (add new association)\n"
STRING_ATTRIB_HELP, "Affiche ou change des attributs de fichiers.\n\n\
ATTRIB [+R | -R] [+A | -A] [+S | -S] [+H | -H] file ...\n\
@@ -623,6 +631,7 @@
STRING_ALIAS_ERROR, "Ligne de commande trop longue après remplacement de
l'alias!\n"
+STRING_ASSOC_ERROR, "File association not found for extension %s\n"
STRING_BATCH_ERROR, "Erreur à l'ouverture du fichier batch\n"
STRING_CHCP_ERROR1, "Page de codes actuelle : %u\n"
STRING_CHCP_ERROR4, "Page de codes invalide \n"
Modified: trunk/reactos/base/shell/cmd/lang/hu-HU.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/lang/hu-HU.…
==============================================================================
--- trunk/reactos/base/shell/cmd/lang/hu-HU.rc [iso-8859-1] (original)
+++ trunk/reactos/base/shell/cmd/lang/hu-HU.rc [iso-8859-1] Mon Mar 16 21:18:26 2009
@@ -10,6 +10,14 @@
LANGUAGE LANG_HUNGARIAN, SUBLANG_DEFAULT
STRINGTABLE DISCARDABLE
BEGIN
+
+STRING_ASSOC_HELP, "Modify file extension associations.\n\n\
+assoc [.ext[=[FileType]]]\n\
+\n\
+assoc (print all associations)\n\
+assoc .ext (print specific association)\n\
+assoc .ext= (remove specific association)\n\
+assoc .ext=FileType (add new association)\n"
STRING_ATTRIB_HELP, "Állományok attribútumok megjelenítése vagy
beállításai.\n\n\
ATTRIB [+R | -R] [+A | -A] [+S | -S] [+H | -H] állomány ...\n\
@@ -547,6 +555,7 @@
STRING_ALIAS_ERROR, "A parancssor túl hosszú az alias
kibontásakor!\n"
+STRING_ASSOC_ERROR, "File association not found for extension %s\n"
STRING_BATCH_ERROR, "Hiba a batch állomány megnyitásakor\n"
STRING_CHCP_ERROR1, "Aktív kódlap: %u\n"
STRING_CHCP_ERROR4, "Érvénytelen kódlap\n"
Modified: trunk/reactos/base/shell/cmd/lang/id-ID.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/lang/id-ID.…
==============================================================================
--- trunk/reactos/base/shell/cmd/lang/id-ID.rc [iso-8859-1] (original)
+++ trunk/reactos/base/shell/cmd/lang/id-ID.rc [iso-8859-1] Mon Mar 16 21:18:26 2009
@@ -9,6 +9,14 @@
STRINGTABLE DISCARDABLE
BEGIN
+
+STRING_ASSOC_HELP, "Modify file extension associations.\n\n\
+assoc [.ext[=[FileType]]]\n\
+\n\
+assoc (print all associations)\n\
+assoc .ext (print specific association)\n\
+assoc .ext= (remove specific association)\n\
+assoc .ext=FileType (add new association)\n"
STRING_ATTRIB_HELP, "Menampilkan atau mengubah atribut file.\n\n\
ATTRIB [+R | -R] [+A | -A] [+S | -S] [+H | -H] file ...\n\
@@ -567,6 +575,7 @@
STRING_ALIAS_ERROR, "Baris perintah terlalu panjang setelah ekspansi
alias!\n"
+STRING_ASSOC_ERROR, "File association not found for extension %s\n"
STRING_BATCH_ERROR, "Kesalaham membuka file batch\n"
STRING_CHCP_ERROR1, "Halaman kode aktif: %u\n"
STRING_CHCP_ERROR4, "Halaman kode tidak benar\n"
Modified: trunk/reactos/base/shell/cmd/lang/it-IT.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/lang/it-IT.…
==============================================================================
--- trunk/reactos/base/shell/cmd/lang/it-IT.rc [iso-8859-1] (original)
+++ trunk/reactos/base/shell/cmd/lang/it-IT.rc [iso-8859-1] Mon Mar 16 21:18:26 2009
@@ -4,6 +4,14 @@
LANGUAGE LANG_ITALIAN, SUBLANG_NEUTRAL
STRINGTABLE DISCARDABLE
BEGIN
+
+STRING_ASSOC_HELP, "Modify file extension associations.\n\n\
+assoc [.ext[=[FileType]]]\n\
+\n\
+assoc (print all associations)\n\
+assoc .ext (print specific association)\n\
+assoc .ext= (remove specific association)\n\
+assoc .ext=FileType (add new association)\n"
STRING_ATTRIB_HELP, "Visualizza o modifica gli attributi dei file.\n\n\
ATTRIB [+R | -R] [+A | -A] [+S | -S] [+H | -H] file ...\n\
@@ -613,6 +621,7 @@
STRING_ALIAS_ERROR, "Linea di comando troppo lunga dopo l'espansione
degli alias!\n"
+STRING_ASSOC_ERROR, "File association not found for extension %s\n"
STRING_BATCH_ERROR, "Errore durante l'apertura di un batch\n"
STRING_CHCP_ERROR1, "Tabella dei codici attiva: %u\n"
STRING_CHCP_ERROR4, "Tabella dei codici non valida\n"
Modified: trunk/reactos/base/shell/cmd/lang/ja-JP.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/lang/ja-JP.…
==============================================================================
--- trunk/reactos/base/shell/cmd/lang/ja-JP.rc [iso-8859-1] (original)
+++ trunk/reactos/base/shell/cmd/lang/ja-JP.rc [iso-8859-1] Mon Mar 16 21:18:26 2009
@@ -8,6 +8,14 @@
LANGUAGE LANG_JAPANESE, SUBLANG_DEFAULT
STRINGTABLE DISCARDABLE
BEGIN
+
+STRING_ASSOC_HELP, "Modify file extension associations.\n\n\
+assoc [.ext[=[FileType]]]\n\
+\n\
+assoc (print all associations)\n\
+assoc .ext (print specific association)\n\
+assoc .ext= (remove specific association)\n\
+assoc .ext=FileType (add new association)\n"
STRING_ATTRIB_HELP, "t@C®«ð\\¦Ü½ÍÏXµÜ·B\n\n\
ATTRIB [+R | -R] [+A | -A] [+S | -S] [+H | -H] [t@C] ...\n\
@@ -574,6 +582,7 @@
STRING_ALIAS_ERROR, "GCAXWJãÌR}h
Cª··¬Ü·!\n"
+STRING_ASSOC_ERROR, "File association not found for extension %s\n"
STRING_BATCH_ERROR, "ob`
t@CðJÆ«ÉG[ª¶µÜµ½B\n"
STRING_CHCP_ERROR1, "»ÝÌR[h y[W: %u\n"
STRING_CHCP_ERROR4, "³øÈR[h y[WÅ·\n"
Modified: trunk/reactos/base/shell/cmd/lang/no-NO.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/lang/no-NO.…
==============================================================================
--- trunk/reactos/base/shell/cmd/lang/no-NO.rc [iso-8859-1] (original)
+++ trunk/reactos/base/shell/cmd/lang/no-NO.rc [iso-8859-1] Mon Mar 16 21:18:26 2009
@@ -4,6 +4,14 @@
LANGUAGE LANG_NORWEGIAN, SUBLANG_NEUTRAL
STRINGTABLE DISCARDABLE
BEGIN
+
+STRING_ASSOC_HELP, "Modify file extension associations.\n\n\
+assoc [.ext[=[FileType]]]\n\
+\n\
+assoc (print all associations)\n\
+assoc .ext (print specific association)\n\
+assoc .ext= (remove specific association)\n\
+assoc .ext=FileType (add new association)\n"
STRING_ATTRIB_HELP, "Viser eller endrer filattributtene.\n\n\
ATTRIB [+R | -R] [+A | -A] [+S | -S] [+H | -H] fil ...\n\
@@ -559,6 +567,7 @@
STRING_ALIAS_ERROR, "Kommando linje for lang etter alias
utvidelse!\n"
+STRING_ASSOC_ERROR, "File association not found for extension %s\n"
STRING_BATCH_ERROR, "Feil ved åpning av satsvis fil\n"
STRING_CHCP_ERROR1, "Aktiv tegntabell: %u\n"
STRING_CHCP_ERROR4, "Ugyldig tegntabell\n"
Modified: trunk/reactos/base/shell/cmd/lang/pl-PL.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/lang/pl-PL.…
==============================================================================
--- trunk/reactos/base/shell/cmd/lang/pl-PL.rc [iso-8859-1] (original)
+++ trunk/reactos/base/shell/cmd/lang/pl-PL.rc [iso-8859-1] Mon Mar 16 21:18:26 2009
@@ -9,6 +9,14 @@
LANGUAGE LANG_POLISH, SUBLANG_DEFAULT
STRINGTABLE DISCARDABLE
BEGIN
+
+STRING_ASSOC_HELP, "Modify file extension associations.\n\n\
+assoc [.ext[=[FileType]]]\n\
+\n\
+assoc (print all associations)\n\
+assoc .ext (print specific association)\n\
+assoc .ext= (remove specific association)\n\
+assoc .ext=FileType (add new association)\n"
STRING_ATTRIB_HELP, "Wywietla lub zmienia atrybuty plików.\n\n\
ATTRIB [+R | -R] [+A | -A] [+S | -S] [+H | -H] nazwa_pliku ...\n\
@@ -565,6 +573,7 @@
STRING_ALIAS_ERROR, "Linia poleceñ zbyt d³uga po rozszerzeniu
aliasa!\n"
+STRING_ASSOC_ERROR, "File association not found for extension %s\n"
STRING_BATCH_ERROR, "B³¹d podczas otwierania pliku wsadowego\n"
STRING_CHCP_ERROR1, "Aktywna strona kodowa nr: %u\n"
STRING_CHCP_ERROR4, "Niew³aciwy numer strony kodowej\n"
Modified: trunk/reactos/base/shell/cmd/lang/ru-RU.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/lang/ru-RU.…
==============================================================================
--- trunk/reactos/base/shell/cmd/lang/ru-RU.rc [iso-8859-1] (original)
+++ trunk/reactos/base/shell/cmd/lang/ru-RU.rc [iso-8859-1] Mon Mar 16 21:18:26 2009
@@ -12,6 +12,14 @@
LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT
STRINGTABLE DISCARDABLE
BEGIN
+
+STRING_ASSOC_HELP, "Modify file extension associations.\n\n\
+assoc [.ext[=[FileType]]]\n\
+\n\
+assoc (print all associations)\n\
+assoc .ext (print specific association)\n\
+assoc .ext= (remove specific association)\n\
+assoc .ext=FileType (add new association)\n"
STRING_ATTRIB_HELP, "Âûâîä è èçìåíåíèå àòðèáóòîâ ôàéëîâ.\n\n\
ATTRIB [+R | -R] [+A | -A] [+S | -S] [+H | -H] ôàéë ...\n\
@@ -572,6 +580,7 @@
STRING_ALIAS_ERROR, "Êîìàíäíàÿ ñòðîêà ñëèøêîì äëèííàÿ ïîñëå ðàçâåðòûâàíèÿ
ïñåâäîíèìîâ!\n"
+STRING_ASSOC_ERROR, "File association not found for extension %s\n"
STRING_BATCH_ERROR, "Îøèáêà îòêðûòèÿ êîìàíäíîãî ôàéëà\n"
STRING_CHCP_ERROR1, "Òåêóùàÿ êîäîâàÿ ñòðàíèöà: %u\n"
STRING_CHCP_ERROR4, "Îøèáî÷íàÿ êîäîâàÿ ñòðàíèöà\n"
Modified: trunk/reactos/base/shell/cmd/lang/uk-UA.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/lang/uk-UA.…
==============================================================================
--- trunk/reactos/base/shell/cmd/lang/uk-UA.rc [iso-8859-1] (original)
+++ trunk/reactos/base/shell/cmd/lang/uk-UA.rc [iso-8859-1] Mon Mar 16 21:18:26 2009
@@ -12,6 +12,14 @@
LANGUAGE LANG_UKRAINIAN, SUBLANG_DEFAULT
STRINGTABLE DISCARDABLE
BEGIN
+
+STRING_ASSOC_HELP, "Modify file extension associations.\n\n\
+assoc [.ext[=[FileType]]]\n\
+\n\
+assoc (print all associations)\n\
+assoc .ext (print specific association)\n\
+assoc .ext= (remove specific association)\n\
+assoc .ext=FileType (add new association)\n"
STRING_ATTRIB_HELP, "³äîáðàæåííÿ àáî çì³íà àòðèáóò³â ôàéëó.\n\n\
ATTRIB [+R | -R] [+A | -A] [+S | -S] [+H | -H] ôàéë ...\n\
@@ -613,6 +621,7 @@
STRING_ALIAS_ERROR, "Command line too long after alias expansion!\n"
+STRING_ASSOC_ERROR, "File association not found for extension %s\n"
STRING_BATCH_ERROR, "Error opening batch file\n"
STRING_CHCP_ERROR1, "Active code page: %u\n"
STRING_CHCP_ERROR4, "Invalid code page\n"
Modified: trunk/reactos/base/shell/cmd/resource.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/resource.h?…
==============================================================================
--- trunk/reactos/base/shell/cmd/resource.h [iso-8859-1] (original)
+++ trunk/reactos/base/shell/cmd/resource.h [iso-8859-1] Mon Mar 16 21:18:26 2009
@@ -70,6 +70,7 @@
#define STRING_REPLACE_ERROR5 355
#define STRING_REPLACE_ERROR6 356
#define STRING_REPLACE_ERROR7 357
+#define STRING_ASSOC_ERROR 358
#define STRING_ATTRIB_HELP 600
#define STRING_ALIAS_HELP 601
@@ -87,6 +88,7 @@
#define STRING_CMD_HELP6 613
#define STRING_CMD_HELP7 614
#define STRING_CMD_HELP8 615
+#define STRING_ASSOC_HELP 616
#define STRING_CMD_SHELLINFO 624