The MASM Forum Archive 2004 to 2012

General Forums => The Campus => Topic started by: Sergiu FUNIERU on February 24, 2010, 01:32:25 PM

Title: WMake closes the cmd window on errors
Post by: Sergiu FUNIERU on February 24, 2010, 01:32:25 PM
If questions about WMake are not appropriate here, please tell me.

I open a cmd window and I rund WMake. If there are errors, the cmd window is closed automatically. Is there any way to prevent this?

I suppose that WMake sends a exit code different than 0 and that closes the cmd window.
Title: Re: WMake closes the cmd window on errors
Post by: BlackVortex on February 24, 2010, 02:04:00 PM
Run it with "cmd /k"

cmd /k wmake
Title: Re: WMake closes the cmd window on errors
Post by: Sergiu FUNIERU on February 24, 2010, 02:10:01 PM
Quote from: BlackVortex on February 24, 2010, 02:04:00 PM
Run it with "cmd /k"

cmd /k wmake
Wow! Thank you! I never thought that cmd might have parameters. Now, that you've told me, I found this:
http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/cmd.mspx?mfr=true
Title: Re: WMake closes the cmd window on errors
Post by: BlackVortex on February 24, 2010, 02:21:04 PM
You could just do a "cmd /?" as with almost all console commands   :bg
Title: Re: WMake closes the cmd window on errors
Post by: Sergiu FUNIERU on February 24, 2010, 02:33:47 PM
Quote from: BlackVortex on February 24, 2010, 02:21:04 PMYou could just do a "cmd /?" as with almost all console commands   :bg
Something is wrong with me. You got me twice in 20 minutes  :bg

Running cmd with /?, inside cmd, is like asking myself "What else do you know to do?" and expecting to find out something new. Yet, for cmd it works.

I clearly underestimated cmd and I don't understand why.
Title: Re: WMake closes the cmd window on errors
Post by: dedndave on February 24, 2010, 03:05:57 PM
don't over-estimate cmd, either
it has little bugs with regard to copy/paste that are difficult/impractical to work around
it does what it needs to do, but it is far from perfect
Title: Re: WMake closes the cmd window on errors
Post by: Sergiu FUNIERU on February 24, 2010, 03:12:37 PM
Quote from: dedndave on February 24, 2010, 03:05:57 PM
don't over-estimate cmd, either
it has little bugs with regard to copy/paste that are difficult/impractical to work around
it does what it needs to do, but it is far from perfect
You're right. I can do a lot of useful things with cmd.

I believe that when I saw a blank window, with no menus, I thought : That's all? This didn't happen today, but years ago.

I used cmd for a lot of things, since then, but it never occurred to me that the interpreter could accept parameters. Thanks to BlackVortex, cmd and I are better friends now.
Title: Re: WMake closes the cmd window on errors
Post by: GregL on February 24, 2010, 07:52:48 PM
Sergiu,

Just in case you weren't aware of it, you can right-click on the title bar for cmd.exe, and get to a lot settings that way too.