0

如果我想访问 mylocation.txt 文件,如何获取位置路径,该文件当前位于 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;
    }

我可以将 mylocation.txt 存储到应用程序根目录而不是 E 位置。以及如何调用 mylocation.txt?基本上我想要的是从这个文本文件中获取组合框的值,一旦安装正在进行中。

4

1 回答 1

0

在自定义操作项目中附加Mylocation.txt作为资源文件。从此讨论中获取更多详细信息。

于 2013-06-17T12:18:56.827 回答