How to Force Intune to Run App Installations in a 64-bit Context

Written by Horatiu Vladasel · October 18th, 2024 · 3min read

Those of you already familiar with Intune might have noticed that, by default, Intune runs the application installer process in a 32-bit context. Unlike SCCM, Intune doesn’t offer an option to start app installation in a 64-bit context with a simple checkbox.

However, before we explore how to force Intune to run app installation in a 64-bit context, let’s first clarify the difference between System32 and SysWOW64.

System32 vs. SysWOW64

Both System32 and SysWOW64 are system folders that contain important system-wide files, typically DLLs or library files used by applications.

On a 64-bit OS, the behavior of these folders varies based on whether the application is 32-bit or 64-bit.

64-bit application installer copies:

  • Primary files in C:\Program Files
  • System-wide files in C:\Windows\System32
  • Registry settings in the standard registry hive

32-bit application installer store:

  • Primary files in C:\Program Files (x86)
  • System-wide files in C:\Windows\SyWOW64
  • Registry settings in SysWOW6432Node registry hive

NoteFor more details, check out What is the SysWOW64 folder and what is it used for? article.

Intune Win32 Application Deployment: System32 vs. SysWOW64

Before uploading a package into Intune, you usually test the installation in the system context and ensure that everything works as expected.

In this instance, the command prompt, cmd.exe executes from the C:\Windows\System32 location and the installation process executes as 64-bit.

However, when the same package is deployed via Intune, the installation process executes as 32-bit, with the command prompt executing from the C:\Windows\SysWOW64 location.

This change in context can result in a different behavior, such as registry entries being written to the SysWOW6432Node hive instead of the standard registry hive.

How to Force Intune to Launch the App Installer in a 64-bit Context

The solution to running the app installation in a 64-bit context with Intune is simple.

You just need to modify your Intune install command to specify the correct system files.

For Command Prompt:

%systemroot%\SysNative\cmd.exe

For PowerShell scripts:

%systemroot%\SysNative\WindowsPowershell\v1.0\PowerShell.exe

The Sysnative directory is a special alias used in 32-bit applications running on 64-bit Windows.

It allows 32-bit processes to access the System32 directory, which contains the 64-bit binaries, bypassing the usual redirection to SysWOW64.

To test the execution context, you can use the following PowerShell script:

If ([Environment]::Is64BitProcess)
{
	[System.Windows.MessageBox]::Show('This process runs in 64-bit context.')
}
Else
{
	[System.Windows.MessageBox]::Show('This process runs in 32-bit context.')
}

Also, remember to tweak the Intune install command line to use ServiceUI. It should look something like this:

ServiceUIx64.exe -process:explorer.exe %systemroot%\SysNative\WindowsPowershell\v1.0\PowerShell.exe -ExecutionPolicy Bypass -File Install.ps1

NoteTo learn more about ServiceUI for Intune deployments, check out How to Display Interactive User Messages during an Intune System Deployment article.

When installation is triggered, the following pop-up message will be displayed to the user.

this run in 64 bit context

Conclusion

Understanding the distinction between 32-bit and 64-bit contexts, as well as the differences between System32 and SysWOW64, is essential for successful Intune Win32 app deployments.

By using the SysNative alias and adjusting your install commands, you can force Intune to execute installations in a 64-bit context, ensuring consistency between your testing environment and actual deployments.

Additionally, incorporating ServiceUI can enhance user interaction during the installation process. Implementing these techniques will help you avoid common pitfalls, such as incorrect registry entries or misbehaving installations, leading to smoother and more reliable Intune deployments.

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: