Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /// <summary>
- /// Absolute path of the application's executable.
- /// </summary>
- private string ExecPath
- {
- get
- {
- if (_execPath == null)
- {
- // Get the config file
- string path = Context.Parameters["targetdir"];
- string[] files = Directory.GetFiles(path, "*config", SearchOption.TopDirectoryOnly);
- if (files.Length == 1)
- {
- // Get the name of the exe file
- _execPath = files[0].Substring(0, files[0].Length - 7);
- }
- _execPath = string.Empty;
- }
- return _execPath;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement