Jump to: navigation, search

Difference between revisions of "UBIK Console"


Line 6: Line 6:
 
== Example using Script file ==
 
== Example using Script file ==
 
In order to execute a C# script file using the {{UBIK}} Console you need execute the UBIK.Console.exe using the ''-cmdfile'' parameter. If you add the ''-connectionstring'' parameter as shown in the example the console will instantiate UBIKEnvironmentConnection variable called ubikEnvironmentConnection
 
In order to execute a C# script file using the {{UBIK}} Console you need execute the UBIK.Console.exe using the ''-cmdfile'' parameter. If you add the ''-connectionstring'' parameter as shown in the example the console will instantiate UBIKEnvironmentConnection variable called ubikEnvironmentConnection
{{{
+
<source lang="xml">
 
UBIK.Console.exe  -cmdfile "\\PathToScript\script.txt" -connectionstring "Data Source = ...; Initial Catalog = ...; User ID = ...; Password = ..."
 
UBIK.Console.exe  -cmdfile "\\PathToScript\script.txt" -connectionstring "Data Source = ...; Initial Catalog = ...; User ID = ...; Password = ..."
}}}
+
</source>
  
  

Revision as of 13:28, 16 April 2018

The UBIK® Console project allows a user to interact with UBIK via C# code.

Concept

C# code will be interpreted like script code. This script can be either loaded from file and executed at start up or directly typed into a console window.

Example using Script file

In order to execute a C# script file using the UBIK® Console you need execute the UBIK.Console.exe using the -cmdfile parameter. If you add the -connectionstring parameter as shown in the example the console will instantiate UBIKEnvironmentConnection variable called ubikEnvironmentConnection

UBIK.Console.exe  -cmdfile "\\PathToScript\script.txt" -connectionstring "Data Source = ...; Initial Catalog = ...; User ID = ...; Password = ..."


PwdTool

If you do not want to type in your password in plain text you can first generate an encrypted password by executing Pwd.Encrpyt in the UBIK® Console.

PwdTool.Encrypt.PNG