Sending Multiple Sequence Files to Trev under Windows.

Mark Jordan markj at
Wed Nov 7 12:25:03 EST 2001

Hi Darren,
The sprun.exe program was only ever intended for use as part
of an installation where the user invokes it via an icon. It currently
has a hard limit of 10 arguments. I'll look into removing that limit
for the next update, but for now there is a workaround:

You can do what sprun.exe does. It invokes winstash.exe
with the names of the TCL files to run, but it also sets up lots
of environment variables and library paths. It also used to
install fonts at runtime, but we don't do that anymore.

The path must contain the $ROOT\lib\windows-binaries and
$ROOT\windows-bin directories.

where $ROOT is the installation directory. The following environment
variables must also be setup:


A TEMP environment variable must also exist, and for the help system
to work, the SystemRoot environment variable must be passed over
as well.

Another thing which might be helpful on NT based systems is to run
sprun.exe with the -c switch to start the console. This console has
everything setup, so you can run winstash from there with the
name of the tcl file. You can also look at this to see exactly what
sprun.exe does to the environment. Beware that the console doesn't
work on 9x systems because the command shell is broken.

Best Regards,
Mark Jordan.
Staden Package.

"Darren Jackson" <darren.jackson at> wrote in message
news:3be6bcef$1_1 at
> Hi,
> I have been attempting to interface to the latest Windows release of the
> Staden Package (2001.0).
> In particular, I am attempting to call Trev with multiple sequence files
> from Visual Basic, by making a call to the Windows API function
> 'ShellExecute' and passing the appropriate parameters as follows:
> ShellExecute(Scr_hDC, "Open", strSprunPath, strParameters, "",
> Where strSprunPath holds a string containing the path to Sprun.exe and
> strParameters holds a string such as
> "E:\Progra~1\Staden~1\lib\trev\trev.tcl"
> "C:\xb54a3.S1.exp""C:\xb54a4.S1.exp".
> My problem is that, beyond a certain number of sequence files, Sprun.exe
> crashes with an Access Violation Exception. This does not seem to be
> to the length of the string parameter that is passed, as I have
> with various values. I notice that the number of files that may be safely
> passed seems to have increased since the previous Beta version of the
> Package.
> Has anybody else encountered this kind of situation?
> Has anybody any suggestions as to the cause or possible remedy?
> Any help will be much appreciated.
> Darren

More information about the Staden mailing list