InnoSetup常见问题

1 在压缩过程中报错“系统找不到指定的路径”

1.1 现象

在这里插入图片描述

1.2 原因

存在有的文件路径太长。一般来说,Windows应用不能处理超过260个字符的路径。

1.3 参考资料

https://stackoverflow.com/questions/38789616/inno-setup-compiler-cannot-find-the-path-specified-error-with-long-paths

2 设置一些文件或者目录是只读的

2.1 解决办法

使用 Attribs: readonly 参数。
此参数在[Files][Dirs] section下都可以使用

Example如下:

Source: "D:\POS CAD Standard\CAD\*"; DestDir: "{sd}\POS CAD Standard"; \
    Flags: ignoreversion recursesubdirs createallsubdirs; Attribs: readonly

2.2 参考资料

https://stackoverflow.com/questions/36308479/inno-setup-make-dirs-and-files-read-only

3 删除只读目录

3.1 motivation

确保升级程序或者uninstaller能够覆盖或者删除掉目录

3.2 解决办法

Use uninsremovereadonly flag. 使用overwritereadonly flag来允许升级。

Example如下:

Source: "D:\POS CAD Standard\CAD\*"; DestDir: "{sd}\POS CAD Standard"; \
    Flags: recursesubdirs createallsubdirs uninsremovereadonly overwritereadonly; \
    Attribs: readonly hidden system;

3.3 参考材料

https://stackoverflow.com/questions/36397449/inno-setup-automatic-deletion-of-read-only-folder-on-uninstall

  • 9
    点赞
  • 12
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值