Generate/VShellIcon.gif  Using the Windows Command Shell


When performing remote administration of a Windows system, it is normal to think of using a graphical user interface. However, trying to force a bandwidth-intensive interface over a LAN, WAN or other network connection can lead to extremely slow or unreliable behavior of the interface.

Fortunately, the Windows command line allows you to perform almost all of the Windows tasks that you need to administer the system. The syntax in most cases is straightforward and easy to learn, and command-line administration is much more efficient remotely, because only a few characters are transmitted over the connection. The Windows command shell, which resembles MS-DOS, is a powerful environment and contains a strong complement of Win32 console utilities to support it including net config and net start/stop.

Many of the Windows integrated administrative facilities are grouped under the net command. Typing net at the command line will print out a list of these commands. Details about the use of any net command are available by typing:

net <command> /?

For example, to get a list of the commands and options available with the net config command, type:

net config /?

You can find additional information on command-line administration in the Windows Resource Guide available from Microsoft Press.

To help in the administration of your VShell server , VanDyke Software also ships two utilities with VShell. These utilities, Who.exe and Whoami.exe, provide you with information about who is connected to your system.

The Who.exe utility displays the following information about VShell connections:

Generate/BULLET1.gif    User names

Generate/BULLET1.gif    Connection IDs

Generate/BULLET1.gif    Date and time the connection was made

Generate/BULLET1.gif    IP Address from which the connection was made (using the -h option with the Who command will display the hostname instead of the IP address)

Below is an example of Who.exe output.

Bob 00093 Nov 13 20:55 192.168.0.54

Alice 00130 Nov 14 13:26 192.168.0.112

Dave 00099 Nov 14 08:08 192.168.0.32

Carol 00100 Nov 14 08:14 192.168.0.28

VShell also supports a who "--kill" command option which terminates the specified session. Only users with administrator privileges are allowed to use the --kill option. Below are three usage examples (the latter two examples can be useful if the session-id to be terminated occurs in both SSH2 and FTPS):

who --kill session-id

who --kill ssh2:session-id

who --kill ftps:session-id

The Whoami.exe utility displays the username with which you are currently connected.

Silent Installation of VShell

If you are installing VShell on a number of machines, it can be time-consuming to run the installation wizard on each machine. Or, if you are upgrading your software, you may want a quick way to install the software and keep all your current settings.

A silent installation allows you to bypass the wizard panels and run the installer non-interactively from the command line. When run silently, the installer accepts all default settings, or keeps all of your existing settings, if you are upgrading.

Note: The following example of how to silently install VShell 3.0 (or later) assumes that you have a copy of the installer already downloaded to a local c:\Installers directory. In the command, substitute the correct name of the executable (.exe) file that you are installing.

To silently install VShell, follow these steps:

1.   Create an answer file. Silently installing VShell 3.0 (or later) requires the use of an answer file that will allow you to override the installer's default settings and control the reboot behavior of the installer. Here is an example answer file.

2.   If you do not want the installer to reboot your machine at the end of the installation, add the following line to your answer file:

AUTO_REBOOT=NO

To allow the installer to reboot your machine, add the following line:

AUTO_REBOOT=YES

Note: Since Microsoft Windows only loads authentication modules during startup, the machine must be rebooted in order for the public-key authentication module (Vdspka10.dll) to be loaded and used by the Windows operating system, allowing public-key only authentication with VShell. Before reboot, you can still use combination of password and public-key authentication.

If you are upgrading, and the Vdspka10.dll file has not been changed by VanDyke Software since your last installation or upgrade, a reboot is not required. The Vdspka10.dll file does not change very often. If Vdspka10.dll has changed, and you do not reboot, public-key authentication may fail. Rebooting may solve this problem.

3.   Save the answer file and copy it to each machine where you want to install VShell 3.0 (or later).

4.   At a command prompt, type:

c:\Installers\>vshell-x86.exe /s /z"c:\path\to\answerfile.txt"

Exporting a VShell for Windows Configuration for Use with an Answer File

If you want to install the same configuration settings on a number of machines, follow these steps:

1.   Configure VShell on one machine. Run Regedit and then export the following registry key:

HKEY_LOCAL_MACHINE\Software\VanDyke\VShell\Server

2.   Copy the resulting .reg file (for example, “VShellconfig.reg") onto the other machines on which you will install VShell, or place the .reg file on a network drive to which every machine has access.

3.   Modify the value of the REGISTRY_CONFIGURATION_FILE option in the VShell answer file to reference the path to the .reg file that exists either on the target machine or in a shared folder on the network. For example:

REGISTRY_CONFIGURATION_FILE=C:\vshellconfig.reg

4.   You can now install VShell on all machines using the installation wizard or silently from the command line, for example:

c:\Installers\>vshell-x86.exe /s /z"c:\path\to\answerfile.txt"

Terminal size issues

If VShell is using Cmd.exe as its command shell, the server's actual screen resolution will affect the size of the VShell terminal window.  The VShell terminal size cannot be larger than that specified in the client's Window size setting on the Layout tab for Cmd.exe.