This provides a script driven shell that offer an alternative to run stand alone mode from batch files
The software now includes a script driven shell (V12Shell.exe) which provides an alternative to calling standalone V12 programs from a batch file.
A typical script contains a set of commands very similar to the set of standalone calls made at present, but provides these benefits:
(a) Control of security key checks to avoid the issue where the first call (eg import) finds a licence, but the next call (eg optimise) finds no licence available.
(b) Error handling - all error messages are sent to a single error file in a specified path.
(c) Status file - indicates if errors have occurred or all processes completed.
(d) Control the timeouts in the event that one of the programs hangs
(e) Use of direct interprocess communication between the shell and individual applications.
The V12Shell program is activated by:
V12 Master keys
V12 Modular network keys (full, demo / locked, metered)
V12 Modular floating cloud licences (full, demo / locked)
Use of V12 User profiles
The V12Shell program is designed to make use of V12 user profiles which have been created and set up (paths etc). The program must have exclusive use of the user profile: it must exist and is locked for the duration of the script.
It is the caller’s responsibility to manage the user profiles and allocate them to different instances of V12Shell.
Network keys - nethasp.ini
To work reliably with a network key, a nethasp.ini file is normally required in the program folder. This should target the key’s host IP address and have broadcast turned off. In the absence of a nethasp.ini file, the error ‘No network key licences available’ may not be reported correctly.
V12Shell Overview
V12Shell is driven by a combination of command line arguments and the contents of a script file. The full path of the script file is the first command line argument.
Environment variables can be used (but not set) in the script lines.
The script does not allow other types of batch / script commands like defining variables, for loops, if-then-else tests etc.
The shell calls each line in the script sequentially and waits for the process to complete. It then looks for error files before continuing with the next.
It is not necessary to give the full path of V12 executables if they are in the same location as the V12Shell.exe - just the program name and its arguments.
Extra command line arguments (and / or script header lines) tell the shell:
- Which user profile to use (path)
- The path of a unique error file to append to
- The path of a status file to modify (completed, error etc)
- Timeout interval for any one app (optional - see later section).
- Override for network key timeout (optional - see later section).
When the shell terminates, the final status is recorded in the status file (detailed in a later section). The main status code number is also returned in the V12Shell.exe exit code.
When the shell runs, it creates the status file (or overwrites it if it already exists) and outputs a status code 0 (meaning ‘In progress’). The specified error file is deleted if it already exists.
The calling process can abort the script by deleting the status file.
V12Shell runs hidden by default but it also has a visible diagnostic mode for testing