Command Line Arguments and Options for ACCOUNTS

<< Click to Display Table of Contents >>

Navigation:  INSTALLATION INSTRUCTIONS >

Command Line Arguments and Options for ACCOUNTS

This is a technical topic, that will not be relevant to very many users, but we are including it for completeness.

 

Normally you start ACCOUNTS by double-clicking on its icon on your Windows Desktop. In that case, normally it starts by just running the program's executable file accounts.exe, without any arguments or options on the command line following that. However, there are some situations where arguments are added automatically, and some other situations where you may want to create an alternate icon that adds some options.

 

ACCOUNTS will process a filename argument, or one or more options, as described below, but never both.

 

Filename Arguments on the Command Line

 

ACCOUNTS has several file associations set up for it, which means that if files with certain extensions (the part of the filename after its last period) are opened or run, then ACCOUNTS will be run with the complete path to the filename added as an argument. This is not generally something you would do directly (like by typing a command in a Command Prompt window) but rather happens automatically based on the file association.

 

The associations for ACCOUNTS are:

 

.S4ABackup: regular database backup files made with the Backup/Restore Backup Database menu option.

.S4AEncryptedBackup: emailed database backup files made with the Backup/Restore Email Backup menu option.

.S4AIF: transaction import file (most likely a Bank Deposit export from the Software4Nonprofits DONATION program).

.QBO, .QFX, .OFX, and/or .ASO: various extensions for downloaded online banking import files. (Which of these are associated with ACCOUNTS depends on which other programs you already have on your system - if one of those extensions is already in use by another program, like Quicken or QuickBooks, the ACCOUNTS installation program will not override that and will not create a file association.) See also File Associations for more details, and how you can adjust these associations.

 

So for instance what actually happens when you double-click on a backup file named YourOrganization-2018-09-20.14.00.03.S4ABackup, or ask to Open it as an attachment in an email program etc., is that the following command line gets automatically run (with variable elements indicated in italics):

 

"C:\path to executable file\accounts.exe" "C:\path to backup file\YourOrganization-2018-09-20.14.00.03.S4ABackup"

 

As long as ACCOUNTS is not currently open, doing this will start ACCOUNTS and cause it to prompt you to restore that backup file.

 

Options for All Versions of ACCOUNTS

 

One that applies to all versions except for OnDemand is /D, which puts the program into "debug" mode. What that means is that it will give some extra technical message boxes in some parts of the program, and do some extra logging to files, such as the debug.txt file found in the directory accessed with the Tools Explore Temp Directory menu option. We would strongly discourage anyone from using this option unless we ask you to do so, as part of trying to determine the reason for a problem you are having. (And only a very small fraction of the problems that can occur with ACCOUNTS will be helped by turning on this option, so again, please don't just try it yourself!)

 

Another way to put the program into "debug" mode, if we ask you to do so, is with the Tools Turn Debug Mode On menu option.

 

The option /F "basename" can be used when you have multiple databases that you can switch between with the File Open Database menu option. Adding it on the command line does an automatic switch to the database with that basename (the part before .S4A) in the Switch Databases window.

 

So for instance if your databases are named "Church 1.S4A" and "Foundation 2.S4A", using /F "Church 1" will automatically open the program switched to that database, regardless of which database you were last using. (Normally the program opens to the one you were using last.)

 

Do not include the ".S4A" part in the basename argument, as it will not work. And you only need double quotes around that argument if it includes spaces.

 

Some users with two or more databases may want to make copies of their icon for ACCOUNTS, add this switch to them, and rename them appropriately, so they can immediately open a specific database by using that alternate icon. Details on how to do that are lower down on this Help page.

 

Options for the Standard and Local Network Versions of ACCOUNTS

 

Another option that is available for only these versions is:

 

/P "ProgramEntryPassword"

 

Using that options causes the supplied program entry password to be automatically entered into the Standard or Local Network Version's in login window, and the OK button on that window to be clicked, thus doing an automatic login, as long as it is correct of course.

 

This could be added to a copy of your icon for ACCOUNTS, renamed appropriately, to do an automatic login. Details on how to do that are lower down on this Help page.

 

Please be aware that if you do add this option to an additional icon for starting ACCOUNTS, you are essentially giving away any security on the program enforced by requiring the entry of the program entry password. So we would strongly encourage you to only consider using this option on a secure computer, not accessible to anyone that you don't wish to have access to your ACCOUNTS data!

 

Also there's one tricky issue: if by any chance your program entry password includes a double quote character, that must be changed to two double quote characters, within the double quotes surrounding it, after /P. So for instance if your program entry password is a234"B567, the option you would use would be:

 

/P "a234""B567"

 

Options for the OnDemand Version of DONATION

 

You can add options to the existing command line for starting the OnDemand client program, in the Properties of the icon used for it. Specifically, if you wish to supply your username and password and not have to do a login every time, add this at the end of the command line:

 

-u username -p password

 

If you do that, you will have to change the command line arguments every 180 days, when the OnDemand system requires you to change your password.

 

How to Add Options to a Copy of your ACCOUNTS Shortcut Icon

 

If you do want to create an alternate version of your ACCOUNTS icon with certain options listed above added to it, unfortunately it is not as easy as one might hope. Copying and pasting right on the Desktop just causes problems and creates copies that aren't working shortcuts. Instead, please follow these steps:

 

1.Open Computer or Windows Explorer.

2.Navigate to where the ACCOUNTS program files are located - most commonly C:\Program Files\ACCOUNTS, or on 64-bit computers C:\Program Files (x86)\ACCOUNTS.

3.Find accounts.exe there, right-click on it, and pick Send To Desktop (create shortcut) from the popup menu.

4.Go to your Windows Desktop. There will now be two icons for ACCOUNTS.

5.Right click on the one you suspect is the new one (generally, the one added at the end of your existing icons) and pick Properties from the popup menu.

6.Change to the General tab in the window that comes up, and make sure that under Location, it says C:\Users\yourloginname\Desktop. If it says C:\Users\Public\Desktop, that is the original icon installed by ACCOUNTS, and you need to exit that window, find the other icon, right-click on it and pick Properties.

7.Still on that General tab, in the editable field at the top for the name of the shortcut, change it to something identifying, like say ACCOUNTS with Password if this is for the purpose of adding pro-specifying your program entry password with the /P option.

8.Switch to the Shortcut tab. In the editable field for Target, get your cursor to the end of what is there, add a space, and then add whichever options you want to add.

9.Click OK at the bottom to save your changes.

10.Test both icons to make sure they do what you want!

 

If something gets messed up and your icons don't work, your best option to fix things is to just re-download and install the desired version from the DOWNLOAD page on the website, https://software4nonprofits.com/download-all/, on top of what you have now. That will restore a normal desktop icon for ACCOUNTS, in C:\Users\Public\Desktop.

 


This topic was last edited on Apr 28, 2022