Management Console Command Line Interface

The Management Console can also activate a number of options via commandline so you can by pass the main menu and perform various tasks directly through the management interface.

The syntax is the key word, plus in some cases additional parameters you can pass.

From within Visual FoxPro:

DO CONSOLE WITH "SQLCONFIG"
DO CONSOLE WITH "VIRTUAL","wconnect","D:\web\wconnect"
DO CONSOLE WITH "AUTOLOGON","rick","superseekrit"

From the Windows Command Prompt:

CONSOLE "SQLCONFIG"
CONSOLE "VIRTUAL" "wconnect" "D:\web\wconnect"
CONSOLE "AUTOLOGON" "rick" "superseekrit"

The following useful utility functions are available through the console:

SCRIPTMAP
Allows you to create a scriptmap for the appropriate Web Server. Run without additional parameters to get a list of parameters and options or with "UI" to get prompted for options.

CONSOLE "SCRIPTMAP" "wwd,wc,blog,wwt"
        "c:\webconnectionprojects\wwdemo\web" 

You can also look at the comments in \tools\scriptmap.prg which you can also run and integrate into your own code.

VIRTUAL
Creates a virtual directory. Run without additional parameters to get a list of parameters and options or with "UI" to get prompted for options.

CONSOLE "VIRTUAL" "wwdemo" "c:\webconnectionprojects\wwdemo\web"

You can also look at the comments in \tools\virtual.prg which you can also run and integrate into your own code.

IISEXPRESS Launches IIS at a specific path and port.

CONSOLE IISEXPRESS "c:\webconnectionprojects\wwdemo\web" 7001 

You can also run this command from FoxPro IDE from a project

DO CONSOLE WITH "IISEXPRESS",LOWER(FULLPATH(".\Web")),7001

DO CONSOLE WITH "IISEXPRESS",LOWER(FULLPATH(".\Web")),7001,"/wconnect","NONAVIGATE"

an optional last parameter of "NONAVIGATE" can be passed to specify that this command should not navigate to the site root.

DCOMNCONFIG
Combines the DCOMIMPERSONATION and DCOMPERMISSION into a single command.

CONSOLE "DCOMCONFIG","<ProgId>","<UserName>","<password>"

Examples:

CONSOLE "DCOMCONFIG","wcdemo.wcdemoserver","rick","seekrit"
CONSOLE "DCOMCONFIG","wcdemo.wcdemoserver","NETWORK SERVICE"
CONSOLE "DCOMCONFIG","wcdemo.wcdemoserver","SYSTEM"

We suggest you only run of these. If you do run multiple commands make sure the one you want to actually use for impersonation is the last one you run since that's what gets assigned to the DCOM Impersonation setting.

Note all DCOM permissions are set in the 32 bit DCOM registry even on a 64 bit system, since FoxPro COM servers are 32 bit.

DCOMIMPERSONATION
Sets the DCOM impersonation for a COM server, which is the account the COM server will run under when launched.

CONSOLE "DCOMIMPERSONATION","<ProgId>","<UserName>","<password>"

Note that the username is not provided for accounts like Interactive or SYSTEM. If username is omitted Interactive is used.

Note This option requires that the DCOMPERMISSIONS.EXE file from the Tools directory is either in the current path or the TOOLS directory.

DCOMPERMISSION
Sets a single DCOM permission for a COM server for a single account you specify.

CONSOLE "DCOMPERMISSION","<ProgId>","<Username>"

Username can be either a System username (SYSTEM,IUSR_RASNOTEBOOK), Group (Administrators) or normal username.

Note:
This option requires that the DCOMPERMISSIONS.EXE file from the Tools directory

DISABLELOOPBACKCHECK
This command lets you bypass Windows server local loopback restrictions that disallow authenticating in IIS using Windows Authentication. This can affect Web Connection Admin pages which rely on Windows Authentication to authenticate access to the admin pages.

Running the command without a parameter enables local Windows authentication. Running with a parameter of off forces authentica

AUTOLOGON
Creates an Autologon entry in the Windows Registry. Warning: Use this feature with care as it can be a potential security problem to have your Windows system automatically log on.

INSTALLPRINTER
Allows you to install one of Windows' default printer drivers automatically. You can use this feature to easily install the "Apple Color LW 12/660 PS" Postscript driver that can be used with the wwDistiller and wwGhostscript classes to generate PDF output. This option will default to the above printer and allow you to type in a known Windows printer name.

You can optionally pass in the name of a driver:

CONSOLE.EXE "INSTALLPRINTER" "Microsoft Print to PDF"

GOURL
Runs any URL or Windows file association and displays the content in the Web browser.

The following options access the various user interface wizards and helpers directly.

SQLCONFIG
Starts the SQL Configuration Wizard

CONFIGURE
Starts the Site Configuration Wizard

SETUP
Starts the new Web Connection Setup routine.

NEWPROJECT
Starts the new project Wizard.

NEWPROCESS
Starts the New Process Wizard

UPDATEVERSION
Updates the current version by recompiling all Web Connection files and copying the Web support files to a specified Web directory.

Note that this routine is not available in the CONSOLE.EXE due to the recompilation requirement. However you can run this utility from the console directory as a PRG script as follows:

DO console\UpdateVersion.prg

or

DO console\UpdateVersion.prg with "c:\inetpub\wwwroot\wconnect"

where the path is the path to a Web directory. If not specified a dialog pops up and prompts you to select a Web path.


© West Wind Technologies, 1996-2019 • Updated: 02/17/19
Comment or report problem with topic