I create the ini file run time but whenever I write any value in the section using WriteProfileString() it requires the registry key.
CFile obFile;
if( obFile.Open( strAppIniPath, CFile::modeCreate|CFile::modeNoTruncate|CFile::modeReadWrite ))
{
AfxMessageBox(_T("File Opened"),IDOK,NULL);
bResult = theApp.WriteProfileString(_T("General"), _T("FirstName"), _T("String1"));
bResult = theApp.WriteProfileString(_T("General"),_T("LastName"), _T("String2"));
}
else
{
AfxMessageBox(_T("Unable to Open File"),IDOK,NULL);
}