PDA

View Full Version : System32 and SysWOW64



NewsArchive
01-18-2013, 12:48 AM
More and more users switch to x64 Windows operating systems and support
requests similar to the following are under our top 10 FAQs now:

QUESTION:

> I'm working on adding a couple of dlls from the development
> computer to the destination computer and I'm adding the two
> dlls in the System32 folder (they have to be in that specific
> folder). I just navigate to the System32 folder in the bottom
> left panel and I select my dlls from the destination computer
> and click add. After I compile and install it on my target
> machine, the dlls automatically go in the SysWOW64 not the
> System32. Any idea why that's happening?

ANSWER:

On Windows x64 systems, 32-bit DLLs always go into the SysWow64 folder.
Only native 64-bit DLLs have to be installed to System32 on x64 systems
(when running the setup in x64 mode).

SetupBuilder lets you build installations for 32-bit and both pure 64-bit
applications and hybrid applications that mix 32-bit and 64-bit code.

[Taken from the SetupBuilder manual]

Not long ago, 64-bit systems were a future technology reserved almost
exclusively for high-end enterprise implementations. The widespread adoption
of the 64-bit capabilities for x86 architecture (referred to as x64) by both
computer manufacturers and Microsoft, however, dramatically changed the
computing landscape. Now, 64-bit systems are a reality for both high-end
enterprise systems and small-to-midsized businesses (SMBs). 64-bit computing
is moving into the mainstream and will gradually replace 32-bit computing.
Microsoft foresees significant adoption of 64-bit-capable systems.

WOW64, short for "Windows-32-on-Windows-64," is responsible for providing
two levels of support for 32-bit legacy applications. WOW64 prevents file
and registry collisions between 32-bit and 64-bit versions of applications
by redirecting the 32-bit registry and file system accesses.

SetupBuilder Developer Edition lets you create native 32-bit, hybrid
32/64-bit, or 64-bit enabled setup programs.

Although the WOW64 subsystem doesn't support every type of application, it
does let Windows x64 run almost all 32-bit existing Windows applications.
The types of applications that aren't supported are low-level applications
such as antivirus programs or programs that attempt to directly access
system hardware. The 32-bit applications that run in the WOW64 subsystem are
executed at full speed. In fact, because of the larger data path the x64
architecture provides, many 32-bit applications will actually run faster in
the WOW64 subsystem than they would on native 32-bit hardware.

The WOW64 subsystem isolates the execution of 32-bit applications from
64-bit applications.

First, the system files in Windows x64 Edition are not present on just the
Windows\System32 folder, but split into two folders to separate the 32-bit
applications from the 64-bit applications. The WOW64 subsystem intercepts
calls from a 32-bit legacy application and redirects it to the
Windows\SysWow64 folder. If the call is from a 64-bit application, then the
call is routed to the Windows\System32 folder and does not involve the
WOW64. Microsoft has retained the name System32 for the folder, which hosts
the 64-bit system files. The "Program Files" folder on a x64 system which
stores 32-bit legacy applications is named Program Files (x86). 64-bit
applications are stored in the Program Files folder.

Second, the WOW64 subsystem also provides redirection at the Registry level.
Computers that are running an Windows x64-based operating system use a
different registry layout to handle both 32-bit and 64-bit programs. The
registry layout changes in x64 Edition versions of the Windows operating
system make sure that the programs hard-coded .dll paths, program settings,
and other parameter values are not overwritten. If the call is from a 32-bit
application, then the call to access the HKLM\Software registry hive is
intercepted by the WOW64 subsystem and redirected to the
HKLM\Software\Wow6432Node. If the call is from a 64-bit application, then it
is routed to the HKLM\ Software node.


-- Registry Redirection

To prevent 32-bit registry settings from overwriting the 64-bit registry
settings, computers that are running an x64-based version of Windows store
the settings for 32-bit programs in a new branch in the registry.

32-bit programs and 64-bit programs that are running on an x64-based version
of Windows operate in different modes and use the following sections in the
registry:

* Native mode 64-bit programs run in Native mode and access keys and values
that are stored in the following registry sub key:

HKEY_LOCAL_MACHINE\Software

* 32-bit programs run in WOW64 mode and access keys and values that are
stored in the following registry sub key:

HKEY_LOCAL_MACHINE\Software\WOW6432node

This redirection lets you maintain separate configurations for 32-bit and
64-bit processes. 64-bit programs see the 64-bit version of the registry,
while 32-bit programs see the 32-bit version.


-- File System Redirection

All 32-bit file access to the %systemroot%\system32 folder is redirected to
the %systemroot%\syswow64 folder (the %systemroot%\syswow64 that contains a
copy of 32-bit Windows system executable programs). This redirection lets a
32-bit applications load the correct 32-bit system executables rather than
attempting to access the 64-bit OS executable programs.


Friedrich

--
Friedrich Linder
Lindersoft
www.lindersoft.com
+1.954.252.3910

--Helping You Build Better Installations
--SetupBuilder "point. click. ship"
--Create Windows 8 ready installations in minutes
--Official Comodo Code Signing and SSL Certificate Partner

NewsArchive
01-18-2013, 12:49 AM
Hi Friedrich,

So \System32 is (perversly) where the 64Bit stuff goes, and SysWOW64 (should
have been called SysW32OnW64) is where the 32Bit stuff goes, is that right?

WOW64 is a bit like C6C8 (Clarion 6 on Clarion 8) and equally confusing
redirection wise <vbg>

Graham

NewsArchive
01-18-2013, 12:50 AM
Graham,

> So \System32 is (perversly) where the 64Bit stuff goes, and SysWOW64 (should
> have been called SysW32OnW64) is where the 32Bit stuff goes, is that right?

This is one place where MS was obviously doing some BAD drugs! I've
had this conversation with a few others that are STILL confused!<g>

--
Lee White

RPM Report Viewer.: http://www.cwaddons.com/products/rpm/
RPM Review........: http://www.clarionmag.com/cmag/v11/v11n06rpm.html
Report Faxing.....: http://www.cwaddons.com/products/afe/
---Enroll Today---: http://CWaddons.com

Enhanced Reporting: http://CreativeReporting.com

Product Release & Update Notices
http://twitter.com/DeveloperPLUS

Windows 8 brings us "The Oval, Bumper Car, Roller Coaster of Wait!"

NewsArchive
01-18-2013, 12:50 AM
Hi Lee,

Just wondering, is there a \System folder on 64Bit Windows systems, and if
so _what_ goes in that?

Graham

NewsArchive
01-18-2013, 12:50 AM
Graham,

> Just wondering, is there a \System folder on 64Bit Windows systems, and if
> so _what_ goes in that?

It's there but empty.

--
Lee White

RPM Report Viewer.: http://www.cwaddons.com/products/rpm/
RPM Review........: http://www.clarionmag.com/cmag/v11/v11n06rpm.html
Report Faxing.....: http://www.cwaddons.com/products/afe/
---Enroll Today---: http://CWaddons.com

Enhanced Reporting: http://CreativeReporting.com

Product Release & Update Notices
http://twitter.com/DeveloperPLUS

Windows 8 brings us "The Oval, Bumper Car, Roller Coaster of Wait!"

NewsArchive
01-18-2013, 12:50 AM
> It's there but empty.
I suppose leaving \System32 for 32Bit stuff and putting the 64Bit stuff into
\System was just too obvious <vbg>

Graham

NewsArchive
01-18-2013, 12:51 AM
system = 16-bit
system32 = "native-bit"
syswowsummat = "inscrutable-bit"

I see the logic :-)

Simon Kemp

NewsArchive
01-18-2013, 12:52 AM
At least it's consistant with how Program Files is named.<g>

Jeff Slarve
www.jssoftware.com
www.twitter.com/jslarve
I'll search help files & Google for you.

NewsArchive
01-18-2013, 12:52 AM
Don't get me started on my days of teaching NT.
Look up "system partition" and "boot partition".

Guess which one is where system32 is located.
Guess which one is where boot.ini was located.

Oy....

Jane Fleming

NewsArchive
01-18-2013, 12:53 AM
Graham,

> I suppose leaving \System32 for 32Bit stuff and putting the 64Bit stuff into
> \System was just too obvious <vbg>

Wait until Windows 127-bit is released.

(yes, 127 - that leaves a little bit for future use)

--
Lee White

RPM Report Viewer.: http://www.cwaddons.com/products/rpm/
RPM Review........: http://www.clarionmag.com/cmag/v11/v11n06rpm.html
Report Faxing.....: http://www.cwaddons.com/products/afe/
---Enroll Today---: http://CWaddons.com

Enhanced Reporting: http://CreativeReporting.com

Product Release & Update Notices
http://twitter.com/DeveloperPLUS

Windows 8 brings us "The Oval, Bumper Car, Roller Coaster of Wait!"

NewsArchive
01-18-2013, 12:53 AM
Hi Graham,

> So \System32 is (perversly) where the 64Bit stuff goes, and SysWOW64
> (should have been called SysW32OnW64) is where the 32Bit stuff goes, is
> that right?

Yes, that's right. But you never "hard-code" the SysWOW64 part. The
installer and the Windows x64 operating systems (starting with Windows XP
x64) handle all this quietly behind the scenes.

> WOW64 is a bit like C6C8 (Clarion 6 on Clarion 8) and equally confusing
> redirection wise <vbg>

<G> ;-)

Friedrich

NewsArchive
01-18-2013, 12:53 AM
Hi Friedrich,

> ......... But you never "hard-code" the SysWOW64 part.........

Ah, now that bit took a little while to sink in :-)

So you actually script \System32 and the installer, working with your
installer option setting and the current OS determines whether to 'redirect'
to SysWOW64 or not.

Presumably the install LOG files show the actual install paths rather than
the scripted paths?

Graham

NewsArchive
01-18-2013, 12:54 AM
Additional note: It turned out this support request was a bit different.

The customer HAS native 64-bit DLLs and would like to install them into the
(64-bit) System32 folder.

So in this case, the correct way to handle it is to set "General
Information" -> "Generator Settings" -> "Generator Type" to "Windows
64-bit".

SetupBuilder will compile a 64-bit mode installer to access the "real"
64-bit Program Files and System32 folder.

BTW, it's also possible to create a "hybrid" setup to install 32-bit AND
64-bit files. But that's another story <g>.

Friedrich

NewsArchive
01-18-2013, 12:55 AM
> Not long ago, 64-bit systems were a future technology reserved almost
> exclusively for high-end enterprise implementations.

That must be some old text:)

My first 64 bit development desktop arrived in 2007, maybe 2008. Paid $1025
for it from a local PC shop, custom built. :)
--

Mark Riffey
http://www.rescuemarketing.com
Now featured on the Visa Business Network
If Guy Kawasaki, the staff of the Wall Street Journal,
Fast Company, US Bank, Marketing Profs & Business Week read it,
maybe you should too.

NewsArchive
01-18-2013, 12:56 AM
That's nothing. My son had a Nintendo 64 around 1996/1997<g>.

Jeff Slarve
www.jssoftware.com
www.twitter.com/jslarve
I'll search help files & Google for you.

NewsArchive
01-18-2013, 12:56 AM
Jeff,

> That's nothing. My son had a Nintendo 64 around 1996/1997<g>.

My Nephew had a Commodore 64 back in the 80's. He even had Sprint
contact his mother one day... probably shouldn't have bought that
modem!!!<g>

--
Lee White

RPM Report Viewer.: http://www.cwaddons.com/products/rpm/
RPM Review........: http://www.clarionmag.com/cmag/v11/v11n06rpm.html
Report Faxing.....: http://www.cwaddons.com/products/afe/
---Enroll Today---: http://CWaddons.com

Enhanced Reporting: http://CreativeReporting.com

Product Release & Update Notices
http://twitter.com/DeveloperPLUS

Windows 8 brings us "The Oval, Bumper Car, Roller Coaster of Wait!"

NewsArchive
01-18-2013, 12:56 AM
That's nothing. We used legal sized punch cards.

--

Russ Eggen
RADFusion International, LLC

NewsArchive
01-18-2013, 12:56 AM
On 17 Jan 2013 16:07:28 -0500, Russ Eggen wrote:

> punch cards.

See? :)
--

Mark Riffey
http://www.rescuemarketing.com
Now featured on the Visa Business Network
If Guy Kawasaki, the staff of the Wall Street Journal,
Fast Company, US Bank, Marketing Profs & Business Week read it,
maybe you should too.

NewsArchive
01-18-2013, 12:57 AM
Mark,

> See? :)

I don't drink beer but I did cook a smoked salmon with cream cheese
omelet last night so now FOOD has been broached!!!

--
Lee White

RPM Report Viewer.: http://www.cwaddons.com/products/rpm/
RPM Review........: http://www.clarionmag.com/cmag/v11/v11n06rpm.html
Report Faxing.....: http://www.cwaddons.com/products/afe/
---Enroll Today---: http://CWaddons.com

Enhanced Reporting: http://CreativeReporting.com

Product Release & Update Notices
http://twitter.com/DeveloperPLUS

Windows 8 brings us "The Oval, Bumper Car, Roller Coaster of Wait!"

NewsArchive
01-18-2013, 12:57 AM
mmmm

Jeff Slarve
www.jssoftware.com
www.twitter.com/jslarve
I'll search help files & Google for you.

NewsArchive
01-18-2013, 12:58 AM
Shrimp cocktail. Now settling back with a Glenlivet (in a proper snifter).

--

Russ Eggen
RADFusion International, LLC

NewsArchive
01-18-2013, 12:59 AM
> That's nothing. My son had a Nintendo 64 around 1996/1997<g>.

LOL... soon this thread will disintegrate to punch cards and beer:)
--

Mark Riffey
http://www.rescuemarketing.com
Now featured on the Visa Business Network
If Guy Kawasaki, the staff of the Wall Street Journal,
Fast Company, US Bank, Marketing Profs & Business Week read it,
maybe you should too.

NewsArchive
01-18-2013, 12:59 AM
He wanted a Nintendo really bad. He also wanted a game boy.

This was before his Mom agreed to allow video games into his life.

I suggested calling a cardboard box a Pretendo. He didn't like that,
so how about a Lame Boy? Didn't like that either.

Jeff Slarve
www.jssoftware.com
www.twitter.com/jslarve
I'll search help files & Google for you.

NewsArchive
01-19-2013, 01:58 AM
Hi Graham,

>> ......... But you never "hard-code" the SysWOW64 part.........
>
> Ah, now that bit took a little while to sink in :-)
>
> So you actually script \System32 and the installer, working with
> your installer option setting and the current OS determines whether
> to 'redirect' to SysWOW64 or not.
>
> Presumably the install LOG files show the actual install paths
> rather than the scripted paths?

This can be somewhat confusing, but there is some kind of "emulator" in
Windows x64 that redirects 32-bit application calls to System32 to the
SysWOW64 folder transparently. So even if the Sytem32 folder is
"hard-coded" in a 32-bit app (like C:\Windows\System32), the emulator will
make sure that the SysWOW64 folder is used instead. But it is not valid to
hard-code things like C:\Windows\SysWOW64.

Both the 32- and 64-bit Windows applications always "talk" to the System32
folder. As a result, you'll always see System32 in the SetupBuilder install
LOG. The tricky thing is that the installer knows in what "bitness mode" it
is running. So based on this mode (x86 or x64), it can access the "real"
System32 folder (for 64-bit components) or the "emulated" System32 folder
(SysWOW64) for 32-bit apps. This technology allows us to install a 32-bit
and 64-bit application from the very same setup.exe.

Friedrich

NewsArchive
01-19-2013, 01:59 AM
Hi Friedrich,

> Both the 32- and 64-bit Windows applications always "talk" to the System32
> folder. As a result, you'll always see System32 in the SetupBuilder
> install LOG. The tricky thing is that the installer knows in what
> "bitness mode" it is running. So based on this mode (x86 or x64), it can
> access the "real" System32 folder (for 64-bit components) or the
> "emulated" System32 folder (SysWOW64) for 32-bit apps. This technology
> allows us to install a 32-bit and 64-bit application from the very same
> setup.exe.

Ah OK got that, so basically it's 'just' down to a support issue ie knowing
where to look for the program components.

Graham

NewsArchive
01-19-2013, 01:59 AM
> I suggested calling a cardboard box a Pretendo. He didn't like that,
> so how about a Lame Boy? Didn't like that either.

:)
--

Mark Riffey
http://www.rescuemarketing.com
Now featured on the Visa Business Network
If Guy Kawasaki, the staff of the Wall Street Journal,
Fast Company, US Bank, Marketing Profs & Business Week read it,
maybe you should too.