Skip to main content
Windward

AutoTag Config Settings

What config file?

This is a mess but don’t blame us, blame Microsoft. The .NET team says config settings need to go in winword.exe.config (using Word as an example). The MS Office team recommends that you don’t touch the winword file; In fact newest versions of Office don't have a .config that you could edit! Therefore use AutoTagYYYY.dll.config (where YYYY is the 4 digit year).

 

And the result is… sometimes it pulls from one, sometimes from the other. So if you need to set config settings for AutoTag, first try one, then try the other. Once you know which one works, that should work consistently for you. (Try the AutoTagYYYY.dll.config one first.)

Where are the files?

Before we get started, know that you may have to exit and restart all your MS Office programs (occasionally even Outlook) for changes to take effect. You may also need to restart your system for some changes.

C:\Program Files\Windward Studios\AutoTag

The AutoTag  .config file needs to be located where the AutoTagYYYY.dll is installed. This is normally in C:\Program Files\Windward Studios\AutoTag.

  • In that folder you may see a number of files such as AutoTag2007.dll, AutoTag2010.dll, & AutoTag2013.dll. (the most recent is always used. but you may have older versions that are still there.)
  • The file used when you run Office is based on the version of Office. So if you are running Office 2010, you are using AutoTag2010.dll.
  • Office 2016 still uses AutoTag2013.dll as nothing changed between those versions.

My folder doesn't list AutoTagYYYY.dll.config anywhere

If you need to create the .config file, start with a new text document.

  • Copy the config file listed below and make and adjustments or additions, then save the file as "AutoTagYYYY.dll.config"
  • Next move that file to C:\Program Files\Windward Studios\AutoTag

Winword.exe, excel.exe, and powerpnt.exe config files

To make changes to the Office config files, you need to go to the Office folder:

  • 32 bit: C:\Program Files (x86)\Microsoft Office\Office15
  • 64-bit: C:\Program Files\MicrosoftOffice## (where the ## is the internal number for that version of Office), or C:\Program Files\Microsoft Office\root\Office16 for 2016.

 

Your config filename must match your dll filename. So in that folder, if you are running Office 2013, create the file "AutoTag2013.dll.config." 

 

In 2007 and older, you may need to create a new .config for each MS Office Program that you are using.

As with the AutoTagYYYY.dll, the MS Office config file is the same name with a .config added. So for Word it is winword.exe.config. The MS Office programs are named:

  • excel.exe
  • powerpnt.exe
  • winword.exe

 

The Config File

First the config file, then below we’ll walk through each part.

 

<?xml version="1.0"?>
<configuration>
            <configSections>
                <section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler,log4net, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a"/>
                <section name="AutoTag" type="System.Configuration.NameValueSectionHandler, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
                <section name="WindwardReports" type="System.Configuration.NameValueSectionHandler, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
            </configSections>
            <log4net>
                <appender name="RollingFileAppender" type="log4net.Appender.RollingFileAppender">
                    <param name="File" value="C:/temp/AutoTag.log"/>
                    <param name="AppendToFile" value="true"/>
                    <param name="MaxSizeRollBackups" value="2"/>
                    <param name="MaximumFileSize" value="100KB"/>
                    <param name="RollingStyle" value="Size"/>
                    <param name="StaticLogFileName" value="true"/>
                    <layout type="log4net.Layout.PatternLayout">
                        <param name="ConversionPattern" value="%d [%t] ac.server %-5p %c - %m%n%exception"/>
                    </layout>
                </appender>
                <root>
                    <level value="DEBUG"/>
                    <appender-ref ref="RollingFileAppender"/>
                </root>
            </log4net>
            <AutoTag>
                <add key="sql.parameters" value="parameters"/>
            </AutoTag>
            <WindwardReports>
                        <add key="check.for.ole.images" value="false"/>
                    </WindwardReports>
            <appSettings>
                <add key="sql.timeout" value="240"/>
            </appSettings>
</configuration>

 

Log4net

Log4net is a standard library AutoTag uses for logging. If Windward asks you to create a log file, you need the log4net part added. The critical part of this is the location of the log file – it must be a folder you have access to. The best location is c:\Users\{your username}\documents as you generally have write access to that folder. If you use a location that Word cannot write to, you will receive no log file.

WindwardReports

If you are setting a property that is for the engine (AutoTag has a copy of the engine embedded in it to generate reports), then you set that in the WindwardReports section. These properties are all documented in the .NET engine properties page.

AutoTag

The AutoTag specific settings are documented below and all go in the AutoTag section.

sql.parameters

Allowed values: substitution, parameters, or parameters.always

Default: parameters

The method used to substitute parameters in a select.

appSettings

Settings in the kailua.dll library go in appSettings. This occurs because Kailua is a distinct library and not an AutoTag-only component.

db2-select-*

The DB2 database is actually several very different programs depending on the O/S it is running on. Therefore, we provide a means to override the selects used to query the metadata. If you need to do this, contact support; but for reference, here are the keys for the settings:

  • db2-select-schema
  • db2-select-tables-system
  • db2-select-tables-user
  • db2-select-tables-user-owned
  • db2-select-tables-all
  • db2-select-views-system
  • db2-select-views-user
  • db2-select-views-user-owned
  • db2-select-views-all
  • db2-select-columns
  • db2-select-procedures-system
  • db2-select-procedures-user
  • db2-select-procedures-user-owned
  • db2-select-procedures-all
  • db2-select-parameters
  • db2-select-pk-fk

meta-use-getschema

Allowed values: true, false

Default: false

For an unknown ADO.NET database vendor only, it will use DbConnection.GetSchema() to get the metadata. If set to false it will use the standard SQL queries to request the metadata.

sql.timeout

Allowed values: 0 < number < 1200

Default: 30 (depends on ADO.NET connector implementation)

The timeout for ever SQL query.

strip-conditions-on-schema-select

Allowed values: true, false

Default: false

If true will strip conditions from a select before using it to get the metadata of that select (columns, etc.).

 

Registry

 

Only the <AutoTag> and <WindwardReports> settings can be placed in the registry.

 

You can set them in HKEY_CURRENT USER or HKEY_LOCAL_MACHINE. AutoTag will first look in the config file, then in HKCU, then in HKLM for any property.

 

AutoTag: HKEY_CURRENT_USER\Software\Windward Studios\Auto Tag

 

To set values in the registry, use the key= from the config setting. The data is always set as a string, even if it is fundamentally a number (because all config file values are strings).