hello, having an anoying problem here, wrote a code wich copy's
my programs exe into a directory in program files (and renames
the exe) after this the exe is added to the registry and the
program starts, the problem is that after reboot the program
does not work properly.. i think this is cuz of an error, the first
thing it does it try to copy itself to program files but since
its already there and the file is already renamed...
is there an if error ... command i could use or is there a "option"
only to run this piece of code once, ( i tried if
( (_access( "path", 0 )) != -1 ) but did not get far..
this is the piece of code that runs at the beginning and
copy's the exe into program files :
const char *src = "\\instal.exe";
const char *dst = "c:\\Program files\\myprogram.exe";