Score:1

How to disable Program Files redirection for 32 bit Programs (for testing purposes)?

cn flag

Customer somehow managed to set up their Windows servers so Program Files -> Program Files (x86) doesn't happen for 32 bit applications. The other redirections of Windows\System32 -> Windows\Syswow64 and HKLM\SOFTWARE -> HKLM\SOFTWARE\Wow6432Node are still in effect.

I'm pretty confident they did not inject a DLL everywhere that does Wow64DisableWow64FsRedirection but some other magic is in effect that I've never heard of. Unfortunately the customer doesn't know either. The server admin didn't know about 32 bit redirection of disk paths but only registry.

I'd really like to know how this could be done so I could study the dynamics of this behavior. Our application really sensitive to folder redirection and normally doesn't work if installed to C:\Program Files because of it; but somehow this customer managed to evade both 32 bit redirection and UAC redirection. I suspect the latter is because of the former and UAC redirection simply doesn't exist on C:\Program Files but only C:\Program Files (x86).

I wasn't able to directly check what the 64 bit Program Files directory is, but the 32 bit Program Files directory is C:\Program Files (x86).

Our own installer is 32 bit (most of the software is compiled as .NET Any CPU so the same install package works for both.) Testing on my machines results in trying to install to C:\Program Files actually installs to C:\Program Files (x86) as expected (however the application doesn't work correctly because the installation directory registry key was set wrong for 64 bit view).

There's some strange things going on on their servers and they're opening support requests and I'd really rather not tell them to rebuild their environment without real evidence, especially because I don't know what's allowing it to work in the first place. Changing the install path might not actually help. My understanding is this should blow up as soon as a 32 bit application (such as MS Office -- they're stuck with 32 bit MS Office because Access DB reasons) tries to load a dll from C:\Program Files\Common Files Note that our application also has 32 bit components; and 32 bit executables can start and load dlls from C:\Program Files in their environment.

The OS is either Windows Server 2016 or 2019.

Yes I would normally conclude trying to do this is a bad idea. I would be in a much better position if I could test and see how bad.

Please don't tell me this can't be done. I've seen it done. I have no idea how.

anx avatar
fr flag
anx
Maybe you know the name of other weird legacy app they are running, and can find the relevant hack they applied from that applications "how to run in server 2008 and later" guide? (the ms access workaround is documented by Microsoft in a way that should not break things, anything else from that category?)
joshudson avatar
cn flag
@anx: Not sure what MS Access workaround you're talking about. The MS Access workaround they're using is install 32 bit Office (which works just fine on 64 bit Windows as-is). The main weirdity is Carbon Black but it doesn't normally do _this_. We did have to tell them to get the scanner redirection driver out of our main process's address space. That's a DLL injection that was causing problems. We run the scanner API calls out of process because of too many broken scanner drivers. But again; that should not do _that_.
cn flag
The only 32-bit application that fails is your installer? Yeah, that is "weird".
joshudson avatar
cn flag
@GregAskew: Not quite. Our installer was expected to fail and didn't. Our application is having issues we don't understand. They're not turning into errors, but CPU usage is high and performance is bad.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.