Вопрос

How to get location path if i want to access mylocation.txt file, this file currently is in E:drive.

[CustomAction]
    public static ActionResult FillList(Session xiSession)
    {

    //Can i get store mylocation.txt into application root instead of E location
        string path = "Mylocation.txt";

        // Open the file to read from. 
        string[] readText = File.ReadAllLines(path);

        foreach (string s in readText)
        {
            //Console.WriteLine(s);
            FillComboBox(xiSession, s, s);
        }
         xiSession["COUNTRIES"] = "--Select Location--";
        return ActionResult.Success;
    }

Can i get store mylocation.txt into application root instead of E location.And how mylocation.txt can be called?Basically what i want is to get the values of combox from this text file,once installation is in progress.

Это было полезно?

Решение

Attach the Mylocation.txt as resource file in Custom action project. Get more details from this discussion.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top