# Invoking WinVN

WinVN is typically invoked by double-clicking on an icon in Program Manager/Start Menu; however, WinVN can be invoked via the File/Run... menu command or by any other mechanism that can be used to start a Windows program.

When WinVN starts, it looks for two files: WINVN.INI, which contains configuration and customization information, and NEWSRC. By default, WinVN looks in the current directory for these files, then the user's AppData folder. However, there are ways of specifying alternate locations for these files.

WINVN Command Line

You can pass command line arguments to WinVN to tell it where to locate your WINVN.INI and NEWSRC files. The format of the command line is:

WINVN IniFile NewsrcFile

or

WINVN Path

In the first case, WinVN will take IniFile to be the filename--including path specification--of the initialization file. If IniFile is just a directory name, WinVN will look for the file named WINVN.INI in that directory. Similarly, WinVN takes the second argument, NewsrcFile, as a filename for the news history file. If NewsrcFile is just a directory name, WinVN will look for the file named NEWSRC in that directory.

If, as in the second case, WinVN is run with one argument, WinVN will use it as a directory name for both the WINVN.INI and NEWSRC files.

(Actually, this is a simplified description of how WinVN searches for these files. For a complete description, curious readers are referred to the source code file ini-news.c.)

WINVN Environment Variable

Alternatively, you can set an environment variable to tell WinVN where to look for these two files. Set the environment variable WINVN to the directory in which both the WINVN.INI and NEWSRC files can be found. For instance:

SET WINVN=F:\FRED

The WinVN environment variable must be set before windows starts up. Every DOS shell within Windows maintains its own seperate copy of the environment. Windows only looks at the environment that existed at startup.

On a PC LAN, an administrator can add code in the login script to set the WINVN environment variable to the unique location of a user's WINVN.INI file (on a network drive). For those using multiple news servers, you can have multiple icons from within Windows and they have command line arguments set.

Summary of WinVN's Search for WINVN.INI and NEWSRC

Winvn uses the following search mechanism to find the WINVN.INI file:

Command line (e.g., n:\winvn\winvn.exe u:\winvn.ini u:\newsrc)

WINVN Environment variable

Application startup directory

User's AppData/WinVN folder

Windows Directory

Windows System Directory

DOS search path