Building extensions without entering the security key pass code

Mike Bray (Quote Loader Author)'s Avatar

Mike Bray (Quote Loader Author)

18 Feb, 2022 02:02 PM

Is it possible to set the security pass code within a build file so that I do not need to enter the pass code everytime I build an extension?

  1. 1 Posted by Dan P on 18 Feb, 2022 02:22 PM

    Dan P's Avatar

    Another user here:
    I tried many times a few years ago and never could find a way. I even asked the developer and he said he had no way to suggest (at that time). Been a few years.
    I was using Eclipse at the time but I now use IntelliJ. Haven't found a way.

    Hopefully, someone can tell us how!

  2. 2 Posted by Stuart Beesley ... on 18 Feb, 2022 02:23 PM

    Stuart Beesley (Mr Toolbox)'s Avatar

    Which pass code? Do you mean to sign the mxt or do u mean to logon to a MD dataset?

  3. 3 Posted by Mike Bray (Quot... on 18 Feb, 2022 03:32 PM

    Mike Bray (Quote Loader Author)'s Avatar

    Stuart, the passcode you enter when adding the sign to the mxt. It is the code you create when creating the keys.

  4. 4 Posted by Stuart Beesley ... on 18 Feb, 2022 03:43 PM

    Stuart Beesley (Mr Toolbox)'s Avatar

    This may not help but I use a shell script to build my mxt files and I feed the code in via a redirect from a text file.

    I did try automating in Ant via IntelliJ but I just ended up with a locked screen that was awaiting input from nowhere.

  5. Support Staff 5 Posted by Sean Reilly on 18 Feb, 2022 04:57 PM

    Sean Reilly's Avatar

    The MoneyPie extension seems to have built-in a class to do this:

    I've not tried it myself, but it might help. In general we really do need a way to automate this built-in to the signing tool.

    Sean Reilly
    Director/Developer, The Infinite Kind

  6. 6 Posted by Mike Bray (Quot... on 19 Feb, 2022 11:26 AM

    Mike Bray (Quote Loader Author)'s Avatar

    Thanks Sean

    This fix redirects Standard input stream to a file containing the
    passcode. On the surface it should work. I don't know if it is possible
    to add another parameter to KeyAdmin that takes the passcode and passes
    through to the code that asks for the passcode.

    I will experiment with the fix.

  7. 7 Posted by Mike Bray (Quot... on 19 Feb, 2022 01:31 PM

    Mike Bray (Quote Loader Author)'s Avatar

    Based on the fix from Moneypie I have got this working. The fix as written does not work, it relies on redirecting standard in to a file. KeyAdmin uses a Console so this does not work, however, if you read the passcode and set the System property "moneydance_key_pass" to the pass code KeyAdmin reads this instead of from Standard In.

    Here is the amended code for the fix:

    import com.moneydance.admin.KeyAdmin;
    public class SignMxt {
         * @param args
        public static void main(String[] args) {
            // TODO Auto-generated method stub
                FileInputStream fis = new FileInputStream(new File("sign_pw.txt"));
                String code="";
                int content;
                while ((!=-1) {
                    code +=(char)content;
            catch (FileNotFoundException fnfe)
            catch (Exception ex)
    Enclosed is a jar, copy the jar to your lib directory and change your build.xml to include:
         <pathelement path="${lib}/signmxt.jar"/>
    change your build file to use SignMxt instead of KeyAdmin
         <java newenvironment="true" classpathref="classpath" classname="SignMxt">
                <arg value="signextjar" />
                <arg value="${privkeyfile}" />
                <arg value="${privkeyid}" />
                <arg value="reportwriter2" />
                <arg line="${dist}/reportwriter2.mxt" />
    Create a file called "sign_pw.txt" containing your passcode in your src directory.
  8. 8 Posted by Dan P on 19 Feb, 2022 02:59 PM

    Dan P's Avatar

    Thanks Mike! It works perfectly.
    I would note this. I originally put the passcode in a text file with a carriage return. That caused a padding error in the build. Removing the carriage return works fine.

  9. 9 Posted by Dan P on 20 Feb, 2022 04:07 PM

    Dan P's Avatar

    FWIW, I modified your code slightly to accommodate people like me who enter a carriage return after the passcode.

            while ((!=-1) {
                if (content > 31) {
                    code += (char) content;


  10. 10 Posted by Mike Bray (Quot... on 21 Feb, 2022 06:04 AM

    Mike Bray (Quote Loader Author)'s Avatar

    Looks good, also I can remove the redirection of System.setIn

  11. 11 Posted by Mike Bray (Quot... on 23 Feb, 2022 01:43 PM

    Mike Bray (Quote Loader Author)'s Avatar

    I have updated the jar based on Dan's suggestion. This now accepts cr at the end of the line

  12. 12 Posted by patriciajoglesb... on 04 Mar, 2022 05:00 AM

    patriciajoglesby's Avatar

    How can I build extensions without entering the security pass code?

    Extensions are software programs designed to extend the functionality of other applications. They allow users to add features that may not otherwise be possible (or at least easy) to achieve through traditional means. In order to build custom software using extensions, they first need to be installed on your device. Extensions can then be created from any standard web browser. Once installed, the extensions can be added to any application simply by tapping the extension icon. To remove an extension, tap the app name once again, this time holding down the home button until a pop-up menu appears. Select ‘Remove’ and it should uninstall. Once you've removed them, the icons should disappear from your Home screen. You'll still have to enter the security passcode each time you want access to those apps, though.

  13. 13 Posted by Dan P on 04 Mar, 2022 02:31 PM

    Dan P's Avatar

    I think you might be confusing browser extensions with Moneydance extensions. Two different processes.

  14. System closed this discussion on 03 Jun, 2022 02:40 PM.

  15. Stuart Beesley (Mr Toolbox) re-opened this discussion on 24 Mar, 2023 06:50 PM

  16. 14 Posted by Stuart Beesley ... on 24 Mar, 2023 06:50 PM

    Stuart Beesley (Mr Toolbox)'s Avatar

    OK, just looked into this... Sorry to ask a daft question, but why not just set:
    into the file ./src/ ?
    I just tried it, and the standard build.xml works using this.

  17. 15 Posted by Dan P on 24 Mar, 2023 08:17 PM

    Dan P's Avatar

    I don't follow. Where is used? In the build file?

  18. 16 Posted by Stuart Beesley ... on 24 Mar, 2023 08:40 PM

    Stuart Beesley (Mr Toolbox)'s Avatar

    The std build.xml file loads (and its variables). It then puts keypass into a system property which is read by the std signing jar/process. In fact, Mike’s jar basically does the same and sets the very same system property to achieve the same result. So as far as I can see, it’s already possible and works for me.

  19. 17 Posted by Dan P on 24 Mar, 2023 10:09 PM

    Dan P's Avatar

    I guess I'm the daft one. It doesn't work for me. Could I have user.preferences in the wrong place? It's in the directory where the build file is.

  20. 18 Posted by Stuart Beesley ... on 24 Mar, 2023 10:18 PM

    Stuart Beesley (Mr Toolbox)'s Avatar

    Are you using a build file based on this one?

    Take a look and you will see and also keypass= sections.


  21. 19 Posted by Dan P on 24 Mar, 2023 10:57 PM

    Dan P's Avatar

    I'm still using variations of the original build file from the developers package.
    I added the file and the keypass entries and it works for me too.
    Your solution is a lot easier but I've already put Mike's solution in the build files I use.
    I'll need to start the process of reviewing all the build files.

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:


Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac