Run 16 bit apps in 64bit Windows 7?

Page 2 - Seeking answers? Join the AnandTech community: where nearly half-a-million members share solutions and discuss the latest tech.

Cogman

Lifer
Sep 19, 2000
10,284
138
106
For most apps 32-bit still makes the most sense because they don't require large amounts of VM and the additional memory used just by making something a 64-bit, while small, offers no real benefit. MS should've taken an cue from Linux and releasing Windows as one 32-bit build but with 64-bit and 32-bit kernels so that you can run both types of binaries while having the majority of the system 32-bit.

Linux doesn't (AFAIK) run two separate kernels at the same time (that might not be what you are saying) rather, they do pretty much what windows does and run 32bit applications on a 64bit kernel in a special mode.

Though, I guess you could also be saying that windows offers no choice in what kernel you use except at the initial purchase, whereas linux is much more flexible, it is as simple as choosing the 64bit binary over the 32bit binary at boot. That would have been nice for windows to have the choice of 32 or 64 bit modes at boot, however, that would be very confusing for the majority of end users.
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
Linux doesn't (AFAIK) run two separate kernels at the same time (that might not be what you are saying) rather, they do pretty much what windows does and run 32bit applications on a 64bit kernel in a special mode.

Though, I guess you could also be saying that windows offers no choice in what kernel you use except at the initial purchase, whereas linux is much more flexible, it is as simple as choosing the 64bit binary over the 32bit binary at boot. That would have been nice for windows to have the choice of 32 or 64 bit modes at boot, however, that would be very confusing for the majority of end users.

Correct, your second paragraph is pretty much what I meant; simply that MS could include both on the disc so that the installer could choose the appropriate one for the machine. The Windows installer is incredibly dumb so I know MS wouldn't let you make that choice during installation, but always installing a 32-bit userland and then automatically installing a 32-bit or 64-bit kernel depending on the hardware's capability would've been a lot better. And then when a 64-bit kernel was installed adding a "32-bit kernel" to the "Windows Feature" control panel would've made a lot more sense.

I don't think any Linux distributions do this either, which is kind of a shame, but I can install 32-bit Debian and then afterwards install the amd64 kernel in order to run a full 32-bit userland with a 64-bit kernel. This gives me the compatibility and lower memory usage of a 32-bit install with the ability to use all of my memory and run 64-bit binaries as necessary. It's a much cleaner solution than installing a 64-bit distribution then adding on 32-bit packages. Especially since most of the time the 32-bit app one is trying to run is closed source so you have to figure out the 32-bit dependencies by hand.
 

Cogman

Lifer
Sep 19, 2000
10,284
138
106
Correct, your second paragraph is pretty much what I meant; simply that MS could include both on the disc so that the installer could choose the appropriate one for the machine. The Windows installer is incredibly dumb so I know MS wouldn't let you make that choice during installation, but always installing a 32-bit userland and then automatically installing a 32-bit or 64-bit kernel depending on the hardware's capability would've been a lot better. And then when a 64-bit kernel was installed adding a "32-bit kernel" to the "Windows Feature" control panel would've made a lot more sense.

I don't think any Linux distributions do this either, which is kind of a shame, but I can install 32-bit Debian and then afterwards install the amd64 kernel in order to run a full 32-bit userland with a 64-bit kernel. This gives me the compatibility and lower memory usage of a 32-bit install with the ability to use all of my memory and run 64-bit binaries as necessary. It's a much cleaner solution than installing a 64-bit distribution then adding on 32-bit packages. Especially since most of the time the 32-bit app one is trying to run is closed source so you have to figure out the 32-bit dependencies by hand.

Well, to be honest, it is understandable why they don't do kernel switching or anything like that on the fly. It is incredibly hard as you would essentially have to completely reboot the system without rebooting in a sense. Not only that, but the issues of "I installed 64bit program x and switched to 32bit mode, why doesn't it work anymore?". Not much of an issue considering 99% of applications are still 32bit, but still an issue.

BTW, that is one thing that a homogeneous system like windows has over linux, no need to look for dependencies, you essentially already know what is installed on the system.(and can include everything that needs to be installed.) Dependency hunting can be a real beast :D. (Which is why I do like debian systems, Their dependency handling system is much better than redhats.)
 
Last edited:

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
Well, to be honest, it is understandable why they don't do kernel switching or anything like that on the fly. It is incredibly hard as you would essentially have to completely reboot the system without rebooting in a sense. Not only that, but the issues of "I installed 64bit program x and switched to 32bit mode, why doesn't it work anymore?". Not much of an issue considering 99% of applications are still 32bit, but still an issue.

BTW, that is one thing that a homogeneous system like windows has over linux, no need to look for dependencies, you essentially already know what is installed on the system.(and can include everything that needs to be installed.) Dependency hunting can be a real beast :D. (Which is why I do like debian systems, Their dependency handling system is much better than redhats.)

Not on the fly, just as a boot option and the number of people that need it would be extremely small anyway. I'm not talking about anything spectacularly hard, in fact it would be dead simple. A 32-bit userland and 64-bit kernel is the best of both worlds.

And dependencies still exist on Windows, I've had MSIs pop up and tell me "Sorry, go find and install X before installing this". It's like MS took all of the bad parts about Linux package management and implemented them in the Windows installer. I was really hoping that the introduction of Windows Server Core was a sign that they would finally make the Windows Installer good and break up Windows into dozens or hundreds of packages, but sadly that doesn't seem to be the case. But yes, the core is pretty standard but there are still a lot of options, like all of the different versions of .Net.
 

Cogman

Lifer
Sep 19, 2000
10,284
138
106
Not on the fly, just as a boot option and the number of people that need it would be extremely small anyway. I'm not talking about anything spectacularly hard, in fact it would be dead simple. A 32-bit userland and 64-bit kernel is the best of both worlds.

And dependencies still exist on Windows, I've had MSIs pop up and tell me "Sorry, go find and install X before installing this". It's like MS took all of the bad parts about Linux package management and implemented them in the Windows installer. I was really hoping that the introduction of Windows Server Core was a sign that they would finally make the Windows Installer good and break up Windows into dozens or hundreds of packages, but sadly that doesn't seem to be the case. But yes, the core is pretty standard but there are still a lot of options, like all of the different versions of .Net.

:) Well, the thing that MS developers can do that linux developers cant is say. "Oh, my program needs library X version Y to run, I'll just include it with the program installer."

Linux developers have a tougher time with that as they have to think about things like "What version of stdlib are they using, what version of library x do they have, what kernel version do they have? etc.." Which is why they pretty much have to say, "Here is my program, compile it and don't forget to get the dependencies as well."

That isn't to say some lazy developer (or for legal reasons they can't distribute a certain library) can't pull the "go get your own libraries", it just makes it so most can just include them.
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
:) Well, the thing that MS developers can do that linux developers cant is say. "Oh, my program needs library X version Y to run, I'll just include it with the program installer."

Which is also the root of many of the problems with Windows. X number of developers shipping Y different versions of MFC.dll blindly overwriting whatever's installed and such. Which is why things like WinSxS had to be developed.

Linux developers have a tougher time with that as they have to think about things like "What version of stdlib are they using, what version of library x do they have, what kernel version do they have? etc.." Which is why they pretty much have to say, "Here is my program, compile it and don't forget to get the dependencies as well."

That isn't to say some lazy developer (or for legal reasons they can't distribute a certain library) can't pull the "go get your own libraries", it just makes it so most can just include them.

If they distribute the package properly there's no issues. It's not hard to make an rpm and/or deb which specifies the dependencies and the graphical package tools will download and install them for you. The people who say "Compile this according to the README" are being extremely lazy and hopefully someone like a DD will pick up their program and maintain it in Debian proper so no user has to deal with them.
 

dinkumthinkum

Senior member
Jul 3, 2008
203
0
0
:) Well, the thing that MS developers can do that linux developers cant is say. "Oh, my program needs library X version Y to run, I'll just include it with the program installer."

This is actually the bad thing about Windows, as it leads to "DLL Hell". First of all, it defeats the point of shared libraries. Now in this era of limitless memory and storage, that seems a bit quaint, but once upon a time, shared libraries were built to be linked by many different programs. Only a single copy would be loaded into memory.

Even if you don't care about bloat, there are still security and version issues. If every application installs its own version of a library, how do you comprehensively upgrade that library when a new version comes out? There could be dozens of copies of the same library, of different versions, sitting around on your system.

It's not that Linux developers can't include a library with their distributed binaries; if they so chose to do that, it is possible. It's just a bad idea. And Linux developers have a philosophical aversion to distributing only binaries, anyway.
 

Muse

Lifer
Jul 11, 2001
39,903
9,599
136
You have to remember nowadays 32/64 bit is the norm,its called progress.
Yes, actually I believe I could run 32 bit versions of my 16 bit database programs. It's just a screen or two I'd have to design in one of the 32 bit versions. It'll take some work, it's not a 2 hour job. It wouldn't surprise me if it took me more than a day. If I did it in 4 hours, I'd be proud of myself. It's just not the same as the 16 bit versions, it's OO, much much different. I think the code I wrote (tons!) will all work in the 32 bit versions, but to modify the 16 bit screens I need the 16 bit version, and that won't run. Ergo, I have to design 32 bit version screens, test, redesign, test, etc. I use this stuff constantly, so I need it. I haven't tested to see if the 32 bit versions will run the legacy code in 64bit Windows 7 yet. I hope I don't get a rude surprise! :eek: If it turns out I can't run the code at all, I will have to think seriously about going back to Vista Home Premium 32 bit on this machine. I did an incredible amount of work on the applications and I don't want to have to rewrite them.
 
Last edited:

dinkumthinkum

Senior member
Jul 3, 2008
203
0
0
Intel and AMD x86-64 processors don't support VM8086 mode when running in 64-bit (long) mode. That is why there is no support for 16-bit applications in 64-bit Windows. VM8086 is a legacy virtual-machine-like mode that was created a long time ago for the x86 protected mode by Intel. It allows you to execute 16-bit instructions that address the first megabyte of virtual memory, and it traps certain operations by raising #GP, where a monitor can specially handle them.

You may use VM8086 mode inside of a 32-bit VMX-accelerated virtual machine to emulate real mode code -- in fact, that is currently the only way to emulate real mode in a hardware-accelerated VMX-based VM. This is because Intel's VMX only supports protected and long mode operation currently (in the future the "unrestricted guest" flag will permit real-mode operation, supposedly Westmere has it, but I haven't tried it yet). The other option is to do software emulation of real mode.

tl;dr: You should be using a virtual machine to run DOS programs if you need to do that.
 

Absolution75

Senior member
Dec 3, 2007
983
3
81
Not on the fly, just as a boot option and the number of people that need it would be extremely small anyway. I'm not talking about anything spectacularly hard, in fact it would be dead simple. A 32-bit userland and 64-bit kernel is the best of both worlds.

I'm a little confused by this statement. If the kernel is 64bit, than users still won't be able to run 16 bit programs even if the userland is 32bit. Specifically because of the post about me. Not to mention that MS specifically said they didn't want users to be able to run 16bit applications. Running these applications aren't really MS's problem. They are the company that developed them. If they don't exist anymore? Well, hire someone to remake it or recompile it. Its not like 32-bit will be around forever either (start planning people).


Also, there is a more obvious reason why MS wouldn't want to support 16bit programs in 64bit windows anyway. The fact that it is indeed a niche market is part of it, but its mainly the security problems associated with running & supporting 16bit libraries and programs. Even this year there was a 16bit exploit that elevated a users privileges.
 
Last edited:

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
I'm a little confused by this statement. If the kernel is 64bit, than users still won't be able to run 16 bit programs even if the userland is 32bit. Specifically because of the post about me. Not to mention that MS specifically said they didn't want users to be able to run 16bit applications. Running these applications aren't really MS's problem. They are the company that developed them. If they don't exist anymore? Well, hire someone to remake it or recompile it. Its not like 32-bit will be around forever either (start planning people).


Also, there is a more obvious reason why MS wouldn't want to support 16bit programs in 64bit windows anyway. The fact that it is indeed a niche market is part of it, but its mainly the security problems associated with running & supporting 16bit libraries and programs. Even this year there was a 16bit exploit that elevated a users privileges.

I realize that, if you go back and see my original post in this thread you'll see it's a bit of a tangent and wasn't about running 16-bit apps at all. I'm actually glad they don't work in long mode, it's just more incentive for people to move on.
 

Griffinhart

Golden Member
Dec 7, 2004
1,130
1
76
Oh, man, if I knew my 16 bit apps wouldn't run in Windows 7 64bit, I wouldn't have installed it. What is the point? Do I have to start over on this machine? :whiste: The programs run in XP Pro SP3 OK, I chose compatibility with that in Win7 here, but they still will not run.

If you are running Win7 Pro, XP mode will do the trick. It's the Free Virtual PC w/ full XP license.
 

mechBgon

Super Moderator<br>Elite Member
Oct 31, 1999
30,699
1
0
If you are running Win7 Pro, XP mode will do the trick. It's the Free Virtual PC w/ full XP license.

I was just skimming the thread to see if anyone had suggested XP Mode yet. WINNAR! :D I'm using XP Mode in Win7 at work to run the supposedly XP-only point-of-sale software they just bought into. Initial startup takes a little longer, but I'm not complaining.
 

Muse

Lifer
Jul 11, 2001
39,903
9,599
136
If you are running Win7 Pro, XP mode will do the trick. It's the Free Virtual PC w/ full XP license.
The machine is running Windows 7 64bit Ultimate. So far no joy, but I haven't messed with it since I posted this thread. I've been very busy. Maybe will get on it today. Thanks.
 

MrChad

Lifer
Aug 22, 2001
13,507
3
81
There are evidently two things I can do here:

1. Download and install Windows XP Mode and VirtualPC

2. Download and install VirtualPC only.

Should I try VirtualPC only first? Or both? :confused:

Virtual PC by itself won't help you. You'll still need to install Windows XP in a Virtual PC virtual machine. I'm not sure if Windows XP mode works differently than any other Windows XP virtual machine.
 

Muse

Lifer
Jul 11, 2001
39,903
9,599
136
Virtual PC by itself won't help you. You'll still need to install Windows XP in a Virtual PC virtual machine. I'm not sure if Windows XP mode works differently than any other Windows XP virtual machine.
AFAIK, I've never run any kind of VM. So far, it's a slog. It suggested I email or print instructions prior to download. I tried emailing them to myself and Outlook 2007 opened and wanted me to configure it. You see, I installed Office 2007 Standard Edition a few weeks ago. I hadn't done a thing with it because I use a 3rd party email client, however I didn't use its installer so Windows doesn't know about it. So, I just went through the process of configuring Outlook 2007, and I think I sent the email to myself but it appears to me to have no info at all, just the link to download VirtualPC and XP Mode. I tried to print the instructions but when I do that a bar comes up near the top of Firefox saying I have to install plugins. I click the button and a window opens saying it can find no plugins to install. :confused: There's a link at the bottom to find plugins, and when I click that I'm shown around 8 plugins from Adobe Reader to Flash, Quicktime and a bunch of others. I installed Adobe Reader and restarted FF, and the same thing happens and I can install other plugins listed. I doubt that my inability to print the "instructions" has anything to do with a missing plugin, after all it can't tell me what plugin it wants. Kinda nutty. Guess I'll try installing, instructions be damned.
 

Muse

Lifer
Jul 11, 2001
39,903
9,599
136
This is an unbelievable sequence of events I'm getting. I go to the page where I download XP Mode and VirtualPC and if I try to print the instructions a bar opens below my tabs bar in firefox saying "Additional plugins are required to display all the media on this page." That's at the left and at the right there's a button, "Install Missing Plugins". Press that and it finds no plugins to install, I'm SOL to print.

I cancel that and if I try to download XP Mode a small window comes up saying Windows validation required. It says:
- - - -
Windows validation required

When prompted, select Open, then select Run and follow the instructions given. Please wait for the Windows update installation to finish, then click Continue to complete the validation process and continue on with your download.
- - - -
However, I'm not prompted to Open, only to Save or Cancel. I save, then run. I'm informed that the Windows Activation Update is already installed. If I go to then download XP Mode, the whole thing happens again, and I'm prompted to Save or Cancel. If I save, I get a 2nd (then a 3rd) copy of WindowsActivationUpdate.exe in my downloads folder. If I run it again it says it's already installed!

There appears to be no way I can download XP Mode. When I try to download I'm prompted to install validation tool. When I go to install that tool, I'm informed it's already installed. Bonzo. What am I to do?
 
Last edited:

mechBgon

Super Moderator<br>Elite Member
Oct 31, 1999
30,699
1
0
1. you really aren't going to need complicated instructions. Install Virtual PC. Install WinXP Mode.

2. regarding your download-validate loopy thing, maybe try Internet Explorer for this. Any good?
 

Muse

Lifer
Jul 11, 2001
39,903
9,599
136
1. you really aren't going to need complicated instructions. Install Virtual PC. Install WinXP Mode.

2. regarding your download-validate loopy thing, maybe try Internet Explorer for this. Any good?
I had no clue which to install first. Thanks. Good idea about IE. Sometimes nothing else works for MS stuff. I'll try it now...
 

Muse

Lifer
Jul 11, 2001
39,903
9,599
136
XP Mode (~1/2GB) is downloading now. Even IE was giving me fits but after ~20 minutes I got the download to start. XP Mode Update (not XP Mode) I had no trouble downloading early in the afternoon. Next will be VirtualPC. MS wanted me to download in this order:

XP Mode
VirtualPC
XP Mode Update

Presumably install XP Mode first? You suggested VirtualPC first. :confused:

Even with IE I couldn't get the instructions to either be sent to me or to print. Nutty.

Edit: Looks like I have no choice. I elected to Run the XP Mode download at the beginning, not Save it. So right now, I'm going ahead with the install. I'll take a deep breath, hold my nose and take the plunge...
 
Last edited:

mechBgon

Super Moderator<br>Elite Member
Oct 31, 1999
30,699
1
0
I don't know why they suggest XP Mode first, since you need Virtual PC installed in order for XP Mode to have somewhere to live. Maybe it's just that XP Mode's much larger to download :confused:

The XP Mode Update is for systems that don't have hardware support for virtualization (or that don't have it switched on in the motherboard's BIOS), so you may not need that. You can try without it first. If your rig doesn't support virtualization, you'll be informed of that and then you'll know "ok, so I need that update too."
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
1. you really aren't going to need complicated instructions. Install Virtual PC. Install WinXP Mode.

2. regarding your download-validate loopy thing, maybe try Internet Explorer for this. Any good?

Except step 1 isn't that simple, you download the package and install it and it tells you that you're good but when you look nothing is installed. You have to go back into Windows Features and actually install XP Mode from there too, the package just makes it available which is retarded.