QUESTIONS:
1. I log in to multiple instances of Salesforce and would like to have different "login profiles" for each. Can this be done?
2. I have changed my file paths in DemandTools but it doesn't always retain them because the drives are not always immediately available upon login. How can I ensure that when I log in I am pointed to the correct file paths?
3. I have certain options I only want to be enabled for a scheduled job(s), is there a way to save these options to be passed to the scheduled job?
ANSWER:
All of the above can be accomplished by exporting your DemandTools registry settings to a .reg file. This file can then be used as your DemandTools Startup icon, invoked via a .bat file, and passed as a parameter to a DemandTools Windows Scheduled Task or used in JobBuilder.
Registry files store the login/proxy information as entered on the login screen and all the DemandTools options set under "General Settings" and "File Paths.” Therefore, this file can be used with scheduled jobs when only certain features should be enabled for a particular scenario, e.g.:
- Invoking a Lead Assignment Rule
- Sending User Emails
- Using a Lower Batch Size
Export the Registry Settings (create a DemandTools .reg file):
- How to export the .reg file will depend on the version of DemandTools you are running.
- DemandTools 2.60.90 and above:
- Login to DemandTools
- Auto-login must be checked on the login screen (Oauth -check the auto-login checkbox on the login screen before logging in, API - check the save password & auto-login on the login screen before logging in)
- Click on Edit->Options->File Paths tab
- Click the Export Registry Settings button in the lower left, name and save the file. The file can be saved wherever is preferred on the PC but may want to save on the Desktop for quick access.
- Login to DemandTools
- DemandTools 2.60.81 and below:
- Log into DemandTools
- Click on Edit->Options->General Settings tab
- Hold down the alt key (on your keyboard) and right-click in the empty space at the bottom of the options screen, between the "Proxy Server Settings" and "OK" buttons. NOTE: This is a hidden feature so users need to click on the correct spot for this option to be shown.
- Click the Export Registry Settings button, name and save the file.
- The file can be saved wherever is preferred on the PC but may want to save on the Desktop for quick access.
Using the Registry File to Open DemandTools:
- Right-Click on the file and ensure that it opens with DemandTools.
- This is set by clicking on "Open With" or clicking on "Properties."
- Users can now click directly on this .reg file to launch DemandTools with the saved settings.
To create the .bat file:
- If preferred, a .bat file can also be created which launches DemandTools by referencing the .reg file.
- Open Notepad and enter the following information, in this example, the .reg file was saved as DemandToolsProduction .reg
- The complete file path will look similar to this: start /max /d "C:\Program Files (x86)\DemandTools" DemandTools.exe C:\Users\Laurie\Desktop\DemandToolsProduction.reg
- This portion: start /max /d will be constant for every user
- This portion: "C:\Program Files (x86)\DemandTools" should reference the location of the DemandTools .exe file on your machine
- This portion: C:\Users\Laurie\Desktop\DemandToolsProduction.reg should reference the location of the .reg file; it will vary based on where the file was saved on your PC
- Once the above is complete, save the file as a .bat. Be sure to use the extension .bat
- NOTE: If the path for the .reg file contains spaces, enclose in double quotes.
Registry file use in Scheduling:
- To use the .reg file with a scheduled job simply add it as a parameter AFTER the DemandTools.exe, e.g.:
"C:\Program Files (x86)\DemandTools\DemandTools.exe"
"C:\Users\Laurie\Desktop\DemandToolsProduction.reg"
"C:\Users\Laurie\Desktop\WeeklyLeadInsert.MExml" "LeadWorksheet"
NOTE: When launching DemandTools using the .reg file, the default Registry Settings will be updated to the settings in the file, and will be used for the next login. Therefore, when using this option it is highly recommended that the standard DemandTools shortcut icon is removed and for there to be a separate .reg file for the primary org the user typically accesses, so that can be used for "standard" logins.