如何使用wix在子文件夹中创建2个文件夹

时间:2017-02-06 18:06:37

标签: wix wix3.6

刚刚开始接受WIX,我正在尝试为我的c#wpf app创建一个安装程序。

我想在programdata文件夹中创建的子文件夹中创建2个文件夹。

以下代码只会创建1个文件夹'数据'但不是' log'。

请问我做错了什么?

由于

def convert_json(fileName):
    big = []
    small = []
    with open(fileName,'r') as file:
        for line in file:
            line = line.strip()
            if line.startswith("--"):
                if "big" in line:
                    array = big
                    keys = ["w1", "w2", "w3"]
                    sep = ";"
                else:
                    array = small
                    keys = ["a", "b", "c"]
                    sep = ","
                continue

            values = line.split(sep)
            # todo: make sure sizes match
            mapping = dict(zip(keys, values))
            array.append(mapping)

    with open('smalljson.txt','w') as small_file:
        json.dump(small, small_file)
    with open('bigwater.txt','w') as big_file:
        json.dump(big, big_file)

1 个答案:

答案 0 :(得分:1)

您需要添加一个Directory =“EmptyLogFolderDir”的组件,与您对数据的操作相同。