Copyright: Copyright 1993-1995 Anchor Software, Inc.


WinPath Help Contents
 Help Contents

Special Notes for the shareware version

♦	Introduction

Why?

History

Understanding WinPath

♦	The Basics:

Changing your PATH

Setting an Environment Variable

Using WinPath as a Windows Batch Language

♦	Reference Information

Interface Guide

Command Reference

Programming Reference

Ini Reference

Utilities Reference

Error Messages

Compatibility

♦	Other Important Stuff:

Setting Variables on Windows/WinPath Startup

Creating Icons to Make Environment Changes

WinPath and DOS boxes

♦	Technical Support and Customer Service


Shareware Note
This is the help file for the shareware version of WinPath. It contains information on using WinPath and its companion uilities, WinExec, WinSet, and EnSync. If these uilities were not included in the zip file you downloaded, GO ANCHOR on CompuServe and download them from our tech support section.


Why?

If you are reading this you have probably heard or read before the pros and cons of using environment variables in Windows, especially the PATH variable. For instance, all you have to do is set the properties of the icon of the application and you don't need to have the program directory in the PATH. And since you are reading this you probably have determined that the statement above is not necessarily true for all cases nor is it as convenient to manage as you would like.

The fact of the matter is that although it is possible for developers to build their Windows applications without dependence on the PATH or other environment variables, many applications, and Windows itself, do rely on the DOS environment. And because of that so do you. After all, most of the programmers now coding for Windows were, just a few years ago, or just a few minutes ago, writing code for DOS. Old habits are hard to break.

 For the last ten years or so, most of us have become skilled at using DOS. Now we are making the inevitable move to Windows. Some of us a little at a time, others in all-out culture shock. We all take with us the knowledge that, behind all of the graphics and under all the sophisticated memory management, there still lies DOS.

An inherent part of DOS is the environment which includes the PATH and other frequently used environment variables. DOS provides us with nice utilities to access and modify these environment variables to our liking with PATH and SET.

The problem is that, although Windows provides some nice ways to access and use the environment variables, Windows provides no way to modify these variables once the Windows environment has been started. If you need to modify your PATH or set an environment variable, you have to exit Windows, go back to DOS, make the changes, and then restart Windows. Not terribly efficient, is it?

There are many times when the access to these variables, or lack thereof, becomes an issue.  We have removable media and/or networks in which applications come and go. New CD-ROM and drive cartridges are mounted. And drive letters are redirected to a variety of network services.

Additionally, we may run into a snag when we have DLLs with conflicting names. Since Windows searches the DOS PATH to find DLLs, even if your DLLs are in different directories, problems can arise depending on the order of the directories in the PATH.

Furthermore, there are many power users who don't necessarily want to give up the complete access to the DOS environment— merely out of principle.

After encountering the problems mentioned above and many hours painstakingly researching, writing, and debugging code for Windows, we are happy to bring you WinPath, the logical extension of the DOS PATH and SET commands for use in the Windows environment.

We have striven to keep the memory and other resources requirements of WinPath to a minimum while keeping functionality to a maximum, including traditional point and click control, keyboard control, command control, command line control, and DDE control. We have also tried to extend its usefulness with companion utilities (EnSync, WinExec and WinSet) that help fill the void between DOS and Windows by letting you take advantage of DOS's batch language with Windows applications.

So whether you are a network administrator, corporate developer, or just a serious Windows user, we're sure WinPath can prove valuable to you.

See Also

History


History

WinPath has grown since its humble beginnings. It was originally intended to simply provide a way to change the PATH without getting in and out of Windows.

WinPath was released in August of 1993 and to our delight was recommended by Brian Livingston in InfoWorld, November 1, 1993.

"Now a utility called WinPath makes it possible to change the Path or any other variable from within enhanced-mode Windows 3.1"

A few months later, in March of 1994, we released EnSync. Once again, Brian Livingston and InfoWorld came through and recommended both EnSync and WinPath on March 22, 1994.

"Now the authors of WinPath, Anchor Software, have come up with something even better. For the first time, you can now change the Path in a single DOS session under Windows - and have that change take effect in Windows and in any other DOS sessions that are running or that you start later.

This may sound easy, but it's actually a tremendous breakthrough that can give you great flexibility."

This was followed by favorable reviews in other industry journals.

Since then, WinPath and EnSync have been distributed internationally and are being used by a wide variety individuals and major corporations in applications from simple path changes to customized network login scripts.

Today these utilities help to fill the gap where Microsoft kindof "dropped the ball" and provide a way to extend the DOS batch language so that it can be used with Windows. We figure that there are lots of very imaginative and creative problem solvers that could use these tools. We hope that you are one of them.

See Also

Understanding WinPath


Understanding WinPath

WinPath combined with the included utilities, EnSync and WinExec, is a powerful tool for bridging the gap between DOS and Windows programs. By providing access to a synchronized set of environment variables from anywhere within Windows and giving you the ability to run Windows programs from within a DOS box, WinPath can help you make things work in Windows like they never could before.

Using WinPath, you can change the environment for all running Windows applications, including Windows Program Manager or any other Windows shell. This can be done using the WinPath command line, the WinPath dialog, the DOS SET command or a batch file, the DDE interface, or the WPENV.DLL. So, no matter where you need to access the environment, you can.

Using a technique we call "spoofing" WinPath fixes up portions of Windows and each DOS box so that they share a common environment. This requires the use of some conventional and some not-so conventional programming, but, we think the results are pretty amazing.

WinPath is typically run as a minimized or hidden application from the Windows startup group so that it's features are always available. When it is terminated, the environment is restored to the state that existed before it was started.


EnSync Definition
EnSync is a utility for synchronizing the environments of DOS boxes with the Windows environment.


WinExec Definition
WinExec is a utility used to start Windows programs from a DOS box command line or batch file.


Changing Your Path

Its easy to make changes to your Path with WinPath. Just use the plus(+) and minus(-) to add and remove directories.

Let's say you want to add C:\WINUTILS to your path:

1.	Type +C:\WINUTILS in the WinPath dialog

2.	Press <Enter> or Click the OK button.

3.	It's that easy!

To remove it:

1.	Type -C:\WINUTILS

2.	Press <Enter> or click the OK button.

3.	Thats it!

See Also

PATH Mode


Setting an Environment Variable

To set an environment variable with WinPath just type it in.

Let's add the variable WINPATH=COOL!

1.	Click the Mode button to change to SET mode

2.	Type WINPATH=COOL!

3.	Press <Enter> or click the OK button.

To delete a variable

1.	Click the Mode button to change to SET mode

2.	Select the variable you want to delete from the list.

3.	Click the Del Variable button.

To edit a variable

1.	Click the Mode button to change to SET mode

2.	Double-click on the variable you want to edit.

3.	Type your changes to the variable.

4.	Press <Enter> or click the OK button.

See Also

SET Mode


Using WinPath as a Windows Batch Language

By using WinPath along with EnSync and WinExec you can use DOS batch files as a batch language for Windows. This means that you can create new and exciting batch programs that work with Windows programs and multiple DOS boxes. You can also continue to use use any of your old batch files that make modifications to the environment and get the results you expect.

See Also

Using DOS Batch Files

EnSync Demo Files

WinExec Utility


Utilities Reference

WinExec 	Run Windows Programs From the DOS Prompt

EnSync	The DOS box Environment Synchronization Utiliity

WinSet 	Set Windows Environment Variables from the DOS prompt

Vpath 	Drag and Drop Path Editor

ChkPthW 	Check Your Path for Conflicts


WinExec
WinExec - Run Windows Programs From the DOS Prompt

WinExec is a companion utility for WinPath that can be used in a DOS batch file to execute Windows programs from a DOS box.

Usage:	WinExec [switches] command line

Example:	WinExec /n /q NOTEPAD README.TXT

The example would load README.TXT into NOTEPAD as a minimized application.

Switches:	/n	Load program as minimized

/x	Load program as maximized (full screen)

/h	Load program as hidden (invisible)

/q	Suppress banner display

Return codes:

WinExec will return the Windows API return codes in ERRORLEVEL. These codes are listed below.

Errorlevel	Description

0  	System was out of memory, executable file was corrupt, or relocations were invalid.

2	File was not found.

3	Path was not found.

5	Attempt was made to dynamically link to a task, or there was a sharing or network-protection error.

6	Library required separate data segments for each task.

8	There was insufficient memory to start the application.

10	Windows version was incorrect.

11	Executable file was invalid. Either it was not a Windows application or there was an error in the .EXE image.

12	Application was designed for a different operating system.

13	Application was designed for MS-DOS 4.0.

14	Type of executable file was unknown.

15	Attempt was made to load a real-mode application (developed for an earlier version of Windows).

16	Attempt was made to load a second instance of an executable file containing multiple data segments that were not marked read-only.

19	Attempt was made to load a compressed executable file. The file must be decompressed before it can be loaded.

20	Dynamic-link library (DLL) file was invalid. One of the DLLs required to run this application was corrupt.

21	Application requires Microsoft Windows 32-bit extensions.

The priority of WinPath's WinExec functionality can be modified by setting WXPriorty in the ANCHOR.INI file. WXPriority can be set to any number from 1-1000 and specifies the delay in 1/10th second increments that WinPath will yield between servicing WinExec requests. Setting to 1000 or higher effectively disables WinExec functionality.

See Also

Using DOS Batch Files


WinSet
WinSet - Set Windows Environment Variables from the DOS prompt

WinSet is a companion utility for WinPath that permits you to easily set Windows environment variables. The program works both as a native Windows Application as well as a DOS program. This means it can be used from Windows or a DOS box, whichever is most convenient. It has been designed specifically for individuals who are creating scripts using a Windows batch language, Visual Basic, DOS batch files, or some other tool.

Together the command line interfaces of WinPath and WinSet permit you to completely control the Windows environment with minimal effort. It is not necessary to write the code to establish DDE conversation with WinPath, since simple command line parameters are supported.

WinSet works just like the DOS SET command, that is, it is used in exactly the same way to set and remove environment variables.

To set an variable:	WinSet varname=varvalue

To remove a variable:	WinSet varname=

The syntax is the same whether you are using WinSet from DOS or Windows. WinPath must be running before you can use WinSet.

A VB code fragment:

Sub Command1_Click ()

    X% = Shell("WinPath.exe +C:\anchor", 1)  ' Shell WinPath.

    X% = Shell("WinSet.exe VAR1=Value1", 1)  ' Shell WinSet.

    X% = Shell("WinSet.exe VAR2=Value2", 1)  ' Shell WinSet.

    X% = Shell("WinSet.exe VAR3=Value3", 1)  ' Shell WinSet.

End Sub

A DOS batch code fragment:

   WinSet PATH=%PATH%;C:\anchor

   WinSet VAR1=Value1

   WinSet VAR2=Value2

   WinSet VAR3=Value3

DOS WinSet is not case sensitive and permits you to add or remove lowercase environment variables. Windows WinSet depends on WinPath's Lowercase ini file setting to access lowercase variables.


ChkPthW
ChkPthW - Check Your Path for Conflicts

This program will locate conflicts  between BAT, COM, and EXE files, as well as DLLs and VBXs. Each detected conflict will  be displayed with its location, size, and date. It is intended to help you determine from which directory a particular program is loaded.This information will allow you to take corrective action if necessary by renaming or deleting files or changing your PATH,


VPath
Vpath - Drag and Drop Path Editor

VPATH functions as a DDE client front-end to WinPath, and was written in Microsoft Visual Basic Version 3 to demonstrate the powerful DDE server capabilities of WinPath. When VPATH is run, it determines whether WinPath is running and, with the user's approval, will launch WinPath if it was not running.

VPATH presents the following dialog box to the user :

The left window lists the current path. The right window is a standard directory box with a drive select box underneath.  Directories are added to the path by dragging with the left mouse button from the directories list and dropping on the path list. They are inserted into the path before the directory they are dropped on. Directories can be removed from the path list by double-clicking them with the left mouse button. The position of directories in the path can be changed by dragging them up or down in the list and dropping them on the directory they are to be inserted before.

The Mode option allows the user to switch from editing the current path to editing a .PTH file of their choice. Editing is done on files in the same manner as it is for the path.

When in path edit mode, the changes are dynamic, that is they occur in real time. When the program is in .PTH file edit mode, the File open and save options are available so that more than one file can be edited during a session.

See Also

Using DDE


EnSync
EnSync - The DOS box Environment Synchronization Utility

"...For the first time, you can now change the PATH [or any other environment variable] in a single DOS session in Windows and have that change take effect immediately in Windows or any other DOS session that you are running or that you start later.

This may sound easy but it's actually a tremendous breakthrough that can give you great flexibility."

Brian Livingston - InfoWorld (3/21/94)

We couldn't have said it any better.

See Also

What is EnSync?

Using EnSync

EnSync DOS Boxes

EnSync Demo Files

EnSync /o - Dynamic synchronization

DOS SUBST command

Network MAP and USE commands

EnSync System Requirements

Using a DOS batch file to modify the Windows environment


EnSync DOS Boxes

When EnSync is used in a DOS box, the DOS box environment is synchronized with the Windows environment. This enables you to modify the Windows environment from a DOS box, using any DOS utility, even a DOS batch file. Any DOS command or program that can modify the active environment block can be used to update any DOS box or Windows environment variable. (SET, PATH, etc...)

This opens the door to extending DOS's batch language into Windows. Not for just batch programs but network login scripts like those used with LAN Manager or NetWare.

This is the most powerful feature of the WinPath set of utilities. This breaking down of the wall between the DOS box and Windows permits you to incorporate legacy DOS based applications into the Windows environment.

Additionally you can use the environment to communicate between DOS boxes and between DOS boxes and Windows applications!( kind of a poor-man's DDE)

See Also

Normal DOS Boxes

EnSync Demo Files

Using DOS Batch Files


What is EnSync?

EnSync is not a TSR and uses no additional memory. By using a technique we call DOS box "spoofing" EnSync fools each DOS box into using the same environment instead of the environment it inherited from Windows. As a result of this sharing, changes become immediately available in any DOS box that has been "EnSynced".  WinPath uses this same technique to sychronize the Windows environment with the DOS boxes.

See Also

Understanding WinPath


Using EnSync

To enable EnSync in a DOS box, simply type ENSYNC ON at the DOS prompt provided EnSync is in your path. (ENSYNC /q ON - for quiet mode).

A Windows PIF file and icon have been provided for your convenience. The PIF file makes use of the COMMAND.COM /k switch (MS-DOS 6 or above) that runs the specified program or batch file and then displays the DOS prompt. This PIF file can be edited by Windows PIF editor in order to customize the DOS session to your liking. (Users of MS-DOS 5.0 must enable EnSync manually or from a batch file.)

To see the result of EnSync you must launch two EnSync DOS Boxes. Then any modifications you make to the environment of one is immediately visible in the other.

To setup an icon for EnSync:

1. Create an Anchor Tools group in program manager

2. Add an icon for EnSync to that group.

a. Enter EnSync DOS Box for the Description.

b. Enter EnSync.pif for the Command Line

c. Set the icon to EnSync.ico.

See Also

EnSync /o - Dynamic Synchronization


EnSync Demo Files

Three batch files have been included in order to demonstrate the power afforded you by EnSync. The files DOSBOX1.BAT, DOSBOX2.BAT, and DOSBOX3.BAT are intended to be run simultaneously in separate DOS boxes. DOSBOX1 and DOSBOX2 batch files simply query the environment for variables TASK1 and TASK2 respectively. They then pass the value of TASK1 and TASK2 to the command line so that the command is executed. DOSBOX3.BAT drives DOSBOX1 and DOSBOX2 by setting TASK1 and TASK2 to DIR. This causes DOSBOX1 and DOSBOX2 to execute the DIR command. DOSBOX3.BAT will loop continuously driving DOSBOX1 and DOSBOX2. In a fourth DOS box you will use the command line to terminate the processes in the other three.

Follow the steps below to execute the demo.

1. Start four EnSync DOS boxes.

2. Minimize all other applications.

3. Double-Click your Windows background to access the Task Manager.

4. Click the Tile button on the Task Manager dialog so you can see all of the DOS boxes at the same time.

5. Run DOSBOX1.BAT in the 1st DOS box, DOSBOX2.BAT in the second, and DOSBOX3.BAT in the third.

6. In the fourth DOS box SET ES_DEMO=DONE to terminate the processes of the other three.


EnSync System Requirements

EnSync requires :

Microsoft MS-DOS versions 5.0, 6.0, 6.2, 6.21,6.22,

IBM PC-DOS 6.3, or

Novell DOS 7.0.

Access to Windows 3.1 environment requires WinPath 1.1 or above. This program has not been designed for use with Windows NT, Windows 95, or OS/2

See Also

Technical Support and Customer Service


EnSync Dynamic Synchronization
EnSync /o - Dynamic Synchronization

The /o switch is provided for use with DOS versions that are not directly supported. To use the /o switch type ENSYNC /o ON. This switch should only be used if normal synchronization fails. If you have problems with synchronization on a supported or unsupported version of DOS or command interpreter, please call us and we'll make every effort to add support for that version.

See Also

Technical Support and Customer Service


DOS SUBST command

The DOS SUBST command, when executed in a DOS box, only creates the substituted drive in the DOS box. You cannot access the drive letter created from the SUBST from Windows or from another DOS box.  If you must use the SUBST command in an EnSync DOS box, keep in mind that if you add the SUBST drive to the PATH, your other EnSync DOS boxes will now have an "Invalid Drive in Search Path".

See Also

Network MAP and USE commands


Network MAP and USE commands

Network MAP and USE commands function similarly to the DOS SUBST command, that is, they create a drive letter for use in accessing the network service. Depending on the type and version of your network software, the MAP or USE commands will only create the drive letter for the DOS box it was issued in. The drive letter may not be accessible from Windows or from another DOS box, hence, the "Invalid Drive in Search Path" error will occur if you add the drive to the PATH of an EnSync DOS box.

See Also

DOS SUBST command


Normal DOS Boxes

Modifications made to the path and environment by WinPath will be inherited by any subsequently started DOS session. A DOS session that is already running when changes are made will NOT be affected by the change, since that DOS session had previously inherited a copy of the environment.

Once in a DOS session, path modification and management can be done with DOS's traditional path command or some other utility.

Changes made to the environment in a normal DOS session have no effect on the Windows environment.

When you exit Windows back to DOS, any modifications made to the environment while in Windows will no longer be in effect. The environment is the same as it was before Windows was started. To retain environment changes on Windows exit, see RestoreOnExit in the INI file settings section.

See Also

EnSync DOS Boxes


Interface Guide

The main window contains five buttons. Four are located at the top of the window in a classic toolbar. All the buttons on the toolbar can be activated by the mouse or keyboard.

Also located on the toolbar is the mode indicator (PATH or SET) which determines the mode of action that will be taken when the OK button is clicked or the <ENTER> key is pressed.

The cursor appears in the command edit control area of the window located to the left of the OK button. This is where WinPath's commands to modify the path and environment are entered.

The majority of the window is made up of the status display area. This area of the window is used to display the status of the most recently executed command when in PATH mode. In SET mode, this area is used as a scrollable list of environment variables and their settings. Double-clicking on any item in the list copies the environment variable to the command edit control, where it can be edited.

At the bottom of the window is a status bar that provides the environment size, amount of free space, the size of the PATH, the maximum size of the PATH, and the number of directories in the path. When the amount of free environment space goes below 32 bytes, the free space section will display in red.

See Also

Guide to Menus

Guide to Buttons

Guide to Dialogs


Guide to Menus

WinPath's menu is made up of three main items, File, Settings...,  and Help.

The File menu has the following options.

Open and Save are used to access PTH files that contain path information or ENV files that contain complete environment information.

Open:	(Path Mode) lets you select a previously saved PTH file and modify the current PATH by adding, inserting, or removing the directories listed in the file. In addition you can replace the PATH with the directories listed in the file. An edit option is also supported.(Set Mode) lets you select a previously saved ENV file and add to, remove from, or replace the current environment. ENV files can also be edited by any editor.

Save:	(Path Mode) lets you save the current PATH to a PTH file. (Set Mode) lets you save the current environment to an ENV file.

Exit:	terminates the WinPath program.

The Settings... menu displays the WinPath Settings dialog box.

See Also

Guide to Buttons

PTH Files

ENV Files


Guide to Buttons

 	Execute WinPath PATH or SET command.

Pressing the <ENTER> key has the same effect as clicking on the OK button. PATH or SET is determined by the Mode button.

 	Undo WinPath commands.

WinPath's Undo feature gives you the ability to recover your previous path in the event of a mistake. The number of commands stored in the undo buffer is limited by the number set in the Settings dialog. The Undo function is only available from the toolbar; no WinPath command or command switch is available for Undo. When the Undo button is pressed, the "Undo WinPath Command" dialog is displayed. This dialog is discussed in detail later in this chapter.

 	Delete invalid directories.

If any directories are detected by WinPath as invalid, pressing this button will automatically remove them. This is handy when you disconnect from a network service or change removable media like a Bernoulli disk. This button performs the same operation as the /c switch.

  	Delete redundant directories.

Use this button to remove duplicate references to the same directory. This button performs the same operation as the /d switch.

 	Toggle WinPath mode between SET and PATH.

Pressing this button causes WinPath to switch modes. The current mode is always displayed immediately to the left of the Mode button. When using DDE to control WinPath, no special considerations of the mode are necessary. WinPath's DDE handles each mode automatically. (For more information on DDE , see the chapter titled "Dynamic Data Exchange.")

See Also

Guide to Dialogs


Guide to Dialogs

File Open Dialog

File Save Dialog

WinPath Settings Dialog

Undo Command Dialog


File Open Dialog

To use a PTH or ENV file using WinPath's menus and dialogs, select the  Open option from the File menu. WinPath makes use of the Windows common dialog procedure for opening files, so the look and feel of the dialog should be familiar. WinPath by default looks into the Default Directory  for files with a PTH or ENV extension, depending on the mode. The Default Directory is set up in the settings dialog. Select the file you want to open and either double-click it or select and then click the OK button.

Next, WinPath's Open Options dialog is displayed. Here you select the operation you would like to do with the file. (ADD, INSERT, REMOVE, REPLACE, or EDIT). Select the appropriate button for the function you require.

Button Summary:

Button	Mode	Description

PATH	Append the directories listed in the PTH file to the end of the existing PATH.

SET	Add the variables listed in the ENV file to the environment. If the variable is already set in the environment, it is replaced.

PATH	Insert the directories listed in the PTH file to the beginning of the existing PATH.

SET	Same as Add

PATH	Remove references to directories in the path for the directories listed in the PTH file.

SET	Remove the variables listed in the ENV file from the environment. This file can be the same as that used in an Add operation.

PATH	Replace the current PATH with the PATH stored in the PTH file.

SET	Replace the entire environment with the environment stored in the ENV file.

 	Mode independent	Load the file into Notepad for editing.

 	Mode independent	Abort the file open process.

See Also

File Save Dialog

WinPath Settings Dialog

Undo Command Dialog


File Save Dialog

To save the current path or environment to a file, select Save from the File menu. Once again the Windows common dialog procedure is used. Type in the name of the file in which you want to have the path, or environment written and then click on the OK button to save the file.

See Also

File Open Dialog

WinPath Settings Dialog

Undo Command Dialog


WinPath Settings Dialog

The settings dialog window lets you set up the defaults used by WinPath, permitting you to customize the program to fit your needs. The defaults that you define in this dialog are saved as profile settings in the Anchor.ini file.

Default .PTH Directory

Use this setting to define the default directory where your .PTH files are stored. WinPath will create this directory if it is specified and does not exist.

Editor Command

With this setting you can change the default editor used for editing .PTH and .ENV files from Notepad to the editor of your choice.

#(Number of ) Undo Commands

This setting lets you set the size of the undo buffer in number of commands. The default value is 10 commands. You can increase or decrease this number depending on your needs.

Startup Mode

This setting determines how WinPath appears when it is started. Normal displays the main dialog, Minimized starts WinPath and an icon, and Hidden starts WinPath as a hidden application, meaning that no icon, or dialog is displayed, nor does WinPath show up in the Windows Task Manager. Hidden mode is generally used with WinPath's DDE and/or command line interfaces.

AUTOWIN.PTH

WinPath will automatically load the directories listed in the AUTOWIN.PTH file located in your WinPath default directory so you don't have to have those directories in your path until you are actually running Windows. Should you choose to use this feature, the file should reside in the default directory described above. The available selections determine the method in which the directories listed in the file are applied to the path.

Path Style

This setting determines the way in which the directories listed in the PATH are displayed. DOS refers to DOS's conventional format. Select LIST to display all directories in a single column. COLUMNS causes WinPath to display directories in a multiple column format similar to DOS's dir/w command.

Verification

These options permit you to enable/disable WinPath's directory verification warning messages.

Miscellaneous

Disable Exit Warning. This option enables/disables the message box displayed when you terminate WinPath.

Lower-case Environment Variables — if checked, tells WinPath's set mode to permit access to lower-case environment variables. Typically, all environment variables are upper-case. This is the DOS standard. The DOS SET command casts all environment variables to upper-case. However, some programs write directly to the environment, in which case lower-case variables can be placed in the environment. Windows itself does this with its "windir" environment variable. Please note that DOS and most programs do not recognize lower-case environment variables. In most cases, you will never need to set this option on. This feature is provided for completeness.

See Also

File Open Dialog

File Save Dialog

Undo Command Dialog


Undo WinPath Command Dialog

This dialog is displayed when the Undo button is pressed on the toolbar. A list of the previously entered WinPath PATH commands is shown with the last command highlighted and the corresponding Undo command placed in the edit control box. To undo the last command, press the Do Undo button. To redo the last command, press the Do Previous button. You can also select any of the listed previous commands and undo or redo them as well. The number of undo commands stored is set in the Settings dialog.

Also on this dialog is the Restore Original button. This sets the path back to its state before you started WinPath.

See Also

File Open Dialog

File Save Dialog

WinPath Settings Dialog


Programming Reference

Hacking around the DOS environment is nothing new. If you lurk around in the programming forums on CompuServe you'll see the topic come up on a regular basis. Entire chapters in some well known books have also been dedicated to it.

So why program with our utilities?

By using Anchor Software utilities, you benefit from our labor and market tested code and save yourself the trouble of deciphering all of the differing opinions and code snippets available. In addition we have added some magic of our own that gives you the flexibility to do things in Windows that were not possible before.

Different problems require different solutions, so outlined here you will find examples of how to use the DDE and DLL interfaces as well as the command line with other programs and programming languages.

See Also

Using DDE

Using the WPENV.DLL

Using Shell or WinExec API calls

Using DOS Batch Files


Using DDE

WinPath takes advantage of Windows Dynamic Data Exchange (DDE) capabilities. This gives you the ability to manage your Windows PATH and environment variables from any Windows program that supports DDE conversations  (Visual Basic, Excel, Word, etc.)

WinPath DDE Server:

The WinPath main program(WINPATH.EXE) functions as a DDE server and includes three topics, SYSTEM, PATH, and SET.

Items under the SYSTEM topic include

HELP

ITEMLIST

Use DDE Request to establish a conversation with the SYSTEM topic.

To use the PATH and SET topics, use the DDE execute function from the program you are using. Use WinPath as the application, PATH or SET as the topic, and any valid WinPath command as the DDE command string.

DDE Request  is also supported and will return the value of any variable set in the environment. Use WinPath as the application, PATH or SET as the topic and any variable name as the item being requested.

The WinPath icon title will change with every DDE event, showing the command that was executed.

Sample Code

Visual Basic Example

C Example

See Also

NetDDE

Command Reference


Visual Basic Example

PATH operations

   label1.LinkMode=0

label1.LinkTopic="WinPath|PATH"

label1.LinkMode=2

label1.LinkExecute "+C:\VB"

label1.LinkMode=0

SET operations

label1.LinkMode=0

label1.LinkTopic="WinPath|SET"

label1.LinkMode=2

label1.LinkExecute "TEMP=C:\TEMP"

label1.LinkMode=0

DDE Request

label1.LinkMode=0

label1.LinkTopic="WinPath|SET"

label1.LinkItem="LIB"

label1.LinkMode=2

label1.LinkRequest

label1.LinkMode=0

This would put the value of the LIB environment variable in the label1 control.


C Example

/* prototype for callback proc. */

HDDEDATA EXPENTRY DdeCallBack(WORD, WORD, HCONV, HSZ, HSZ,

HDDEDATA,DWORD, DWORD);

...

FARPROC 	lpfnDdeCallBack;            	// DDE Callback proc.

HSZ	hszService,hszTopic;

HCONV 	hConv;

HDDEDATA 	hData;

DWORD    	idInst = 0L;                 	// instance identifier for DDE calls

...

...

lpfnDdeCallBack = MakeProcInstance((FARPROC)DdeCallBack, ghInst);

if(DdeInitialize(&idInst, (PFNCALLBACK)lpfnDdeCallBack,

                              APPCLASS_STANDARD| APPCMD_CLIENTONLY, 0L))

    	{

        	MessageBox (NULL, "Could not initialize client!",

                      "WinPath", MB_ICONEXCLAMATION | MB_OK) ;

        	return FALSE;

        	}

hszService = DdeCreateStringHandle (idInst, "WinPath", 0) ;

hszTopic   = DdeCreateStringHandle (idInst, "PATH",   0) ;

hConv = DdeConnect (idInst, hszService, hszTopic, NULL) ;

if(!hConv)

    	{

        	MessageBox (NULL, "Could not locate server!",

                      "WinPath", MB_ICONEXCLAMATION | MB_OK) ;

 	DdeFreeStringHandle (idInst, hszService) ;

        	DdeFreeStringHandle (idInst, hszTopic) ;

        	return FALSE;

        	}

hData=DdeCreateDataHandle(idInst,"+C:\\MSVC",32,0L,NULL,CF_TEXT,0);

DdeClientTransaction (hData,-1,hConv, NULL, CF_TEXT, XTYP_EXECUTE,

DDE_TIMEOUT, NULL) ;

DdeFreeDataHandle(hData);

DdeFreeStringHandle (idInst, hszService) ;

DdeFreeStringHandle (idInst, hszTopic) ;

...


NetDDE

To use WinPath with NetDDE the following lines should be added to the [DDEShares] section of the system.ini file. This will enable WinPath to be loaded and executed from another machine on the network.

[DDEShares]

WINPATH$=WINPATH,PATH,,31,,0,,0,0,0

WINSET$=WINPATH,SET,,31,,0,,0,0,0

The client machine would use the following syntax:

 * VB * - for PATH commands

  label1.LinkTopic = "\\NODENAME\NDDE$|WINPATH$"

  label1.LinkMode = 2

  label1.LinkExecute "+C:\APP"

  r% = DoEvents()

 * VB * - for SET commands

  label1.LinkTopic = "\\NODENAME\NDDE$|WINSET$"

  label1.LinkMode = 2

  label1.LinkExecute "TEMP=C:\TEMP"

  r% = DoEvents()


Using Shell or WinExec API calls

A VB code fragment:

Sub Command1_Click ()

    X% = Shell("WinPath.exe +C:\anchor", 1)  ' Shell WinPath.

    X% = Shell("WinSet.exe VAR1=Value1", 1)  ' Shell WinSet.

    X% = Shell("WinSet.exe VAR2=Value2", 1)  ' Shell WinSet.

    X% = Shell("WinSet.exe VAR3=Value3", 1)  ' Shell WinSet.

End Sub

A C code fragment

WinExec("WinPath.exe +C:\\anchor",SW_SHOWNA);

WinExec("WinSet.exe VAR1=Value1",SW_SHOWNA);

WinExec("WinSet.exe VAR2=Value2",SW_SHOWNA);

WinExec("WinSet.exe VAR3=Value3",SW_SHOWNA);


Using the WPENV.DLL

The functions provided in this DLL are intended to replace the getenv and putenv functions provided by C. The C functions are designed only to work with the copy of the environment placed in their calling programs data segments and do not modify copy of the environment supplied to the process by Windows. WGetEnv and WPutEnv have been designed to work with WinPath and will make modifications to the Windows Master environment as well as the data segment of the calling program.

Packing list:

WPENV.DLL	-	The dynamic link library

WPENV.H	-	Header file containing function prototypes

WPENV.LIB	-	Import Library

WGetEnv

Description	Adds new or modifies existing environment variables

Syntax 	int far WGetEnv(char *varname, char *rcvbuff, int len)

Parameter	Description

varname 	environment variable to retrieve

rcvbuff	buffer to receive the var. in

len	size of the rcvbuff

Returns	number of bytes copied into the rcvbuff

WPutEnv

Description	Adds new or modifies existing environment variables

Syntax 	int far WPutEnv(char *envstring);

Parameter	Description

envstring 	string to place in env. (var=var_value)

Returns	1 for success; 0 for failure

Visual Basic Declarations

Declare Function WGetEnv% Lib "WPENV.DLL" (ByVal EnvVar As String, ByVal buffer As String, ByVal bufsize As Integer)

Declare Function WPutEnv% Lib "WPENV.DLL" (ByVal EnvString As String)


WinPath and DOS Boxes

Normal DOS Boxes

EnSync DOS Boxes

See Also

Using DOS Batch Files


Setting Variables On Startup
Setting Variables on Windows/WinPath Startup

WinPath can be placed in the Windows startup group so that its features are available when Windows is started.

For basic path modifications, you can create a file named AUTOWIN.PTH. In the WinPath Settings Dialog box you can then instruct WinPath to automatically add, insert, or remove the directories listed in the AUTOWIN.PTH file on startup.

You can also use the command line in the properties of the WinPath icon to execute WinPath commands. This could be as simple as adding a directory in the PATH to executing a WinPath script.

See Also

Path Mode

Using WinPath Scripts


Creating Icons to Make Environment Changes

You can use WinPath's command line interface and create icons in Program Manager to do WinPath operations. This way your environment changes are only a double-click away.

Example

Let's say you have PageMaker installed on a removable disk. PageMaker requires that the directories J:\ALDUS and J:\PM5 are in the PATH to work properly but you don't want to keep them in your path when you are not using PageMaker.

1.	Put WinPath in your Startup group.

2.	Make the Pagemaker group your active group.

3.	Select File, New in Program Manager and select new program item.

4.	Enter "Setup Pagemaker Path" for the description

5.	Enter WINPATH +J:\ALDUS;J:\PM5 for the command

6.	Change the icon to [image].

7.	Select File, New in Program Manager and select new program item.

8.	Enter "Remove Pagemaker Path" for the description

9.	Enter WINPATH -J:\ALDUS;J:\PM5 for the command

10.	Change the icon to [image].

See Also

Using WinPath Scripts


Using WinPath Scripts

WinPath scripts are files consisting of WinPath commands. Scripts make it easy to make complex changes to the environment.

For example: If you wanted to make changes to three variables (PATH, LIB, INCLUDE) you could create an icon in program manager that used the WinPath command.

WinPath /scr=myscript.scr

The file myscript.scr would contain three lines:

^C:\my_dir

/env=lib ^C:\my_libs

/env=include ^C:\my_incs

This would insert C:\my_dir in the PATH, C:\my_libs in the LIB variable, and C:\my_incs in the INCLUDE variable.

See Also

Path Mode


Error Messages

Could Not Initialize Client

While attempting to establish a DDE conversation with a previously loaded instance, the second instance of the program encountered errors registering itself with Windows as a DDE client. Either your system was very busy executing something else or a memory problem exists.  The DDE conversation was never established and your command was not processed.

Could Not Locate Server

While attempting to establish a DDE conversation with a previously loaded instance, the second instance of the program encountered errors connecting. Either your system was very busy executing something else or a memory problem exists.  The DDE conversation was never established and your command was not processed.

Insufficient memory while performing a path maintenance operation or while setting an environment variable

You must provide a greater amount of memory for your Windows environment. There are two ways that you can do this:

Remove unnecessary environment variables using SET mode.

Modify your config.sys file SHELL command /E: setting to increase the size of the master DOS environment.


Compatibility

WinPath has been tested with the following versions of DOS and Windows:

MS-DOS 3.3, 4.0, 5.0, 6.0, 6.2, 6.21, 6.22

Windows 3.1 and 3.11 Enhanced Mode

PC-DOS 5.0, 6.1, 6.3

Novell DOS 7.0

Networks

Windows for Workgroups 3.1 and 3.11

DEC Pathworks 4.1, 5.0,5.1

Artisoft Lantastic

Novell Netware Workstation Shell  3.11

Memory Managers

DOS EMM386

QuarterDeck QEMM

Qualitas 386Max

Helix NetRoom

Window Desktops

Microsoft Program Manager

This version is not compatible with Windows 3.1 Standard Mode, Windows NT, or Windows95.

See Also

EnSync System Requirements


Using DOS Batch Files

Probably the most powerful feature provided to you by WinPath and it's related utilities is the ability to extend the use of the DOS batch language in Windows. Listed here are a few examples of the kinds of things that can be done with this capability. These examples are intended as a starting point from which you can let your imagination run. Also see the EnSync demo files for an example of DOS box communication.

You can create DOS batch files that will modify the Windows environment by simply running them from Program Manager, File Manager, or by creating an icon. Typically, in the batch file you would run EnSync and then the environment editing commands that you want.

For Example:

@ECHO OFF

ENSYNC /q ON

SET ANCHOR=SOFTWARE

SET  MYVAR=MY_VALUE

PATHMAN +J:\PROG

Any DOS command or program that modifies the active command environment can be used in this manner.(PATH, PROMPT, SET, ETC...)

If you do not require that the DOS box have it's environment synchronized you can use WinExec, WinSet, and WinPath from a batch file to set environment variables in Windows and other synchronized DOS boxes.

For example

        REM - Connect to a network service, set env. vars

        REM     modify the path and then launch an application

        NET USE H: \\SERVR\SERVICE

        WinSet MYVAR=MyValue

        WinExec WinPath +H:\PROGDIR ^H:\UTIL

        WinExec calc

        C:

        CD\MYDATA

        WinExec MyProg

You can create batch files that launch groups of programs that you normally run together.

        REM VB.BAT

        C:

        cd\vb

        WinExec /n calc

        WinExec /n notepad

        WinExec VB

        REM WORD.BAT

        C:

        cd\Paintshp

        WinExec psp

        cd\winword

        WinExec winword

You can create batch files that start other DOS boxes or DOS programs in other DOS boxes. The following batch file would start two DOS boxes, one with dbase running in it and then exit.

       REM DBASE.BAT

       C:

       cd\dbase

       WinExec dbase

       cd\

       WinExec /n DOSPRMPT.PIF

       exit

See Also

EnSync DOS Boxes

EnSync Demo Files


Technical Support
Technical Support and Customer Service

Please direct all questions or comments about WinPath - Path and Environment Management Utility for Windows to:

Anchor Software, Inc.

P.O. Box 124

Cheswick, PA 15024

TEL:(412)274-6504 - FAX:(412)274-5010

CompuServe:GO ANCHOR - Email:75230,3055

Look for more innovative utilities for DOS, Windows and networks from Anchor Software.


AnchorSoftwareInc
Anchor Software, Inc. was founded as a company dedicated to developing software with innovative features and superior flexibility for DOS, Windows and network environments. We have emerged as a premier provider of environment variable management utilities for DOS and Windows. Our products EnSync, WinPath, and Pathman have been the subject of feature articles in industry journals such as InfoWorld's Window Manager column by Brian Livingston, and PC Week's First Looks by Larry J. Seltzer.


PTH files

PTH files are used by WinPath to store and retrieve directory names. PTH files allow you to organize the directories that go into your PATH into logical segments. For example, you may have a PM4.PTH file that contains the directories necessary for Aldus PageMaker 4.0. These directories can then be added by the command +@PM4.PTH or by using the Open option from the File menu. As you can see, using PTH files simplifies setting up your PATH for a particular application. PTH files can be created by WinPath's Save option or you can create them with any ASCII editor like Notepad or DOS Edit. The format of a PTH file is one directory specification per line with no blank lines.

For example:

C:\

C:\DOS

C:\UTIL

C:\WINDOWS

C:\DBASE

C:\WORD


ENV files

ENV files are used by WinPath to store and retrieve whole environments or groups of environment variables. For example, you may have a BRIEF.ENV file that contains the environment variables necessary for Brief 3.1. These environment variables  can then be added by the command &+@BRIEF.ENV or by using the Open option from the File menu.

As with PTH files, ENV files simplify setting up your environment variables for a particular application. ENV files can be created by WinPath's Save option or you can create them with any ASCII editor like Notepad or DOS Edit. The format of a ENV file is one variable per line.

For example:

BBACKUP=.

BCC="!cl -AL -c -G2 %s.c"

BCPRG="!clipper %s.prg -m -q"

BFILE=state.rst

BFLAGS=-i120k5l256Mtu50 -mJPS -mrestore -Dega -D101key

BHELP=c:\brief\help

BPACKAGES=h,c-c:r;prg:s;doc,txt-txt:wp

BPATH=c:\brief\macros


Command Reference

Path Mode

Set Mode


Path Mode

WinPath  PATH commands can be executed as a parameter on WinPath's command line, in the command dialog box, or by any DDE client of WinPath.

Command Line:

Syntax:	WINPATH [operator][[drive:]path[;...]]

Example:	WINPATH +C:\UTIL /c

The command line operation of WinPath gives you the ability to create icons that do specific path or environment maintenance operations. For example if you had an application installed on some type of removable media, in the program group in program manager you could add two additional program items. One with the command line WINPATH +J:\PROGDIR and another with the command line WINPATH -J:\PROGDIR. Then you could simply double-click the icon to execute the command.

Command Dialog:

Commands are issued the same from the command dialog as from the command line with one exception. Omit WINPATH as part of the command.

Example:	+C:\UTIL /c

DDE Command:

For information on WinPath and DDE see Using DDE

Command	Definition

(No parameters) 	To show the current path.  This will display the search path similar to the way DOS does it with a few additions. You are notified of any invalid or redundant directories. Also the current size of the path in bytes is displayed as well as the maximum size of path that your current Windows environment will support. (To increase the size of your Windows environment you must modify the size of your Master DOS Environment. Modify the /e: parameter on the shell command in your config.sys file. "shell=C:\dos\command.com /e:512 /p". For more information on the shell command see your DOS manual.)

 path      	Where path is of the form [[drive:]path[;...]]. This is used to set an initial PATH or to replace the current PATH with a new one.

+path    	To append to the current path, where path is of the form [[drive:]path[;...]]. Any invalid directories specified in path will not be added to your search path. All valid directories are added to the end of the current search path. (Validity checking can be disabled from the WinPath Settings dialog if desired.)

-path     	To remove part of the current path, where path is of the form [[drive:]path[;...]]. The search path is parsed for a match to each directory you specify. For example, if your path is PATH=C:\;C:\UTIL;C:\DOS and you want to remove the reference to C:\ you would type -C:\. If you want to remove C:\ and C:\DOS, type -C:\;C:\DOS.

^path     	To insert path at the beginning of the current path.  Only those directories in path that are valid will be inserted. Invalid directories are skipped.

@filename 	To read the path from a file created either by WinPath, PATHMAN, or an ASCII editor.  The file should contain one directory name per line. The size of the file is limited only by the maximum size of path that your Windows environment can handle. (See also PTH files.)

+@filename 	To append the directories listed in the file to the path

-@filename 	To remove the directories listed in the file from the path

^@filename 	To insert the directories listed in the file at the beginning of the path

/s          	To save the current path. This option works in conjunction with the /r option to provide quick save and restore functions to the path. When you execute this option, WinPath saves the current search path to an ASCII file. The file is saved to the root directory of your C: drive and is called PATHMAN.SVD by default. To have WinPath save the file to another drive or subdirectory, use the DOS SET command or WinPath's SET mode to set the TEMP environment variable to the drive and directory you wish—for example: SET TEMP=D:\TEMP.

/s=filename 	To save the current path to a file. This option lets you specify the file to which you want the path saved. (Example: /s=C:\mypath.pth ). The file saved can be modified by any ASCII editor. The format of the file is one directory per line.

/r          	To restore from a saved path. This option works in conjunction with the /s option to provide quick save and restore functions to the path. When you execute this option, WinPath replaces the current path with the path previously saved by the /s command. As in the /s command, WinPath uses the file PATHMAN.SVD in the root directory on your C drive as the default, unless you have the TEMP environment variable set to some other location.

/c          	To clear invalid directories from the path. WinPath verifies the integrity of all directories in your search path. If an invalid directory is detected, you are notified; however, no action is taken. The /c option removes all references to any invalid directories from your path. This is handy in a network environment when a server drops your connection and you still have references to network drives in your path or if you have references to directories on removable media.

/d          	To clear redundant directories from the path. WinPath verifies whether redundant directory entries exist in your search path. If a redundant directory is detected, you are notified; however, no action is taken. The /d option removes all references to any redundant directories from your path. Having redundant directories in your path will slow down your system since the same directory would be searched more than once for a particular command.

/x          	To set the path to NULL — that is, remove all entries from the PATH environment variable such that the DOS PATH command gives you the "No Path" message.

/xd      	To remove all references to drive d from the path. This option is handy if you use removable mass storage like a Bernoulli disk or if you connect and then disconnect from network services that need to be in the path to execute properly.

^.          	To insert the current working directory as the first directory in the PATH.

+.          	To add the current working directory to end of the existing PATH.

-.          	To remove the current working directory from the PATH.

^^dir1,dir2 	To insert dir1 before dir2

^+dir1,dir2 	To insert dir1 after dir2

^-dir1,dir2 	To replace dir1 with dir2

/l          	To format the display of the directories as a single column list.

/w          	To format the display of the directories as multiple columns similar to DOS's DIR/w command.

/n          	To format the display of the directories in the conventional DOS format.

/env=var  	To perform  operations on the environment variable var. This option is useful for environment variables that work like the PATH variable. LIB and INCLUDE are good candidates for this capability.

/scr=filename	Execute the commands in the script file filename. Frequently used groups of WinPath commands can be placed in script files for convenience.

&/s=filename	Save the current environment to the file specified by filename.

&/x	Clear all variables except PATH, and COMSPEC from the environment.

&@filename	Replace the current environment with the environment stored in filename.

&+@filename	Add the variables stored  in filename to the current environment. Any variables that already exist in the environment are replaced.

&-@filename	Remove the variables listed in filename from the environment.

/EXIT 	used via DDE or command line to tell WinPath to exit and restore the original Windows environment.

/HIDE	used to hide WinPath's dialog and icon.

/UNHIDE	used to make WinPath's dialog and icon visible

/MIN	used to minimize WinPath's dialog.

/MAX	used to maximize WinPath's dialog.

/h	 Launch WinPath Help

See Also

Using Wildcards

Multiple Commands

Using WinPath Scripts


Multiple Commands

Multiple commands can be used on the same command line. For example, you could enter :

+C:\WINDOWS;C:\UTIL  -C:\DBASE  /s=C:\TEST.PTH

This would add C:\WINDOWS and C:\UTIL, remove C:\DBASE, and then save the path to the file called TEST.PTH. Please note that the switches are processed in the order that they appear on the command line and each switch must be separated by a space.


Using Wildcards

*.* Using Wildcards

The use of DOS wildcards is supported for directory names.

+J:\* 	would add all of the directories from the root of drive J: to the path.

-J:\*  	would remove all directories from the path that met the wildcard specification.

Both * and ? are supported in wildcard specifications.


Set Mode

WinPath SET commands can be executed from WinPath's command dialog or from a DDE client program. SET commands are not available from the command line. The supplemental utility, WinSet, has been included to provide a command line interface to SET mode. (Please note: If the "Lower-case Environment Variables" setting is checked, WinPath SET  and WinSet commands will be case-sensitive and will permit you to have variables with mixed upper- and lower-case letters.)

Command Dialog:

When you first start the program, WinPath is in PATH mode and the current path is displayed in the status window. Pressing MODE activates the SET mode and allows you to manage environment variables other than the PATH. The status window at this point changes to a list of the currently set environment variables. If more variables are set than will fit in the window, use the scroll bar to locate the variable of interest. Double-clicking on the variable of interest in the status window causes WinPath to copy that environment variable to the command area of the main window where you can edit it. Once changes have been made, press <ENTER> or click OK. The normal DOS rules for environment variables apply to variables set with WinPath. You can, however, set variables with lower-case letters.

Example:

Press <ALT>+<M> or click the mode button to change the mode to SET

Type:

VariableName=VariableValue

in the command control and then press <ENTER> or click OK.

DDE Command:

For more information on WinPath and DDE, see Using DDE

See Also

Path Mode


Ini Reference

When WinPath is installed, the file ANCHOR.INI will be created in your Windows directory. Any default settings mentioned throughout this document will be in the ANCHOR.INI file. All settings should appear under the section WinPath, that is [WinPath]. Most settings can be made from the WinPath settings dialog box; however, to provide you with the utmost flexibility, all ini file settings are documented completely below.

Available ini file settings for WinPath:

DefaultDirectory=

This is originally set in the install program but can be set to any valid directory in your system. It is the directory WinPath will use by default to save and read .PTH files.

Example:

DefaultDirectory=C:\PTH

UndoBuffer=

This setting is used to set the number of commands that WinPath will save in its undo buffer. The default is 10.

Example:

UndoBuffer=10

AutowinPth=	(ADD | INSERT | REPLACE | OFF)

Set to ADD, INSERT, or REPLACE  to load the directories stored in the file AUTOWIN.PTH whenever you start WinPath.  ADD appends the directories, INSERT places the directories at the front of your path, and REPLACE supersedes the path that Windows inherits from DOS with the one described in the file.

 By placing WinPath in your Windows startup group and setting this option appropriately, you can load your Windows PATH directories when Windows is started.

Editor=

To change the default .PTH file editor, enter the command line for your editor here. The default is Notepad. If your editor is started by a .COM file you must include the .COM extension. (i.e. EDIT.COM)

LowerCase=	(ON|OFF)

 Set to ON to provide the ability to work with lower-case or mixed-case environment variable settings. This settings default is OFF.

ValidityChecking=	(ON|OFF)

This setting is used to enable and disable the directory verification warning option available in WinPath. The default setting is ON. Some network environments can cause WinPath to incorrectly determine that a directory is invalid because of the different levels of security, file protection, and access rights imposed on a server directory. Disabling validity checking provides a work-around for these situations.

Example:

ValidityChecking=ON

RedundancyChecking=	(ON|OFF)

This setting is used to enable/disable the directory redundancy checking that WinPath does.  Depending on your requirements, you may want to disable the redundancy checking. This option's default is ON.

Example:

RedundancyChecking=ON

ExitWarning=	(ON|OFF)

This setting enables/disables the Message Box displayed when you terminate WinPath. This Message Box is used primarily to remind you that WinPath path and environment management is about to be disabled and the environment in its original state will be returned to Windows control.

StartupMode=	(NORMAL | MINIMIZED | HIDDEN)

This setting is used to determine how and if the WinPath window is displayed on startup. NORMAL displays the dialog box. MINIMIZED starts the program as an icon. HIDDEN starts the program as a hidden application. Hidden mode is normally used when WinPath is being controlled via DDE or the command line interface.

The default is Normal.

Captive=	(1)

This setting is intended for use by administrators who don't mind leaving WinPath's dialog visible, however, want to keep a user from removing WinPath from memory. Adding this setting  will disallow termination of WinPath from the menus or Windows Task Manager.

        Captive=1

WXPriority=	(n)

add this setting to the ANCHOR.INI file in the [WinPath] section to set the priority for processing WinExec requests. n represents an integer from 1-10. 1 being the highest priority. The default is 5. ( for more information on WinExec see the section titled WinExec-Running Windows Programs From a DOS Session)

RestoreOnExit=	(0)

RestoreOnExit can be set to 0 to instruct WinPath to leave all modifications made to the environment intact when exiting Windows. This means that if you set an environment variable or change your path while in Windows with WinPath or WinSet those changes will still remain when you exit Windows.

        RestoreOnExit=0

This will only hold true if WinPath is running when Windows is terminated. If you exit WinPath using WinPath's menus, the /EXIT DDE command, or Windows Task Manager, the environment is restored to the state it was in before WinPath was started.

PathStyle= 	(DOS | LIST | COL)

This setting determines the way in which the directories listed in the PATH are displayed

DOS - DOS's conventional format

LIST - All directories are listed in a single column.

COL - Directories are listed in a multiple column format like DOS's dir/w command.

See Also

Sample Anchor.ini File


Sample Anchor Ini File
Sample Anchor.ini File

[WinPath]

StartupMode=Minimized

PathStyle=Columns

DefaultDirectory=C:\PTH

UndoBuffer=10

AutowinPth=INSERT

Editor=NOTEPAD

LowerCase=OFF

ValidityChecking=ON

RedundancyChecking=ON

ExitWarning=OFF