Getting Location path Wix installation

你。 提交于 2020-01-17 07:54:11

问题


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:


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



来源:https://stackoverflow.com/questions/17143806/getting-location-path-wix-installation

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!