Sign in to follow this  

Execute on Boot

This topic is 4757 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

There's a crapload of ways, especially if you count, not only EXEs, but other executable formats loaded as plugins and components and libraries and whatnot. What are you trying to do... remove a tenacious piece of malware from your system?

Share this post


Link to post
Share on other sites
I have some code here, but don't know does it work or not.

This add register key to run program on boot


TRegistry *reg = new TRegistry(KEY_ALL_ACCESS);
reg->RootKey = HKEY_LOCAL_MACHINE;
reg->OpenKey("\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run",false);
if(AAutoRun->Checked) reg->WriteString("RailRoad",Application->ExeName);
else
{
if(reg->ValueExists("RailRoad")) reg->DeleteValue("RailRoad");
}
delete reg;

Share this post


Link to post
Share on other sites
i once did actually make a little app which start on star up. what i did was to edit the registry, i cant remember what functions i used but i di remember it was like 2 or 3 api calls. might want to check out programmers-unlimited.com, i did write a little tutorial on this there, but since i forgot all about how to do it. however the posters above kind of covered the registry, but iam sure wat i did was slightly different.

Share this post


Link to post
Share on other sites
Quote:
Original post by GregLoutsenko
i once did actually make a little app which start on star up. what i did was to edit the registry, i cant remember what functions i used but i di remember it was like 2 or 3 api calls. might want to check out programmers-unlimited.com, i did write a little tutorial on this there, but since i forgot all about how to do it. however the posters above kind of covered the registry, but iam sure wat i did was slightly different.
The above code seems to be Borland or whatever the compiler is that has a load of wrapper classes. You probalby used the raw Win32 functions like RegOpenKey(), RegCloseKey(), etc. I used those as well, and as you said, its very simple to do.

Share this post


Link to post
Share on other sites

This topic is 4757 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this