Thoughts, ideas, ramblings. Covering a wide range of topics from Windows to Linux, Azure, hardware, software & more.

Using the “sysnative” folder in Intune App Deployments

64-bit operating systems are very common, but we still have some applications on Windows that are 32-bit only. This runs in a compatibility layer called SysWOW64. The WOW stands for Windows on Windows.

While misleading, the System32 folder holds 64-bit files, and SysWOW64 contains 32-bit files. This is a result of the paths being used in legacy applications and so System32 couldn’t just be renamed.

When executing in 32-bit land, the file system automatically redirects certain files to their SysWOW64 counterpart. This can be confusing when expecting something (like a DLL) to show up in System32 and it instead appears in SysWOW64.

Where does Intune come into this?

When deploying Windows apps via Intune, you provide an install command to instruct the Intune Management Agent (32-bit) on how to start the installation.

If your application is doing some tasks around System32 (for example), then your actions will actually be “incorrectly” translated into SysWOW64.

If you need to execute in a 64-bit space from a 32-bit process (i.e. Intune Management Agent), use the following redirected path:

%SYSTEMROOT%\sysnative\cmd.exe /C "your command"

The “sysnative” path is a magic redirected folder in WOW, introduced in Windows Vista. It’s explained in more detail here:

What about the registry?

The same happens in the registry. A key added via Command Line or Batch running in a 32-bit WOW environment will end up under Computer\HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node.

To get around this, you can either run your batch as sysnative (described above) or you can use a special switch on reg.exe to insert into a 32-bit or 64-bit registry:

  • /reg:32 Specifies the key should be accessed using the 32-bit registry view.
  • /reg:64 Specifies the key should be accessed using the 64-bit registry view.


Leave a Reply

Your email address will not be published. Required fields are marked *