Added a program to autorun as follows:

TRegistry *reg = new TRegistry(); reg->RootKey=HKEY_CURRENT_USER; reg->OpenKey("Software\\Microsoft\\Windows\\CurrentVersion\\Run",true); reg->WriteString("Test", Application->ExeName); reg->CloseKey(); reg->Free(); 

I restarted the computer, and the program starts up, although the autorun has been added
What is wrong with me?

  • "although it was added to autorun" - with what and how did you look? AV installed? - Vladimir Martyanov
  • @ Vladimir Martiyanov I checked through the task manager (I have Windows 10), and I looked in the registry. What is AB? - andrew
  • And you have Application-> ExeName exactly what it is at the time of entry in the registry, by the way? - Vladimir Martyanov
  • @Vladimir Martianov is the way to the program's instructor - andrew

0