Running hidden executables in background

This is a discussion on Running hidden executables in background within the Windows Programming forums, part of the Platform Specific Boards category; How do i program a hidden executable that runs at startup?
working on a C Server for my new program. ...

lol. u people are so goddang paranoid its funny. it's also none of your business

but anyways, like i said, i'd like a friggin hidden background server in my new program that hides things on MY computer. it's personal. also, i run off of windows XP (the only one that'd more than likely allow this )

good lord. i never thought people never thought of running background programs. i mean really, my instant messenger runs in the background.

I AM NOT A HACKER.

i need a background program to run a server for a program to give a list of things to do so they can be done without me havin to run TWO programs at once with my command line.

it's a big prog that runs off of Java swing gui and i'm havin trouble managing it all in one place. the whole purpose is for me to have my personal IDE, 2D game area, and a small OS. Java's runtime.exec helps with the executables but i'd like to run some in the background as a hidden program that will start up with the computer.

If you want it, however, i'll give u my currently not finished JAR file that contains my unfinished project. it operates to a certain extent even though davac is the only menu item that does anything. also, if u wish to know, the password to get into it is nydo. but erm.... not .jar extensions.....

i'll e-mail it to you if u wish or just get a snapshot of it. it's called b4u because it was meant to be used b4u do something on my comp that i didn't want u to (like read an important for me to only see file. it mixes up the file's characters and can reaarange them back so only my b4u program can read it. it can't do this yet, however. plus some other functions required me learning C. like file I/O and cleanup within the JAR file for my IDE)

I always use Linux but in Windows what I would do is put your executable inside of the Start->All Programs->Startup folder. If that's what you want. Perhaps a batch file in the startup folder if you really want to get tricky! If you want to get super tricky you could go Start->Run "regedit" and then go to...ummm

Local_Machine-->Microsoft-->Windows-->Current Version??->Run

Add a new key with the path to your executable you want to add to the background. Did I get your question ok? I was skimming pretty fast.

I'm still pretty new, but the idea of creating a pretty blank window then hiding it sounds good.

if you're not familiar with windowing, read the first few sections of http://winprog.org/tutorial. It's quite simple and that'll teach you the basics of making a window. Unless of course you're not that new to it.

In fact, you might be able to get away with setting DefWindowProc as your window's procdure when registering the class, and not having to write your own at all. I don't really know though, cause I haven't tried it myself.

Finally, you would basically copy and paste the code from your current program after the UpdateWindow line, before the message loop. Note, however, that you NEED to put the line

Code:

DestroyWindow(hwnd);

somewhere in your code. Otherwise, the program will never terminate, which will cause problems. Also note that by destroying your window, you will immediately end your program.

actually console apps run on cmdLine. meaning the cmdLine has to stay up and, as always has been, visible, which causes a problem.

Which is why I said no window will be displayed if you don't create a console app. Win32 GUI apps can accept command line arguments as well.
If you create a Win32 GUI app you can still create a console window at anytime if you want it and destroy it when needed.