获取位置路径 Wix 安装 [英] Getting Location path Wix installation

查看:27
本文介绍了获取位置路径 Wix 安装的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果我想访问 mylocation.txt 文件,如何获取位置路径,该文件当前在 E:drive 中.

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;
    }

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

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.

推荐答案

Mylocation.txt 作为资源文件附加到自定义操作项目中.从此讨论.

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

这篇关于获取位置路径 Wix 安装的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆