V
V
Victor2014-12-18 13:37:24
cmd/bat
Victor, 2014-12-18 13:37:24

How can I add a REG ADD.bat command so that it adds items to the context menu of files of a certain extension?

There are two commands that add two entries to the registry - two entries in the context menu of .hlp files:
(To create a .bat file)
REG ADD HKEY_CLASSES_ROOT\hlpfile\shell\compress\command /d "compact.exe /C \"%1 \"" /f
REG ADD HKEY_CLASSES_ROOT\hlpfile\shell\uncompress\command /d "compact.exe /U \"%1\"" /f
So they run, and the following is displayed in the console:
Error: Invalid command-line parameters .
Text equivalent to run by registry editor:
[HKEY_CLASSES_ROOT\hlpfile\shell\uncompress]
[HKEY_CLASSES_ROOT\hlpfile\shell\uncompress\command]
@="compact.exe /U \"%1\""
@="compact.exe /C \"%1\""
Please help with advice, maybe the REG ADD command itself is in the wrong form (although I did everything according to the off-documentation). It seems to me that the problem is in the added value itself, because this is the launch of the program, and not just a string. (I'm talking about /d "compact.exe /C \"%1\")
Windows XP SP2

Answer the question

In order to leave comments, you need to log in

1 answer(s)
L
ldv, 2014-12-18
@davinctor

UPD:

REG ADD HKEY_CLASSES_ROOT\hlpfile\shell\compress\command /d "compact.exe /C \"%%1\"" /f
REG ADD HKEY_CLASSES_ROOT\hlpfile\shell\uncompress\command /d "compact.exe /U \"%%1\"" /f

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question