From: Jim Carlock on 8 Sep 2007 00:04 "Herbert Kleebauer" wrote... : I don't understand. The purpose of the batch is only to : generate the getv.exe binary using echo commands to : generate getv.com and getv.com to write getv.exe. There : is nothing which needs "Windows 95 compatibility". getv.exe : itself is a normal 32 bit exe file which doesn't use the : command interpreter cmd.exe at all. Right. (1) Your application reports Windows 95 when run under XP, even though it's not specifically told told to run under W95 Mode. (2) It demonstrates that your application while not selected to run under Windows 95 Compatibility Mode, it inherits the OS Compatibility Mode of the application that it's called from. The cmd.exe prompt is a 32-bit application as well. (3) That might apply to other operating systems like Win9x, and it definitely applies to Vista. So the question I'm asking is: How do you detect which operating system an application is actually running under? This was presented in the VB6 news group, "microsoft.public.vb.general.discussion" a few days ago, but it was reported as a question about detecting which OS is run under when running under Vista. http://groups.google.com/group/microsoft.public.vb.general.discussion/browse_frm/thread/9e079e5d0fe42cbf/?tvc=1 Also, if you start up any cmd.exe prompt, even though it's selected to run in Win95 Compatibility Mode (tested on Windows XP), and then you use START to start up your application, the results are different. The inheritance does NOT happen. For instance when starting up the cmd.exe prompt in Windows 95 Compatibility Mode, then type in, START getv.exe the results are as you indicated. -- Jim Carlock North Carolina Swimming Pool Builders http://www.aquaticcreationsnc.com/
From: Frank Kotler on 8 Sep 2007 00:15 Herbert Kleebauer wrote: > Jim Carlock wrote: > >>What happens if you... >> >>(1) Right-click upon cmd.exe, and select copy from the menu. >>(2) Use Explorer to navigate to a temporary folder, then right- >> click once again, but select paste. >>(3) Change the name of the newly created cmd.exe to tmp_cmd.exe. >>(4) Right-click upon that file and click on "Properties". >>(5) Click upon the "Compatibility" tab. >>(6) Set it to run as Windows 95 compatibility. >>(7) Save the changes and then run your batch file inside of that >> tmp_cmd.exe prompt. > > > I don't understand. The purpose of the batch is only to generate > the getv.exe binary using echo commands to generate getv.com and > getv.com to write getv.exe. There is nothing which needs "Windows 95 > compatibility". getv.exe itself is a normal 32 bit exe file which > doesn't use the command interpreter cmd.exe at all. But with the typo in there (delete gever.com), you've got both gver.com and gver.exe in the directory. It *may* make a difference which you get when you type "gver". In dosemu, I get the .com version, and it outputs... well, "binary", but only partly "ascii" to the screen. "gver.exe" produces the expected results. Well: set ver_major=00000007 set ver_minor=0000000a set ver_build=000000fd set ver_platf=ffffffff set ver_csd= Strictly speaking, this doesn't match the output of "ver": FreeCom version 0.82 pl 3 XMS_Swap [Mar 06 2004 10:49:37] But it wasn't promised to run under dosemu. > winmain:: > move.l #VersionInfo,-(sp) > jsr.l (GetVersionExA) [snip] There ya go! Now they'll believe it was written in asm! (O'course, the probably won't believe it's for x86... :) I can't test it under Windows (I can disassemble it - and recognize the code you posted - so I know you're not making it up). Have you tried "Wine"? Any luck with it? I should try to find out what "FontForge" is, and try it again... Best, Frank
From: Jim Carlock on 8 Sep 2007 01:48 I left a step or two out in the earlier post today. And I also named the batch file getv.cmd, and perhaps because of the typo that Frank identified, I did a typo as well, as I called the gver.exe file getv.exe. The following fixes my typos. (1) Copy cmd.exe to a temporary folder for testing. (2) Change the name of the newly created cmd.exe to tmp_cmd.exe. Perhaps the name change is not required, but it's the way I performed the testing and it helps in the accurately posting the details, here. (3) Right-click upon that tmp_cmd.exe file, click on "Properties". (4) Click upon the "Compatibility" tab. (5) Start the tmp_cmd.exe. You'll see it starts up in "Windows 95 Compatibility Mode". (6) Copy your batch file to that folder or make sure you type the full path to it when you run (if it's not within the PATH EV). (7) Then run gver.com (this is not needed when using your batch file, as I personally REMed the line that ran gver.com). (8) Then run gver.exe. On XP32 I ended up with (Win95 Compatibility Mode): C:\tmp\klee>gver.exe set ver_major=00000004 set ver_minor=00000000 set ver_build=000003b6 set ver_platf=00000001 set ver_csd= Windows XP (Windows NT 4 Service Pack 5 Compatibility Mode) reports: C:\tmp\klee>gver.exe set ver_major=00000004 set ver_minor=00000000 set ver_build=00000565 set ver_platf=00000002 set ver_csd=Service Pack 5 And for a regular cmd.exe (no compatibility selected) prompt: C:\tmp\klee>gver.exe set ver_major=00000005 set ver_minor=00000001 set ver_build=00000a28 set ver_platf=00000002 set ver_csd=Service Pack 2 Also, note that if you right-click upon cmd.exe in the %systemroot%\system32 folder, then click on the Compatibility tab, you should see that you can not change the Compatibility mode there. That's why I copied it to another folder. I just checked to see if the name change is required, but it's not, so I changed the name to make things here easier to understand. Hope this more accurately describes everything. -- Jim Carlock North Carolina Swimming Pool Builders http://www.aquaticcreationsnc.com/
From: Betov on 8 Sep 2007 02:39 hutch-- <hutch(a)movsd.com> �crivait news:1189209616.284636.89050@ 57g2000hsv.googlegroups.com: > I am seriously disappointed Normal. Just shut up and start chewing. Betov. < http://rosasm.org >
From: hutch-- on 8 Sep 2007 04:06
Betov, > > I am seriously disappointed > > Normal. Just shut up and start chewing. Practice what you preach, as you lead poor Wannabee astray and had your wicked way with him, you should be helping him to eat that hat. |