steelej - 2012-11-30

I have tested a number of triggers that use command lines. It is sometimes difficult to see what is actually happening.

I have used an idea I found on the Internet a few years ago that shows the command line arguments and would like to share this in the hope it will help somebody.

Open Notepad

Copy and past the following text into the notepad Window
-------Copy the following lines -------------

@echo ---------------------------
@echo Arg0=%0%
@echo Arg1=%1%
@echo Arg2=%2%
@echo Arg3=%3%
@echo Arg4=%4%
@echo Arg5=%5%
@echo Arg6=%6%
@echo Arg7=%7%
@echo Arg8=%8%
@echo Arg9=%9%
@echo ---------------------------

pause

--------Lines before here--------------------------------

Save file as _echoargs.cmd is a convenient folder e.g. Testing

make the trigger command point to this file e.g.

U:\Documents\xxxxxxx\testing\echoargs.cmd_

If the arguments field looks like

/v "{REF:A@I:629383C0A4AF654491CB401E254974A5}" /lt /p "{REF:P@I:629383C0A4AF654491CB401E254974A5}" /q background /m removable

This is the result using a Truerypt trigger and shows the substitutions that KeyPass makes from the references:


Arg0="U:\Documents\xxxxxxx\testing\echoargs.cmd"
Arg1=/v
Arg2="U:\Documents\xxxxxxx\testing\truecrypt-test.tc"
Arg3=/lt
Arg4=/p
Arg5="test"
Arg6=/q
Arg7=background
Arg8=/m
Arg9=removable


C:\Program Files\KeePass Password Safe 2>pause
Press any key to continue . . .

When the result is satisfactory chagne the file entry to the real program e.g.
C:\Program Files\TrueCrypt\TrueCrypt.exe