C#获取安装程序所在的路径

 public static string GetCurrentPath()
        {
            System.Reflection.Assembly asm = System.Reflection.Assembly.GetExecutingAssembly();
            string path = asm.Location.Remove(asm.Location.LastIndexOf("\\")) + "\\";
            return path;
        }

原文地址:https://www.cnblogs.com/swxj/p/2856073.html