Command Line Arguments and Options for DONATION

<< Click to Display Table of Contents >>

Navigation:  INSTALLATION INSTRUCTIONS >

Command Line Arguments and Options for DONATION

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

 

Normally you start DONATION by double-clicking on its icon on your Windows Desktop. In that case, normally it starts by just running the program's executable file donation.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.

 

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

 

Filename Arguments on the Command Line

 

DONATION 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 DONATION 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 DONATION are:

 

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

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

 

So for instance what actually happens when you double-click on a backup file named DONATION-2018-10-23.11.04.50.DB.GBK, 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\donation.exe" "C:\path to backup file\DONATION-2018-10-23.11.04.50.DB.GBK"

 

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

 

Options for All Versions of DONATION

 

The only option 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 DONATION 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.

 

Options for the Standard and Local Network Versions of DONATION

 

The option /E extension can be used when you have multiple databases that you can switch between with the Database Switch Databases menu option. Adding it on the command line does an automatic switch to the database with that extension in the Switch Databases window.

 

So for instance if your databases have the extensions DB and DB2, using /E DB2 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.)

 

Some users with two or more databases may want to make copies of their icon for DONATION, 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.

 

One other option 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 DONATION, 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 DONATION, 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 DONATION 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 DONATION Shortcut Icon

 

If you do want to create an alternate version of your DONATION 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 DONATION program files are located - most commonly C:\Program Files\DONATION, or on 64-bit computers C:\Program Files (x86)\DONATION.

3.Find donation.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 DONATION.

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 DONATION, 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 DONATION DB2 Login if this is for the purpose of logging in to the database with the extension DB2, with the options /E DB2.

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 DONATION, in C:\Users\Public\Desktop.


This topic was last edited on Apr 28, 2022