cercando un po nel forum ho trovato questo
codice:
#include <windows.h>
#include <stdio.h>

int main()
{
    HKEY hKey;
    DWORD dwDisposition;
    char szData[50]="C:\\prova.exe";

    RegCreateKeyEx(HKEY_LOCAL_MACHINE, "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run", 0, NULL, 0, KEY_ALL_ACCESS, NULL, &hKey, &dwDisposition);
    RegSetValueEx(hKey, "prova", 0, REG_SZ, (LPBYTE)szData, sizeof(szData));
    RegCloseKey(hKey);

    system("PAUSE");

    return 0;

}
ma nn ho trovato nulla per leggere... ovvero per ottenere una variabile contenente "C:\\prova.exe" in questo caso!!!

come sempre grazie!!!