Thinfinity® VirtualUI Injector: User Guide

Thinfinity® VirtualUI Injector: User Guide

Introduction

The Thinfinity® VirtualUI Injector is a powerful tool designed to simplify and accelerate the application virtualization process using the Thinfinity VirtualUI protocol on the Workspace Server. This advanced injector seamlessly integrates the necessary libraries into applications without requiring recompilation, recoding, or extensive testing, significantly improving deployment efficiency.

It is especially effective for virtualizing complex applications that depend on external DLLs or third-party components, even when source code access is limited. The injector supports a wide range of programming languages and frameworks, accommodating both 32-bit and 64-bit architectures.

Upon activation, it analyzes the application's structure and intelligently applies modifications to ensure a seamless user experience. The result is a responsive, web-like interface with full native functionality. Key features such as file transfers, drag-and-drop operations, and printing are optimized to deliver a smooth, consistent experience across devices.


Is Injecting VirtualUI Equivalent to Manually Adding the DLL to Your Code?

When virtualizing an application with Thinfinity VirtualUI, adding the DLL directly to your code provides a handle to the VirtualUI library, allowing you to customize its behavior by modifying the application's code.

In contrast, the injector automatically applies default behaviors to application events, which cannot be adjusted during runtime. However, in most cases, the injector performs as expected, requiring no changes to the application. It also serves as a quick way to preview how your application will function as a web-based app.

Key functionalities such as file transfers (IN/OUT), file open/save dialogs, drag-and-drop, printing, and executing virtualized processes (e.g., ShellExecute) are supported by default. Additionally, you can mix 32-bit and 64-bit applications within the same project, enabling seamless interaction between them, and combine native VirtualUI integration with injected components as needed.

Alert
It's important to note that injection may not be suitable for every application and requires testing to determine compatibility.

Using the Thinfinity VirtualUI Injector

Prerequisites

Before starting, ensure you have the following:
  1. Target application for Virtualization: Select the application you wish to virtualize and confirm its compatibility with the Thinfinity VirtualUI protocol.
  2. Thinfinity VirtualUI Injector: This tool is included in your Thinfinity Workspace installation. No additional installation is required.

Integrating the VirtualUI Injector with Your App

      1.  Ensure that Thinfinity Workspace is installed on your system (default path: C:\Program Files\Thinfinity\Workspace).

      2. Navigate to the Bin32 and Bin64 directories, which contain the necessary launcher files.
      
      3. Identify if your application is 32-bit or 64-bit to ensure you use the correct injector. To check this, open Task Manager and navigate to the Details tab. Right-click a column header, select Select Columns, and add Architecture to display this information.





      4. Use Thinfinity.LauncherExp.exe to inject the VirtualUI DLL into your application. Select the launcher that corresponds to your application’s architecture (32-bit or 64-bit).

      5. Create a file named <YourAppName>.Thinfinity.ini in the same directory as your application's executable (<YourAppName>.exe).

      6. Add the following lines to the file:
  1. [Options]
  2. OptionsSet=$1000

      This file establishes the necessary settings for Thinfinity VirtualUI to properly interact with your application.


Injection Techniques

Thinfinity Workspace offers multiple methods to inject VirtualUI into an application. Testing each option will help determine the most suitable one for your application.

  1. Configure a profile that uses the launcher executable (Thinfinity.LauncherExp.exe) and passes your application's executable as a parameter like so:  VirtualUIApp. /LAUNCH_WITH_VIRTUALUI <your app> param1 param2.

    Example:
    In this example case, we'll use a Windows64 architecture application.
    Enter the Launcher path in the Program File Name field: C:\Program Files\Thinfinity\Workspace\bin64\Thinfinity.LauncherExp.exe.
    Enter the following in the Arguments field: /LAUNCH_WITH_VIRTUALUI  C:\Notepad64++\notepad++.exe.



      B. Renaming the Application for Injection

This technique is useful when virtualizing an application that calls another executable, whether as a pure or injected app. In such cases, it may be necessary to preserve the original name of the executable file. Applications like reporting tools, data analysis software, or specialized communication products are common candidates for this approach.

However, renaming the executable can sometimes cause issues, particularly with 64-bit applications. For example, VB.NET applications often have built-in protection mechanisms that prevent them from functioning correctly if renamed (e.g., changing <app>.exe to <app>_real.exe).

In contrast, 32-bit applications are generally more tolerant of renaming and can continue to function normally after the name is changed.

Alert
Always test thoroughly after renaming to ensure the application behaves as expected.


       Follow These Steps to Rename Your Application:
  1. Rename <app>.exe to <app>_real.exe.
  2. Copy C:\Program Files\Thinfinity\Workspace\bin32\LauncherExp.exe to the application's directory.
  3. Rename LauncherExp.exe to <app>.exe.
  4. In the Thinfinity Workspace Console, create a VirtualUI profile and set <app>.exe as the executable.


                        5. Note that you can set the icon in the .exe file by selecting the <app>_real.exe. For example:




      C. VirtualUI Launcher /VIRTUALUI
You can configure the launcher as a profile to test your applications. As mentioned earlier, not all applications are suitable for the injection process, so this allows you to test compatibility. Ensure you use the correct architecture—use the x64 version for 64-bit applications in this example.




When it runs, a Virtualizer window will open. Upon clicking on Virtualize, you can select the application to inject. In this case, select C:\Windows\System32\notepad.exe and then click Open.


User Experience (UX)
When you inject an application, the user experience closely resembles that of a native web application.
Continuing with the example, if you choose File > Open, the injected application will open a dialog box allowing you to select the file from your local system, rather than from the server side.




Similarly, when you select File > Print, the Thinfinity VirtualUI Printer will appear as the default printer. 




It converts the print job to PDF and displays the results in the browser.



Testing

Before finalizing the virtualization process, it is essential to conduct thorough testing to ensure the application functions seamlessly in the virtualized environment. Verify that all critical features and functionalities are working as expected. This step helps identify any potential issues that may not be apparent in a non-virtualized setup.

Deployment

Once the application's performance and stability are confirmed in the virtualized environment, proceed with deployment. Follow best practices for deploying virtual applications to maintain reliability and security in the production environment.


    • Related Articles

    • Thinfinity VirtualUI: Integration with Different Coding Languages

      Product: Thinfinity VirtualUI Version: 3 and above Introduction Thinfinity VirtualUI is a software solution designed to easily integrate Windows-based applications with web technologies, enabling remote access through web browsers. It extends the ...
    • Thinfinity® VirtualUI: Testing with Development Server

      Product: Thinfinity VirtualUI Version: 3 and above Introduction Thinfinity VirtualUI is a software solution designed to simplify web integration for Windows-based applications. This guide will walk you through the process of getting started with ...
    • Thinfinity VirtualUI: Publishing an Application

      Product: Thinfinity VirtualUI Version: 3 and above Introduction Thinfinity VirtualUI is a software solution designed to facilitate web integration for Windows-based applications. This guide will walk you through the process of getting started with ...
    • Integrate an MFC application with Thinfinity VirtualUI

      Overview Welcome to this step-by-step tutorial on integrating your application with Thinfinity VirtualUI on your development machine. In this guide, we'll cover the fundamental steps to transform your Windows application into a web-accessible ...
    • How to set up permissions for an application in Thinfinity VirtualUI

      Product: Thinfinity VirtualUI Version: 3 and above Introduction To guarantee appropriate access for each user, it's important to set up permissions in the Application Profiles Editor found in the Thinfinity VirtualUI Server Manager. We'll cover the ...