AIStub.exe in MSIX - Advanced Installer's PSF Launcher

Written by Horatiu Vladasel · December 2nd, 2026 · 3min read

Ever looked inside an MSIX package created with Advanced Installer and noticed a file named AIStub.exe? If so, you may have wondered why it's there and what purpose it serves.

The answer is quite simple: AIStub.exe is part of Advanced Installer's solution for the Package Support Framework (PSF). It acts as a PSF launcher that Advanced Installer automatically injects into the package in certain scenarios.

Explaining the AIStub.exe PSF launcher concept

If you've previously worked with the MSIX Packaging Tool, this concept will likely sound familiar.

In MSIX Packaging Tool, the equivalent is PsfLauncher.exe, which performs a similar role by launching the application through the Package Support.

When Advanced Installer injects this launcher into your package, you'll see a new AI_STUBS folder in the package's file structure. This directory contains AIStub.exe and any other supporting files required for the PSF integration.

AI_STUBS folder containing AIStub.exe in an MSIX package

You'll also see another important change: the package manifest is automatically updated so that AIStub.exe becomes the application's entry point.

Windows doesn’t launch your executable directly, instead it launches AIStub.exe, which in turn initializes the PSF components that are needed and then hands control over to your application.

<Applications>
    <Application EntryPoint="Windows.FullTrustApplication" Executable="AI_STUBS\AiStubX64.exe" Id="MyApp">
      <uap:VisualElements AppListEntry="default" BackgroundColor="transparent" Description="MyApp" DisplayName="MyApp" Square150x150Logo="Assets\MyAppSquare150x150Logo.png" Square44x44Logo="Assets\MyAppSquare44x44Logo.png">
        <uap:InitialRotationPreference>
          <uap:Rotation Preference="portrait" />
          <uap:Rotation Preference="landscape" />
        </uap:InitialRotationPreference>
      </uap:VisualElements>
    </Application>
  </Applications>

You might have noticed in the manifest above that the executable is specifically named AiStubX64.exe.

If your package contains 32-bit elements then Advanced Installer will automatically inject AiStubx86.exe (or AiStubX64.exe in the case of 64-bit packages). This architecture mapping is done behind the scenes and you will not have to do anything in order for your package to run seamlessly.

Now, let’s dig deeper and see some scenarios where AIStub.exe is automatically injected by Advanced Installer:

Scenarios

1. When you need to set a working directory for your shortcut

Working directory shortcut setup in Application Details

If you go to Virtual Registry, you can see that the following registry keys have been injected, which are used to parse the working directory for your application executable.

Virtual Registry key injected by AIStub.exe to set the shortcut working directory

2. When you need to set command-line arguments for your shortcut

Virtual Registry key used by AIStub.exe to pass command-line arguments

Its corresponding registry key is used to parse the arguments to your application executable.

3. When you need to set a non-executable file as the target application for your shortcut

Shortcut executable set in Application Details

Its corresponding registry key is used to launch the batch file.

Virtual Registry key letting AIStub.exe launch a non-executable target file

4. When you need to set an environment variable

Environment Variable set for EXE app

Its corresponding registry key is used to set the environment variable within the MSIX package.

Virtual Registry key set by AIStub.exe for an MSIX environment variable

5. When your application contains resources under the User Profile

User Profile application resources

Its corresponding registry key is used for file redirection.

Virtual Registry key used by AIStub.exe for file redirection

6. When you have any PSF fixup included within your package

PSF Fix-up Properties in MSIX package

In this scenario, the corresponding Fixup resources are also injected into the MSIX package along with AiStub.exe.

PSF fixup resources injected alongside AIStub.exe in the MSIX package

Conclusion

Understanding why AIStub.exe is included in your MSIX package can help you troubleshoot and inspect packages generated by Advanced Installer.

Written by
See author's page
Horatiu Vladasel

Horatiu is a Software Packager/Sequencer with over 10 years experience, who has worked as a Software Packager at IBM and is currently offering software packaging services to companies such as BT or Nationwide.

Comments: