Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

You must run the Object Repository Synchronizer to download the latest objects any time you add or update an object in the database server's Object Repository. See "Step 5: Run Running the Object Repository Synchronizer" on page 15 for  for instructions on how to run the synchronization utility.

 

Note

You should run the Object Repository Synchronizer after hours when no user is accessing the database.

...

Also, you can create a batch file and a Windows Scheduled Task that will automatically run the utility on a specified schedule.

When you run AptifyObjRepSynchronizer.exe, a dialog opens that walks you through the process for downloading objects. However, the Object Repository Synchronizer also supports a series command line arguments. Specifying a series of arguments on a command line suppresses the dialog and runs the tool in the background. The command line arguments are as follows (and shown in the figure below):

Image Removed

  • /? or /Help: Displays the help screen shown in the figure .
  • /Server=[Aptify Database Server]: Use this argument to specify the Aptify database server. Note that rather than use this command line argument, you can add the Aptify.Framework.LoginServices.AptifyLogin.Server key to the AptifyObjRepSyn-chronizer.exe.config file.
  • /EntitiesDB=[Database used to store Aptify's Entities Entity]: Typically, this database is APTIFY, which is already set in AptifyObjRepSynchronizer by default. Therefore, you do not need to use this command unless you have installed Aptify to a database other than APTIFY.
  • /UsersDB=[Database used to store user metadata]: Typically, this database is APTIFY, which is already set in AptifyObjRepSynchronizer by default. Therefore, you do not need to use this command unless you have installed Aptify to a database other than APTIFY.
  • /User=[Untrusted User Name]: If connecting as an untrusted user, such as sa, use this argument to specify that user. There is no command line argument to specify a trusted user account. Instead, set the Aptify.Framework.LoginServices.AptifyLogin.Trusted key to true in the AptifyObjRepSynchronizer.exe.config file to use a trusted login.
  • /pwd=[password]: If you specified an untrusted user using the /user argument, specify the password for that untrusted user. Note that the password will appear in plain text. There is no command line argument to specify a trusted user account. Instead, set the Aptify.Framework.LoginServices.AptifyLogin.Trusted key to true in the AptifyOb-jRepSynchronizer.exe.config file to use a trusted login.
  • /CacheFolder=["Aptify Folder Location"]: The path for the Aptify 5.0 files. Typically, this is C:\Program Files\Aptify 5.0. When using this argument, enclose the path in quotation marks.
  • /RepositoryUserID=[ID of User]: Use this argument to specify the ID of the user for whom the synchronization utility runs. (This is the equivalent to the Repository User selection you would make in the tool's user interface.)
  • /s: This argument suppresses the synchronizer's user interface.
  • /c: This argument, introduced with Aptify 5.0 Service Pack 2, specifies the Sync Repository Objects record that contains the collection of objects to download (or not download). With this option, only the objects within the Sync Repository Objects record that are marked as Downloadable will be downloaded. See the Aptify 5.0 Service Pack 2 Release Notes for more information about this feature.

By using the command line arguments listed above and modifying the AptifyObjRepSynchro-nizer.exe.config file, you can create a batch file and a Windows Scheduled Task that automatically stops any applicable services, runs the synchronization utility, and restarts the services on a pre-determined schedule without requiring user intervention.

 

Note

When specifying multiple command line arguments separate each argument with a space.

 

See Automating the Synchronization Process for more information.

The procedure below describes how to create a scheduled task on the terminal server to automate the execution of the synchronizer using a trusted user account (the user specified in the Scheduled Task).

  1. Log in to the client computer using a Windows account that is an administrative user on the computer (i.e., the user is in the computer's Administrators group).
  2. Identify the location of the Object Repository Synchronization Utility on the computer. See "Step 5: Run Running the Object Repository Synchronizer" on page 15 for  for details.
  3. Open the AptifyObjRepSynchronizer.exe.config file with Notepad.
  4. Locate the Aptify.Framework.LoginServices.AptifyLogin.Trusted key and change the value from false to true.
    • With this setting, the synchronizer will use the trusted user account for the Windows domain user specified in the Scheduled Task. This eliminates the need to use the /User and /pwd command line arguments.
       
  5. Add the following line above the Aptify.Framework.LoginServices.AptifyLogin.Trusted key to connect to your organization's Aptify database server only:

    No Format
    nopaneltrue
    <add key="Aptify.Framework.LoginServices.AptifyLogin.Server" value="[Enter Your Database Name]"/>
     


    • This eliminates the need to use the /Server command line argument.

       Modify Synchronizer Config File
      .
  6. Save and close AptifyObjRepSynchronizer.exe.config.
  7. Create a batch file that performs these steps:
    • Stop any applicable services using the NET STOP "[service name]" command as required by your network and terminal server configuration. However, do not stop the Aptify Object Repository Service, since the Synchronizer uses this service.
    • Run the synchronization utility for a specified repository user in silent mode with this command:

      "[file path]\AptifyObjRepSynchronizer.exe" /s /CacheFolder="[Location of Aptify Files]" /RepositoryUserID=[UserID]

      For example:
      "C:\Synchronizer\AptifyObjRepSynchronizer.exe" /s /CacheFolder="C:\Program Files\Aptify 5.0" /RepositoryUserID=24

    • In general, specify the same user that you would select if you were to run the tool manually. Be sure to include the quotation marks as specified.
    • Note that if you configured AptifyObjRepSynchronizer.exe.config to specify a server and a trusted user, then you only need to specify the /s, /Cache-Folder, and /RepositoryUserID command line arguments.
    • Start any services that you stopped using the NET START "[service name]" command.
       
  8. Click Start > Administrative Tool > Task Scheduler> Open a Basic Task to open the Task Scheduler dialog.
  9. Find and select the task folder from the console tree in which you want to create the task.
    • You can also create a new task folder by right-clicking an existing task folder (or the Task Scheduler Library Folder to create a root task folder) and selecting the New Folder option.
  10. From the Actions menu, select the Create a Basic Task option.
  11. Enter a Name (such as Synchronize) and Description for the task.
  12. Click Next to continue.
  13. Specify the frequency for how often the task should run.
  14. Click Next to continue.
  15. Specify a start time when this task will be run and click Next to continue. Image Removed 
    • Note that you typically want to run this tool after hours if on a production network to ensure that no sessions are open when the task runs.

      Image Added
  16. Select Start a program as the action that you want the task to perform.
  17. Click Next to continue.
  18. In the Program/script field browse to (or enter) the location of the batch file you created (such as synchronize.bat).
  19. Click Next to continue.
  20. On the summary screen of the wizard, select the Open the Properties dialog for this task when I click Finish option and select Finish to complete the creation of the scheduled task.
  21. Enter the username and password for the trusted administrative user who will run this task, and click Next.
  22. On the General tab, change the user account as needed.
    • Typically, this is the user that you are currently logged in as. If you specify a different user, this user must also meet the administrative criteria specified in Step 1.
    • Note that the user account specified must have Log on as batch job rights in order to run a task without being logged in. See the Microsoft Task Scheduler Help for more details.

      Image Removed Image Removed



      Image AddedImage Added
  23. Select the Run whether user is logged on or not to ensure the task runs when the selected user is not logged into the terminal server.
  24. Select the Do not store password option to ensure the task only has access to local computer resources.
  25. Select the Triggers tab and adjust the recurrence schedule as needed.
  26. Select the Settings tab and modify the scheduled task's other settings as needed.
  27. Click OK to save your changes and close the dialog. Re-enter the user credentials for the task, if prompted. Image Removed 

    Image Added