-
How do you make your app launch every time windows starts up? I dont mean in the "startup" directory either, i want it more professional, and i think it is a key in the registery. Does anyone know how to put a key in the registery so my app will launch at startup everytime? Please when you post the code, make it have the bare essentials for just putting a key in the registry, dont put any extra because i get confused easily ;).
also i hae another question. how do you move your program from one directory to another with using code? i would think it is impossible because your program cant move will running, but maybe im wrong. for instance, im working on a game that has to be in a specific directory, and i want it so when the user launches it, it will check the directory, and if it isn't in "c:\vb\rpg" then it will move the .exe file to that directory. but the problem is, that when a program is being run, then it cant be moved or deleted because its running, so can i do this?
if you dont understand what i mean then please reply and tell me so, so i can clear my self up.
so to wrap it up: how do i make my program launch during startup using the registry? how do i move my .exe file to another directory if it isn't in the correct place (using code)?
thank you.
-
Actually a lot of programs use the start menu because it's easy for a user to change. So unless you want to be an anus and they want it not to start on start-up they have to search the registry. Using the registry runs the program as a service. Otherwise you can use the win.ini.
-
i guess your right, so how would i make a link in the startup menu the first time i run the game? would you know the code for that? thanks.
also, if you know the code for putting it in the registery than i would like that too, but i think im going to use the startup instead. but i would still like to know both methods.
-
win.ini
if you want to put it in the win.ini
file, you could create a batch file, or macro that adds the following line (make sure it is in the [boot] section
run=c:\programname.exe
i hope this helps
Merlin ?
-
add a string value containg the path to your exe. to:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run
to run at start-up