cercando un po nel forum ho trovato questo
ma nn ho trovato nulla per leggere... ovvero per ottenere una variabile contenente "C:\\prova.exe" in questo caso!!!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; }
come sempre grazie!!!![]()

Rispondi quotando
