Forum Discussion

ANDRY RANDRIAMANIVO's avatar
ANDRY RANDRIAMANIVO
Copper Contributor
Jan 17, 2018

file opened twice

why file "event.txt" is opened twice.

 

              RegTable->RootKey = HKEY_LOCAL_MACHINE;
              if (!RegTable->OpenKeyReadOnly("\\Software\\Microsoft\\Windows\\CurrentVersion\\App Paths\\Excel.exe"))
              {
               MessageDlg("Microsoft Excel n'est pas installé.\r\nMicrosoft Excel isn't installed.\r\nMicrosoft Excel n'est pas installé.\r\nMicrosoft Excel n'est pas installé.", mtError, TMsgDlgButtons() << mbOK, 0);
              }
              commandline = RegTable->ReadString("");
              commandline = "\"" + commandline + "\" /n \"" + IniPath + "\\Event.txt\"";
              RegTable->CloseKey();
              WinExec(commandline.c_str() ,SW_MAXIMIZE);

No RepliesBe the first to reply

Resources