/// <summary>
/// Creates a default inifile in a format hostName.processName.ini , in the same directory where the
/// </summary>
/// <returns>the file path to the init file in a string </returns>
public static string CreateProcessDefaultIniFile()
{
string strIniFilePath = String.Empty;
string strPathToExe = Environment.GetCommandLineArgs()[0];
string extension = Path.GetExtension(strPathToExe);
//string filename = Path.GetFileName(strPathToExe);
string strBaseDir = Path.GetDirectoryName(strPathToExe);
string strMachineName = System.Environment.MachineName;
string fileNameNoExtension = Path.GetFileNameWithoutExtension(strPathToExe);
//now build the default ini file path
strIniFilePath = strBaseDir + @"\" + strMachineName + "." + fileNameNoExtension + ".ini";
return strIniFilePath;
} //eof method
No comments:
Post a Comment
- the first minus - Comments have to be moderated because of the spammers
- the second minus - I am very lazy at moderating comments ... hardly find time ...
- the third minus - Short links are no good for security ...
- The REAL PLUS : Any critic and positive feedback is better than none, so your comments will be published sooner or later !!!!