ODBC Translator (IOdbcTranslator)Copy link to this sectionLink to this section copied!

OverviewCopy link to this sectionLink to this section copied!

This interface is used to manage ODBC Translators.

Iodbc translators

MethodsCopy link to this sectionLink to this section copied!

  • (No methods available for ODBC Translators)

PropertiesCopy link to this sectionLink to this section copied!

  • DllFile (IFile) {get}{set} Gets or sets the translator DLL file as an IFile (must be added to the project files).
  • Name (string) {get}{set} Gets or sets the display name of the ODBC translator.
  • SetupFile (IFile) {get}{set} Gets or sets the translator setup DLL file as an IFile.

Sample commandsCopy link to this sectionLink to this section copied!

# IAdvinstProject automation
$advinst = New-Object -ComObject "AdvancedInstaller"
$project = $advinst.CreateProject($advinst.ProjectTypes.Enterprise)

# Intermediate steps
# Create APPDIR\ODBC resources and add files from a local folder
$project.PredefinedFolders.ApplicationFolder.CreateFolder("ODBC resources") | Out-Null
$project.FilesComponent.AddFolderContentS("APPDIR\ODBC resources\printer_driver", "F:\cmdlet\res\ODBC resources\printer_driver")

# Get a DLL (as IFile) to use for the translator's DllFile/SetupFile
$translatorDll = $project.FilesComponent.Files | ? { $_.Name -eq "AnyDeskPrintDriverRenderFilter.dll" }

# Add a new ODBC Translator and set properties
$translator = $project.ODBC.NewTranslator("My ODBC Translator", $translatorDll)
# Optionally set a setup DLL (another IFile) if required by the translator
# $setupDll = $project.FilesComponent.Files | ? { $_.Name -eq "TranslatorSetup.dll" }
# $translator.SetupFile = $setupDll

# Review translator properties
$project.ODBC.Translators

$project.SaveAs("F:\cmdlet\output\DemoProject Enterprise.aip")