Archived

This topic is now archived and is closed to further replies.

jtmerchant

Launch on Startup, Restart PC

Recommended Posts

In C++, how do you launch a program on startup, and/or restart/shutdown/put a PC on stand-by? I doubt this information matters, but I''m using MSVC++ 6 with DirectX 9. Thank you.

Share this post


Link to post
Share on other sites
quote:
Original post by jtmerchant
In C++, how do you launch a program on startup, and/or restart/shutdown/put a PC on stand-by?

I doubt this information matters, but I''m using MSVC++ 6 with DirectX 9.

Thank you.


For start up, just goto Start, click on "Run...", type in "regedit" w/o the quotes, goto HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\Run, create a new string key, and change the value to the path (w/o quotes) of where the program is.

my poetry

my programs

Share this post


Link to post
Share on other sites
Yep, its obvious he is trying to get someone to write him a program that will shutdown the comp on startup. Get out of here.

EDIT: Actually, I should say that, because there is a chance that he isn't doing anything bad. So if you aren't, I am sorry.

[edited by - PlayGGY on January 10, 2004 12:17:32 AM]

Share this post


Link to post
Share on other sites
actaully many programs change windows settings that need to be reloaded on windows startup so that rebooting is nessecary hence why you would need to know how to makea program reboot windows.

also if the program he is creating is something like say a custom task manager it should start up when the computer starts so that it can execute the scheduled tasks.

there are legitamte reasons for knowing these things
i gots ya back yo.

Share this post


Link to post
Share on other sites
Oh my geesh! How dare you! JK. No, it just so happens that I need to intiate my program on startup, which made me think that I have no idea how to shutdown or restart the computer. It did occur to me that I could make a program that restarted the computer on boot up, but it was a meer thought, as that kind of thing is not really my gig- I make games (or at least try to), not "malicious" code.

EDIT:: Just btw if you were wondering, I want to give tips about my game everytime the user starts their computer, also to remind them about the game. They will be able to remove this feature.

[edited by - jtmerchant on January 11, 2004 12:30:20 AM]

Share this post


Link to post
Share on other sites
ExitWindowsEx()


“Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.”
— Brian W. Kernighan (C programming language co-inventor)

Share this post


Link to post
Share on other sites