Teen Programmers Unite  
 

 

Return to forum top

URGENT- C++ Question

Posted by gbyte222 [send private reply] at May 19, 2003, 07:39:32 PM

I need code to make my program run hidden. I want my program to be able to start on bootup. It should add itself to the statup list. I also want the code to shut down the computer. Can anyone give me code for this?
Thanx

Posted by Neumann [send private reply] at May 19, 2003, 07:51:53 PM

Why do you want that? a program that shut down the computer shouldn't run hidden. It's just a matter of common good sense.

I recommend you have a look on MSDN at msdn.microsoft.com. Search for ShutdownWindows or something like that.

Posted by gbyte222 [send private reply] at May 19, 2003, 08:23:47 PM

I need it hidden because it is to shut down the com periodically. Help to keep RAM clean. Thanx

Posted by mop [send private reply] at May 19, 2003, 08:34:18 PM

Well then it shouldn't have to run hidden. I think that you can just execute rundll or whatever it's called to shutdown the computer (pass it some arguements of sorts). Periodically rebooting seems like a silly way to clean out your ram, there should be other programs out there that look for memory leaks and erase the memory that they are consuming. Just try searching at downloads.com first.

Posted by ItinitI [send private reply] at May 19, 2003, 08:39:19 PM

I think Leo says that you just have to reboot every now and then with Windows ME/98/95/3.1,,,theres only so much ram leak programmes can do =/

Posted by gbyte222 [send private reply] at May 19, 2003, 09:08:13 PM

I have looked on downloads, and very few of them help. Most of them make it worse, and the few that do work barely help. I also want the hidden part for future reference.

Posted by mop [send private reply] at May 19, 2003, 09:26:17 PM

Why is this so urgent, by the way?

Posted by gbyte222 [send private reply] at May 19, 2003, 09:32:44 PM

Because I promised a friend I would have something done by May 21st and I really need this code

Posted by gbyte222 [send private reply] at May 19, 2003, 09:33:33 PM

Oh yeah, I got the shutdown code, now all I need are the other two parts.

Posted by gian [send private reply] at May 19, 2003, 10:40:01 PM

It sounds virii-like to me.

Posted by Neumann [send private reply] at May 20, 2003, 06:10:01 AM

You've got your lesson. Don't promise something you can't do.

Posted by RedX [send private reply] at May 20, 2003, 06:24:59 AM

"Don't promise something you can't do."

Not unless you're into politics.


Beside if you only need to reboot the machine you could use the Taskmanager (or whatever its english name is, it's that win'98 program to execute programs at a set time each day/week/month) to start rundll.exe with the right parameters.

Posted by Neumann [send private reply] at May 20, 2003, 07:39:38 AM

RedX: No politician on this message board :P

If "Running hidden" = "Running without a window", then it's harmless because you can shut it running the task manager.

If "Running hidden" = "Not showing in the start manager", then it's no doubt an attempt at making some kind of virii. The only thing I'm aware off that does that is CDC's BackOriffice and relatives.

Posted by gbyte222 [send private reply] at May 20, 2003, 03:51:16 PM

It is the no window thing. I want to be able to shut it down with task manager but not take up space on the start bar, so i don't want a window.

Posted by CViper [send private reply] at May 20, 2003, 04:18:17 PM

hmm, to start the application automatically you just have to register it under HKEY_LOCAL_MACHINE/Software/Mircosoft/Windows/CurrentVersion/Run (not entirly sure about that path, but something like that).

Check the MSDN on how to do that. (Registry access)

Posted by gbyte222 [send private reply] at May 20, 2003, 04:49:32 PM

thanx. Do you know how to make it hidden

Posted by Neumann [send private reply] at May 20, 2003, 05:07:00 PM

To make it hidden, guess what, just don't display a window!

no seriously, search a bit dude.

Posted by MrSmiley [send private reply] at May 20, 2003, 06:55:57 PM

DAMN I HATE VIRUS'S STOP IT OR I WILL...I dont know ;(

Posted by DragonWolf [send private reply] at May 21, 2003, 04:34:30 AM

On the virus note, yet another IRC network was taken down by DDOS attacks. dalnet and beyondirc, there are probably others gone as well.

You must be logged in to post messages and see which you have already read.

Log on
Username:
Password:
Save for later automatic logon

Register as a new user
 
Copyright TPU 2002. See the Credits and About TPU for more information.