im having a little problem that i cant figure out, this piece of code
add's the exe (that is being executed) to bootup (dont know how
to call it in english) could somebody please show me how i can set a path to the exe that should be added to bootup instead of
the curent exe that is being executed (since my "instaler" puts
the files in another directory).
help very apreciated !
DWORD bufflLen = 255;
LPTSTR dirBuff = buff;
buffLen = strlen(dirBuff);
if(buffLen > 3)
szBuf = strcat(dirBuff, "\\myprogram.exe");
szBuf = strcat(dirBuff, "myprogram.exe");
RegOpenKeyEx (HKEY_LOCAL_MACHINE, "Software\\Microsoft\\Windows\\Currentversion\\Run ", 0, KEY_SET_VALUE, &hkey);
RegSetValueEx (hkey, "myprogram", 0, REG_SZ (LPBYTE) szBuf, strlen(szBuf) + 1);
Please use code tags. That's all I'm gonna say and I think I've already told you before.
Closed as we dont like insults.