Username Password
Bookmark and Share


This is a configuration file option that defines an optional script to run upon successful login. The script invocation can contain macros in the parameters being passed to it. For example:

	/data/WebGUI/sbin/ --configFile=dev.localhost.localdomain.conf --username=^FormParam(username);

The login script is called via the qx// operator. Use the sbin/_utility.skeleton file as a starting point for writing your script. There is also corresponding runOnLogout option.

See my Login Script submission in Add Ons for an example. 

Running Perl Scripts on Windows

***Updated October 22, 2008: WebGUI no longer supports Windows. Plain Black recommends using the VMWare Appliance for Windows Installations (

As with many things, life is more difficult with Windows. To get this script to work, you must do the following:

  1. include the path to the perl interpreter
  2. fix the paths in your runOnLogin
  3. if you use single quotes in parameter names/values, you'll need to change these to double quotes (which means using backslash escapes in the config file)
  4. use absolute paths in the script file or the 'use lib' command and Session->open command (in the start sub)

The final command will look something like the follow:

    c:\\data\\wre\\prereqs\\perl\\bin\\perl.exe c:\\data\\WebGUI\\sbin\\ --configFile=dev.localhost.localdomain.conf --username="^FormParam(username)";

Because the backslashes will be escaped when the config file gets read in, you need to escape each backslash which makes the command look like this:

    c:\\\\data\\\\wre\\\\prereqs\\\\perl\\\\bin\\\\perl.exe c:\\\\data\\\\WebGUI\\\\sbin\\\\ --configFile=dev.localhost.localdomain.conf --username=\"^FormParam(username);\"

To associate the Perl interpreter with .pl extension so that it will allow parameters see this discussion. I had better luck just calling the Perl interpreter directly rather than relying on Windows to find it and pass the parameters.

Keywords: configuration

Search | Most Popular | Recent Changes | Wiki Home
© 2023 Plain Black Corporation | All Rights Reserved