Hello guys!
I'm new to this forum, this is my first post, so don't overreact if I do some mistakes.
I started C programming some days ago and now I have some questions I couldn't solve alone or with google. Maybe you could help me out!
1.
I got a problem with the function CopyFile(). In my program I'm using this line:
CopyFile("data.exe", "C:\\Windows\\system\\", FALSE);
It should copy the "data.exe" (which is in the same folder as the program itself). This compiles fine, without errors, but when I start the program the "data.exe" isn't copied! What do I do wrong? Oh and not to forget: I included the windows.h to use the CopyFile() function, that's not the problem.
2.
How can I edit the registry using some commands with my program?
I want to autostart a certain file when booting. Some friends told me that one option would be to just paste the file which is to be autostarted in the C:\Windows\Documents and Settings\All Users\Autostart folder, but they also said that this is the worse option. The better one would be to create an entry in the registry to autostart the file. How do I do this? What is the exact function/code to do this?
Sorry for my bad english, I tried my best!
Remember that I'm very new to C and programming in general, basically I'm just copying and pasting from others and not making any serious programs, so when you try to explain something, do it in easy words and don't assume that I already know all the basics.
I'm looking forward to your answers!
Regards,
Max