How to generate WiX XML from a .reg file?

前端 未结 6 556
囚心锁ツ
囚心锁ツ 2020-12-09 05:22

Is there a tool to generate WiX XML given a .reg file?


In 2.0, you were supposed to be able to run tallow to generate registry XML:

         


        
6条回答
  •  眼角桃花
    2020-12-09 05:58

    This code works well, but if you have a an empty string value in the registry file you are importing, an exception error gets thrown. You may want to update the ParseRegistryValue section accordingly.

           if (rawValue.IndexOf("\"") != -1)
            {
                valueType = "string";
                if (rawValue.Length > 1)
                {
                    actualValue = rawValue.Substring(1, rawValue.Length - 2);
                }
                else
                {
                    actualValue = "";
                }
            }
    

提交回复
热议问题