Re: just starting



Some options:

1. Write a batch file that runs the program and then ends with a PAUSE command
2. Read some input (i.e. getchar()) and then call return/exit in your program code
3. Open cmd.exe and run the program from there


---Matthew Hicks


Just started to teach myself C C++ programming... I have been very
interested with computers for a while now and have a nac or so I
thought for how they work ... hardware I am ok with ... I can
understand and tear it down and rebuild it ... chips boards I/O etc
etc ... programing is a different beast ...

So I am fooling around with C and compile a small .exe file with
Miracle C ... simple thing that said Hi my name is etc etc ... but I
noticed that it loads in a dos window ... Why doesn't it load in
a .txt file ? My main question is this ... after you run the test.exe
it flashes open the DOS window and closes quickly ... now this I
understand ... I do have my MCE and I am trained in Windows XP tech
support ... I know that a "close on exit" command is "checked" for the
application and I know to just open the default properties and de-
select the check box ...
My question is this ... is there a way in C or C++ to write this into
the test.exe I made that simply shows "my name is .... "

This is where I am a total newb and have no idea where to go ... I
don't see any reference to a switch or execute in any of the library
files ... the stdio.h or stdlib.h ... i don't see where i can say

the directory is C:\windir
the program is C:\windir\default
the program has a properties tab
the properties tab has Misc, etc etc ...
the misc tab has an option for "close on exit"
the "close on exit" should be false
I have no idea really ... i don't even know if it possible ... maybe
it's better to just reg hack it and save the batch file ...

Any ideas ? or I am way the hell off base ? :) !



.



Relevant Pages

  • just starting
    ... it flashes open the DOS window and closes quickly ... ... the properties tab has Misc, ... the misc tab has an option for "close on exit" ...
    (comp.programming)
  • Re: just starting
    ... it flashes open the DOS window and closes quickly ... ... the properties tab has Misc, ... the misc tab has an option for "close on exit" ...
    (comp.programming)
  • Re: Positioning a DOS Window
    ... VBA shells out to run a batch file ... So I have inserted a MsgBox - ... So I wanted the DOS window to hide ...
    (microsoft.public.excel.programming)
  • Re: Digital signing
    ... opens a dos window for output purposes. ... However, you said "build script". ... wrong (I even went as far as coding a dos batch file). ... app and build the install in one go. ...
    (microsoft.public.vb.general.discussion)
  • Re: subst command in a batch file
    ... however when I run this file, the dos window is opened and this line is ... is most likely your system drive letter. ... - It is likely that you called your batch file "subst.bat". ... Changing the name to testxxxxx3.bat doesn't help, the looping problem ...
    (microsoft.public.windowsxp.general)