Overview
This page provides technical details outlining how each startup mode modifies the computer's settings. It is helpful documentation for instructions on launching the application manually, configuring user login triggers, setting up the application as a Windows service, and understanding available startup parameters for advanced customization.
On this page:
Configuration Options
The solution application can run in several different ways:
- Local or Remote manual command
- As a Windows Service or Startup bat (On Computer PowerUP)
- Bat/Shell command
Launching the Application with a Shortcut
TStartup.exe
TStartup.exe is the executable which runs the Solution. There are many different parameters that can be added to the TStartup command line that provide more features to a solution as well as more debugging tools.
In order to use TStartup.exe, you will need to create a shortcut for the executable and edit the shortcut properties to add the parameters.
Creating a TStartup Shortcut
Go to your product’s installation folder (see usual path below), and search for the TStartup.exe application. Right-click it, select Create Shortcut, and copy the file. Then, paste it in any folder.
C:\Program Files (x86)\<CompanyName>\<ProductName>\<ProductVersion>\TStartup.exe
Then, right-click on the created shortcut, select Properties, and change the Target field (command line) as you desire.
Creating a .bat file
A batch file is a script file in DOS and Microsoft Windows. It consists of a series of commands that are executed by the command-line interpreter and are stored in a plain text file.
The following steps describe how to launch a customizable TStartup application with a .bat file:
- Create a text file (extension .txt)
- Write the full command line that will launch the application, as seen below
cd "C:\Program Files (x86)\<CompanyName>\<ProductName>\<ProductVersion>" start "C:\Program Files (x86)\<CompanyName>\<ProductName>\<ProductVersion>\TStartup.exe" /Solution:"C:\Solutions\MyNewSolution.tproj"
- Add the desired additional parameters (see examples in the next sections)
- Save and close the file
- Right-click the icon and change its extension name form .tex to .bat. A warning message will popup on the screen. Click Yes.
- Double-click the newly created file to launch the TStartup application.
Required Parameters
The most important parameter for launching your application is related to the Solution file. It is the only thing that is really necessary for the command line.
The syntax for this parameter is presented below.
/Solution:"C:\Solutions\Solution4.tproj
After that parameter, you can add any of the remaining available parameters.
Solution AutoStart Setup
Select the Runtime Autostart Option
You can run the solution in any of the following ways:
Start the Solution Manually:
Solutions are started manually:
- From the Solution Management Tool list. To do this, Select a Solution and click the Runtime Startup button or right-click the Solution and select Run Solution.
- When you are configuring the Solution. To do this, go to Runtime → Startup and click Run Startup.
- Creating a windows shortcut to start the Solution.
Service: Application run as a Windows Service and starts when the computer powers up. Setup Windows Service at the Runtime → Startup page
Starting Solutions with a shortcut
Using a Shortcut on Windows Startup
The runtime startup is executed by the program, TStartup.exe.
When using this example, make sure to change the installation path in the script and the software platform version to the installation on your computer.
The Solution is started from a command line window. The following command line parameters are available:
/Solution: Solution Path and Name between double quotes /username: (optional), username that will be used to start the server. If you do not specify, the user guest will be used. /redundancy: indicates that the server redundancy is being used (requires ip1 and ip2) /ip1: IP Address of the Primary Server /port1: TCP port of the Primary Server /ip2: IP Address of the Secondary Server /port2: TCP port of the Secondary Server /viewonly: indicates that the Solution is in view only mode /wa: indicates that the Solution uses Windows Authenticatio
The modules that will be started are configured in the Solution and are located at Run → Startup.
Examples
"C:\Program Files\Studio\fs-8.1\TStartup.exe" /Solution:"C:\Studio Solutions\Solution1.tproj"
"C:\Program Files\Studio\fs-8.1\TStartup.exe" /Solution:"C:\Studio Solutions\Solution1.tproj" /port1:3101
// Server Redundancy:
"C:\Program Files\Studio\fs-8.1\TStartup.exe" /Solution:"C:\Studio Solutions\Solution1.tproj" /username:Administrator /redundancy /ip1:192.168.1.1 /port1:3101 /ip2:192.168.1.2 /port2:3101
More information on the parameters for the TStartup application are located here.
Creating a Windows shortcut
Go to Start → All Programs. Right-click the startup folder, and select Open.
- In the Startup folder, right-click and select New → Shortcut.
- In the Create Shortcut window, paste the path into the field that displays.
- If you are not using redundancy, delete the redundancy part of the text.
In the examples below, be sure to change the installation path and version of software platform to the installation on your computer.
- Type or paste the full command line. For example: "C:\Program Files\Studio\fs-8.1\TStartup.exe" /Solution:"C:\Studio Solutions\Solution1.tproj"
- Click Next.
- Enter a name for the shortcut.
- Click Finish.
The Solution will automatically start on the next user login if you place that startup icon on the Windows Startup folder. Or you can use the shortcut to start the application manually..
Auto-Start the Solution as a Windows Service
When the third second option is selected, Auto-Start running as a Windows Service, the Solution will start running when the computer powers up. The Windows Service starts the application as soon as the computer is powered on and the Windows Operating System starts, even if no user has logged in to Windows.
The Windows Service can be used on production servers that need different Windows user to login to the computer and keep the server side runtime components running at all times. Use the Windows Service on production servers that are not being used as engineering stations if you need the ability to differentiate between the logged in Windows users while the Solution is running.
This section explains the behind-the-scenes setup on the Windows Service that is executed with this option, as well as the details you want to move the Windows Services configuration.
Client Displays
When running as a Windows Service, you cannot start the Client Displays, as the service server side components run independently from any user logged in. Refer to Running Displays Clients section of the manual for information on starting client side applications.
Running the Solution as a Windows Service
This Setup is automated by the Designer software
On the Designer tool, navigate to Runtime → Startup.
At that page, you find the option to setup the solution to run as a Service, that is only the configuration you need to do!
The entire section that follows, just explain in details the process that was executed when giving that command, and present the details in case there is a scenario you need to setup manually the Windows Services.
When running the application as a Windows Service, you need to take four actions:
- Setup the Run-time startup: By using the software platform configuration tools or directly editing the Windows Service system, you define a software platform Solution to start as a Windows Service that will run the “server” components of the Solution. The graphical user interface always runs in a Windows User Mode in the same computer or started in a remote computer.
- Setup a Web Server: If you want remote access to this Solution — for Solution configuration or to access the displays in runtime —, you need to setup a Web Server. This is accomplished with the built-in TWebServer software or with the Microsoft IIS (Internet Information Services). Refer to the TWebServices page about installing a Web Server.
- Verify the security settings: Verify the security settings of the Windows Service and the security settings of the Solution
- Define the client startup: When a software platform Solution is starting as a Windows Service, the Displays will not run, despite the Solution configuration, due to the restrictions of it running as a service. Therefore, you need to setup the client displays, either in a startup shortcut on the same computer or in a remote computer. Information on starting client displays can be located here <<<<<<<<<<. >>>>>>>>>>>>>>>>>>>>>>>>>
1) A Command line, based on the Solution configuration is created. The whole command line should look something like this:
"C:\ProgramFiles(x86)\Tatsoft\FactoryStudio\fs-8.1\ tStartup.exe" /Solution:C:\Factory Studio Solutions\ <Solution_name>.tproj /username:<username>
2) A command at the <.NET Framework Install Path> is executed:
installutil <InstallPath>\<fs-version>\TStartupAsService.exe Example: C:\Windows\Microsoft.NET\Framework\v2.0.50727>installutil C:\Program files\Tatsoft\FactoryStudio\fs-8.1\ TStartupAsService.exe
3) In the Windows Registry, the following entry is added
"HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\ TStartup\ImagePath" Example: "C:\\tatsoft\fs-8.1\TStartupAsService.exe" "/Solution:C:\FactoryStudio Solutions\Solution1.tproj"
4) In the Windows Service (Administrative Tools), the "TStartup Service" is set to automatic, so the selected Solution will start when the computer starts.
Check the Windows Service Security Settings
Check the Windows Security settings for Log On.
When you setup the Solution to run as a Windows Service, it will run by default under the built-in “Local System” Window Credentials. For some Solutions, especially if accessing external databases or folders, you may need to run under a specific user's Windows Security Log On credentials. The configuration is executed in the Windows Service Configuration directly. For most scenarios, the default configuration will suffice.
Optionally, you can delay the start of the service
If the application is using external resources, services, or applications, you may want to delay the start of the Solution to allow the other services to start first. This is also executed in the Windows Service configuration.
Setup the Security in the Solution Configuration Solution
When the application is running as a service, the server components will run under the credentials of the “Solution user” defined in Runtime → Startup. By default, the user is a “guest”. For most Solutions, that user will be changed to Administrator, which will allow the user to make changes to the Solution with online configuration or have access to all application objects.
Startup Parameters
Main parameters
/ip1
The Primary Server Name or IP
The target of your shortcut will be something like this:
"C:\Program Files (x86)\<CompanyName>\<ProductName>\<ProductVersion>\TStartup.exe" /Solution:"C:\ Solutions\Solution4.tproj" /ip1:<IpAddress>
/port1
The Port number of the primary, default is 3101.
The target of your shortcut will be something like this:
"C:\Program Files (x86)\<CompanyName>\<ProductName>\<ProductVersion>\TStartup.exe" /Solution:"C:\ Solutions\Solution4.tproj" /ip1:<IpAddress> /port1:<PortNumber>
Advanced Diagnostic Information
The list below contains the available parameters that can be added to a Solution's startup for additional debugging information.
/debugstart
The logs are created in the folder:
C:\ProgramData\<ProductName>
It is worth remembering that this folder is used to log system errors. When a critical error occur, this folder will contain important information that can be used to solve the issue.
The target of your shortcut will be something like this:
"C:\Program Files (x86)\<CompanyName>\<ProductName>\<ProductVersion>\TStartup.exe" /Solution:"C:\ Solutions\Solution4.tproj" /debugstart
/AutoRunDiagnostics: (time in minutes)
The logs are created in the folder:
C:\ProgramData\<ProductName>
The target of your shortcut will be something like this:
"C:\Program Files (x86)\<CompanyName>\<ProductName>\<ProductVersion>\TStartup.exe" /Solution:"C:\ Solutions\Solution4.tproj"/AutoRunDiagnostics:30
/LogDeviceWriteStartup
The logs are created in the folder:
C:\ProgramData\<ProductName>\Device
The target of your shortcut will be something like this:
"C:\Program Files (x86)\<CompanyName>\<ProductName>\<ProductVersion>\TStartup.exe" /Solution:"C:\ Solutions\Solution4.tproj"/LogDeviceWriteStartup
Redundancy
/redundancy
It has no parameters. It just needs to be included to enable redundancy.
The target of your shortcut will be something like this:
"C:\Program Files (x86)\<CompanyName>\<ProductName>\<ProductVersion>\TStartup.exe" /Solution:"C:\ Solutions\Solution4.tproj"/redundancy
/autoswitch
It has no parameters. If included, the Primary takes over as the Active node if the secondary was acting as the Active.
The target of your shortcut will be something like this:
"C:\Program Files (x86)\<CompanyName>\<ProductName>\<ProductVersion>\TStartup.exe" /Solution:"C:\ Solutions\Solution4.tproj"/redundancy /autoswitch
/timeautoswitch
The number of seconds the Primary will wait before becoming active if the autoswitch option is enabled. This is typically set to 60 seconds.
The target of your shortcut will be something like this:
"C:\Program Files (x86)\<CompanyName>\<ProductName>\<ProductVersion>\TStartup.exe" /Solution:"C:\ Solutions\Solution4.tproj"/redundancy /timeautoswitch:30
/ip1
The Primary Server Name or IP
The target of your shortcut will be something like this:
"C:\Program Files (x86)\<CompanyName>\<ProductName>\<ProductVersion>\TStartup.exe" /Solution:"C:\ Solutions\Solution4.tproj" /ip1:<IpAddress>
/port1
The Port number of the primary, default is 3101.
The target of your shortcut will be something like this:
"C:\Program Files (x86)\<CompanyName>\<ProductName>\<ProductVersion>\TStartup.exe" /Solution:"C:\ Solutions\Solution4.tproj" /ip1:<IpAddress> /port1:<PortNumber>
/ip2
The Secondary Server Name or IP
The target of your shortcut will be something like this:
"C:\Program Files (x86)\<CompanyName>\<ProductName>\<ProductVersion>\TStartup.exe" /Solution:"C:\ Solutions\Solution4.tproj" /ip1:<IpAddress> /ip2:<IpAddress>
/port2
The Port number for the secondary, default is 3101.
The target of your shortcut will be something like this:
"C:\Program Files (x86)\<CompanyName>\<ProductName>\<ProductVersion>\TStartup.exe" /Solution:"C:\ Solutions\Solution4.tproj"/ip1:<IpAddress> /ip2:<IpAddress> /port2:<PortNumber>
/connectiontimeout
The Watch-dog timeout in seconds that is found on Info → Redundancy.
The target of your shortcut will be something like this:
"C:\Program Files (x86)\<CompanyName>\<ProductName>\<ProductVersion>\TStartup.exe" /Solution:"C:\ Solutions\Solution4.tproj" /connectiontimeout:5
/connectionretry
The Connection retry attempts. By default, it is set as 1.
/SolutionIPPath
The path of the Solution on the remote server.
The SolutionIPPath is used by the system to allow one station to automatically update the Solution in the redundant pair when doing online Solution changes and HotStart commands.
Example:
/SolutionIPPath:192.168.0.1;C:\Solutions\test.tproj
Note
The TimeAutoSwitch time is connected when you are using the /autoswitch option. In this scenario, when the computer designed as the Primary starts, it will ”auto switch” from standby to active after it starts.
It is important that the switch happens only after the process had time to get all the synchronization from the active computer. Typically, 60 seconds should be enough for that, but you should increase that settings for large Solutions or slow networks.
Advanced Parameters
/username
The RuntimeUser that is logged in.
The target of your shortcut will be something like this:
"C:\Program Files (x86)\<CompanyName>\<ProductName>\<ProductVersion>\TStartup.exe" /Solution:"C:\ Solutions\Solution4.tproj" /username:<UserName>
/password
The custom password to log in as the user defined above.
The target of your shortcut will be something like this:
"C:\Program Files (x86)\<CompanyName>\<ProductName>\<ProductVersion>\TStartup.exe" /Solution:"C:\ Solutions\Solution4.tproj"/username:<UserName> /password:<Password>
/wa
Flag (True or False) to set if Windows Authentication will be used.
- True:
- False = Remote
The target of your shortcut will be something like this:
"C:\Program Files (x86)\<CompanyName>\<ProductName>\<ProductVersion>\TStartup.exe" /Solution:"C:\ Solutions\Solution4.tproj" /wa:true
/port1WA
The listening port using Windows Authentication
The target of your shortcut will be something like this:
"C:\Program Files (x86)\<CompanyName>\<ProductName>\<ProductVersion>\TStartup.exe" /Solution:"C:\ Solutions\Solution4.tproj" /wa:true /port1Wa:<PortNumber>
/NumberOfDevicesAtSameTime
The number of devices online at the same time. By default, it is set as 3.
The target of your shortcut will be something like this:
"C:\Program Files (x86)\<CompanyName>\<ProductName>\<ProductVersion>\TStartup.exe" /Solution:"C:\ Solutions\Solution4.tproj" /NumberOfDevicesAtSameTime:1
/TimeBetweenModules
The waiting time between modules being started. Time in seconds.
The target of your shortcut will be something like this:
"C:\Program Files (x86)\<CompanyName>\<ProductName>\<ProductVersion>\TStartup.exe" /Solution:"C:\ Solutions\Solution4.tproj" /TimeBetweenModules:30
/nocache
Flag (true or false) to see if Solution will use data stored in cache or not. For SmartClient Only.
The target of your shortcut will be something like this:
http://<IpAddress>/<ProductVersion>/TSmartClient.application?nocache=true
In this section: