This is a follow up to 7-Zip execution permissions on Windows Server 2008 64-bit.
I'm trying to avoid having an overly complicated build process to make multiple 7-Zip EXE files. I just need a .cmd to kick off my Java process after reading some 64-bit registry entries. However, to succeed with a single EXE file, it needs to be 32 bit.
The above question found a trick for getting Windows Server 2008 to detect a 32 bit cmd.exe and swap it to 64 bit. Is there a way to do this on Windows Server 2003? There's a Windows hotfix that allows reg.exe to access 64-bit entries in 32-bit mode, but I can't be assured that's on the customer's server so that workaround is a no go.
One way to launch a 64-bit CMD is to just use "My Computer" and double click C:\Windows\System32\cmd.exe . One way to launch a 32-bit CMD is to do the same but double click C:\Windows\SysWOW64\cmd.exe .
Can I run 32-bit programs on a 64-bit computer? Most programs made for the 32-bit version of Windows will work on the 64-bit version of Windows except for most Antivirus programs. Device drivers that are made for the 32-bit version of Windows will not work correctly on a computer running a 64-bit version of Windows.
If you are on Windows 7, on a Windows Explorer, right click on the executable and select Properties. At the properties window select the Compatibility tab. If under the Compatibility Mode section you see Windows XP, this is a 32 bit executable. If you see Windows Vista, it is 64 bit.
To launch 64-bit cmd.exe from 32-bit cmd.exe you must be able to access c:\Windows\System32
folder without being redirected to c:\Windows\SysWow64
folder. In Win2008 you can achieve this by accessing c:\Windows\Sysnative
path. Unfortunately on Win2003 a hotfix is required (see http://support.microsoft.com/kb/942589).
There is a workaround - you can create an NTFS junction point that directs to c:\Windows\System32
folder and use path to that junction point instead of c:\Windows\System32
. Using System Internals' junction.exe I managed to create such a junction point from 32-bit cmd.exe and launch 64-bit cmd.exe.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With