问题需求:
当我们的程序用到一些插件功能,而这些插件又不识别中文,不支持中文路径的话,我们的程序安装路存在中文的话就没办法正常使用插件了。
解决方案:
在制作一键安装包的时候在用户选择安装路径的时候检查路径中的字符。当路径中包含中文,就弹窗提醒:所选路径不能包含中文
1.制作一个用户自定义动作(Custom Actions)
制作方式见我另外一个博客:http://blog.youkuaiyun.com/qq_20849387/article/details/78421482
修改里面代码:
using Microsoft.Deployment.WindowsInstaller;
using System.Text.RegularExpressions;
namespace JudgeInstallPath
{
public class CustomActions
{
[CustomAction]
public static ActionResult CustomAction1(Session ses