Disable All RunOnce Features
Tick this on to disable all the RunOnce template code, and prevent the
code from being generated into your application. Typically used for
debugging when the RunOnce code is possibly causing conflicts in your
app.
Application Name
This is used to register the mutex to identify a unique application.
By default this is the name of your application, but you can make it
something else if you want to identify more than one exe to the same
application name. Use 'Quotes' or a variable for this. If you want to
prevent users from running multiple copies of the program (ie first
user to run it is ok, but other users fail, then prefix the
Application Name with
Global\
RunOnce Procedure
is the procedure that is used to handle a second instance of the exe
that is run. This procedure will pass focus to the main procedure and
send any commandline parameters to the current instance of the
application.
Port
This number is the NetTalk port that is used to communicate between
the second instance and the first instance of the application. This
port number should not be used by other protocols on the computer.
Typically a "random" port of your choice, between 2000 and 32 000
should suffice.
Disable RunOnce For Remote Desktop sessions
If your application will be used in a Remote Desktop (RDP)
environment, then you can check this checkbox to disable RunOnce when
your application is running in a Terminal Server environment. The
CWUTIL function IsTermServer() is used to identify such an
environment.
Disable RunOnce IF
You can also enter an expression in the
Disable
RunOnce if prompt that (if evaluates to true) will disable
RunOnce at runtime. This means that you can disable or enable runonce
for different clients/environments. Use the Global embed point:
'RunOnce - Prime variables to disable RunOnce at runtime' to prime
variables used in this expression - before RunOnce is activated at
runtime.
Import RunOnce Procedures
This will import the default RunOnce_HandleSecondInstance procedure
into your application.