Getting Location path Wix installation

2019-08-30 11:05发布

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.

1条回答
家丑人穷心不美
2楼-- · 2019-08-30 11:24

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

查看更多
登录 后发表回答