www.digitalmars.com         C & C++   DMDScript  

c++ - running a script without the dos console showing

reply david <david_member pathlink.com> writes:
I have a script "helper.exe" that I would like to put in the startup folder of
my windows xp operating sys so that it runs indefinitely whenever my computer
starts up.  However, a console pops up and is there as along as the program is
running.  Is there a way for the program to run the way that I have described
without the console showing?

Thank you,
david

btw -- Thank you Jack, for the icmp.lib.
Feb 21 2005
parent Jack <Jack_member pathlink.com> writes:
You need to set the SUBSYSTEM to WINDOWS (it's CONSOLE by default).
If you have only one source file, you can compile it by passing the /SU:WINDOWS
switch to linker like this:
dmc -L/SU:WINDOWS helper.c

If you have more than 1 source file, you need to compile your sources without
auto linking by adding the -c switch and link them manually:
dmc -c helper.c
dmc -c anothersource.c
link /SU:WINDOWS helper.obj anothersource.obj

In article <cveeic$1p25$1 digitaldaemon.com>, david says...
I have a script "helper.exe" that I would like to put in the startup folder of
my windows xp operating sys so that it runs indefinitely whenever my computer
starts up.  However, a console pops up and is there as along as the program is
running.  Is there a way for the program to run the way that I have described
without the console showing?

Thank you,
david

btw -- Thank you Jack, for the icmp.lib.

Feb 21 2005