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. It file can be naturally 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 group.

To this end it is possible to 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. This can be accomplished 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.

Having downloaded the zip file, open it 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 press OK to open it.

Create a new task (open the Action menu and choose 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 are actively using the system at the time of reinitialization may lose connectivity.

Choose actions to run

Now, go to the Actions tab and choose which actions to run.

You will 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.

Click 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). Then click on OK to store the action.

 

Click on New to create another action.

optfile_stop_licsrv.PNG

In the Action list, choose Start a program and type in net in the Program/script field. Then add stop fwlicsrv in the arguments field. This will stop the license server before we restart it in the next step to reload the license and .opt file.

Click on OK to store the action.

 

Click on New to create another action.

optfile_stop_licsrv.PNG

In the Action list, choose Start a program and type in net in the program/script field. Then add start fwlicsrv in the arguments field. This will start the license server again and load the license and new .opt file.

Click on OK to store the action.

 

The list of actions should now look like this:

optfile_allactions.png

Click 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.