Skip to main content
Documentation & User Guides | Fotoware

Scheduling automatic updates of users in a license server .opt file

The .opt file is used to control which named users are granted access to check out user licenses for FotoStation clients from a Fotoware license server. The file can be created manually (you can download a sample opt file here), but in larger environments, it makes better sense to be able to automatically create a file based on an Active Directory (AD) group.

To this end, you can download an option file generator from the Fotoware Download Center that can be run on the console of the Active Directory controller. This will output a ready-made .opt file that contains all the user names of the group that was specified.

Because AD groups change it can be practical to schedule the option file generator to run periodically to reflect any changes that have occurred in the AD structure. You can do this using Scheduled tasks on the domain controller. Then, a script can be created to copy the output .opt file to the server running the Fotoware License Server before that service is restarted to reload the license file and associated users from the .opt file.

The procedure for doing this is outlined below, with the assumption that the Fotoware License Server runs on the AD controller.

Download the option file generator

Download the option file generator from the Fotoware Download Center.

Open the downloaded file generator and store the files (exe file and howto-readme file) in the same folder as the license file is stored in on the license server. Typically, this is in the Fotoware License Server folder in C:\Program Files (x86)\Fotoware\License Server xx.x

Configure Task Scheduler

Start the Task Scheduler: Hit the Windows key and type Schedule tasks, then select OK to open it.

Create a new task (open the Action menu and select Create task...)

 

Schedoptfile_General.PNG.PNG

Name the task on the General page and set it to run whether a user is logged in or not. Also, set the user account under which the task will be run.

Define a schedule

Next, go to the Triggers tab and create a new trigger:

Schedoptfile_Trigger schedule.PNG.PNG

Choose to run the task on a schedule, for example, daily at a time when nobody is actively using the system. The task will be configured to reinitialize the license service, so any users who are actively using the system at the time of reinitialization may lose connectivity.

Choose actions to run

Go to the Actions tab and choose which actions to run.

You need to add two actions: one that runs fwOptGen.exe to update the .opt file with the names of the users in the AD group you specify. The other action runs the license server utility with a flag that reloads the license and opt file.

Select New to create the first action.

Schedoptfile_Run optfilegen.PNG.PNG

Choose to start a program and then locate the fwOptGen.exe file that you copied to C:\Program Files (x86)\Fotoware\License Server xx.x

In the Add arguments field, enter the name of the AD group from which to extract users for the .opt file surrounded by quotation marks. Also, set the working directory to the folder that contains the license file (usually the same folder as the license server program files). Select OK to store the action.

Select New to create another action.

optfile_stop_licsrv.PNG

In the Action list, select Start a program and enter net in the Program/script field. Add stop fwlicsrv in the arguments field. This stops the license server before you restart it in the next step to reload the license and .opt file.

Select OK to store the action.

Select New to create another action.

optfile_stop_licsrv.PNG

In the Action list, select Start a program and enter net in the program/script field. Add start fwlicsrv in the arguments field. This starts the license server again and loads the license and new .opt file.

Select OK to store the action.

The list of actions should now look like this:

optfile_allactions.png

Select OK to store the action. If any of the settings need to be changed later, the task can be found by clicking on the Task Scheduler Library node in the left panel of the Task Scheduler application.