Windows Terminal Services Extender
This extender allows a winbatch script to directly enumerate, interrogate and manipulate terminal services sessions on a WinNT/2K/XP system that has terminal services enabled on it. This functionality also works on a system that is running the Citrix MetaFrame and MetaFrame/XP software, although the extender does not have the ability to take advantage of any Citrix-specific functionality enhancements. Additional Citrix-related enhancements will be made to this extender in future release of this extender.
This extender cannot be used by a script that is not running on system with terminal services enabled. In that situation [e.g. running on a regular WinNT system or a Win2K system without terminal services installed], the extender will load but its functionality will be reduced to where all it can do is to return the extender version and allow the user to safely query the system as to whether or not the extender has detected terminal services. This means that all scripts can load the extender [on the NT platform family], but it is necessary to call the function wtsIsTSEnabled() in order to determine if it is safe to call any other functions in the extender [except for wtsVersion() - this is safe all of the time]. However, it is permissible to copy the WTSAPI32.DLL file from another Win2K server system that has terminal services enabled on it and place the file in the "%windir%\system32" directory on the workstation. The server system from which the file is copied should match the workstation's version and service pack level to ensure that it is compatible with the workstation. When this has been done, it is possible for the WTS extender to load and function normally on a workstation that does not otherwise have terminal services enabled on it. The workstation may then be used to perform remote administration of other terminal server systems on the network. This is not an issue on WinXP [and newer] as terminal services are built into WinXP [and newer] as a standard feature. In the case of a WinNT v4.0 Workstation system, multiple files need to be copied to "%windir%\system32" from a WinNT v4.0 Terminal Server Edition server in order for the WTS* API functions to be usable from a regular workstation. The list of files is WTSAPI32.DLL, UTILDLL.DLL, WINSTA.DLL and REGAPI.DLL. A final note regarding WinNT v4.0 Workstation, if the specified files are copied onto the workstation, the WTS extender will work except for the function wtsProcIdToSessId(), which will raise an error if it is called in that configuration.
To access the functions in this extender, add the following to your script:
32-bit Extender
AddExtender( "WWWTS44I.DLL")
System Requirements: WinBatch version 2004B or newer.
64-bit Extender
AddExtender( "WWWTS64I.DLL" )
System Requirements: WinBatch version 2011B or newer.
These functions can be used within WIL scripts or can be compiled into WIL executables.
|

About WIL Extenders
Using WIL Extenders
Compiling with WIL Extenders
Contacting Island Lake Consulting LLC
How to get Technical Support
About this Help File
Error List
See the link below for the Terminal Server Explorer script, which demonstrates the usage of many of the WTS extender functions in a script (that also happens to use the dynamic dialog box features in WinBatch): TSExplorer.wbt
|