gr8dude Posted May 6, 2010 Share Posted May 6, 2010 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 x86There 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\CLSID2 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\CLSIDThe 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 = SetupapiCopyFiles = CopyFiles,CopyFiles.amd64RunPreSetupCommands = Install_CertificateRunPostSetupCommands= RunPostSetup,RunPostSetupRegistry_ntamd64UpdateInis = CreateStartMenuFolderCustomDestination = CustDestDirAddReg = RegAdd, RegAdd_register, RegAdd64testSmartReboot = N;RegisterDlls = RegisterAddins[RegAdd64test]; .SKF file extension association and iconHKLM, 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:Is setupAPI subject to registry redirection?Why don't the decorators work as expected?Any ideas will be greatly appreciated. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now