Skip to content
View in the app

A better way to browse. Learn more.

MSFN

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

SetupAPI on 64-bit platforms vs registry redirection

Featured Replies

Hi everyone, I am facing a tricky case and I hope I can get some advice on how to deal with it.

Environment: Windows 7 x64, Windows XP x86

There is an installer that uses SetupAPI to install a program on a system. The program is a 32-bit application, it has an Explorer context menu plugin. It is a DLL that needs to be registered by creating a key in

HKLM\Software\Classes\CLSID

2 versions of the DLL exist, a 32-bit one for x86 platforms, and a 64-bit one for x64 platforms (AMD64, to be more specific).

This works as expected on 32-bit platforms, but on 64-bit platforms registry redirection kicks in, and instead the key is created in

HKLM\Software\Classes\Wow6432Node\CLSID

The context menu doesn't work, because Explorer.exe is a 64-bit process, hence it doesn't see that part of the registry.

Unfortunately I failed to find any resource that would indicate whether actions performed by setupAPI are subject to registry redirection or not. However, the documentation states that one can use decorators in the sections of the INF file. I assume that if an action is performed from a section that was decorated as "ntamd64", it would be executed without being altered by the redirection magic.

Unfortunately, my experiment brought me to the conclusion that the decorator is not having this effect; not only that - but it appears to be completely ignored (the key is not created in the "Wow6432Node" section either).

Here's an outline of my INF


[DefaultInstall.ntamd64]
RequiredEngine = Setupapi
CopyFiles = CopyFiles,CopyFiles.amd64
RunPreSetupCommands = Install_Certificate
RunPostSetupCommands= RunPostSetup,RunPostSetupRegistry_ntamd64
UpdateInis = CreateStartMenuFolder
CustomDestination = CustDestDir
AddReg = RegAdd, RegAdd_register, RegAdd64test
SmartReboot = N
;RegisterDlls = RegisterAddins

[RegAdd64test]
; .SKF file extension association and icon
HKLM, Software\Classes\CLSID\{A23zzzC51BC-5D02-45a2-A5F1-7775DB68FB84}, , ,"SKIntegr45 Class"

I suspect the problem is in the incorrect use of decorators, because the actions specified in "CopyFiles.amd64" are not performed either.

So, this boils it down to these questions:

  1. Is setupAPI subject to registry redirection?
  2. Why don't the decorators work as expected?

Any ideas will be greatly appreciated.

Create an account or sign in to comment

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.