windows-10 - Inno setup 无法在 Windows 10 中创建桌面图标
问题描述
我有用于最新版本的 inno 设置的设置文件。它从 windows xp 到 windows 8 都可以编译并运行良好,但在 windows 10 中,它在创建桌面图标时失败,并出现下一个错误:IPersistFile::Save failed; 代码 0x80070002
这就是我在安装文件中创建图标的方式:
[Icons]
Name: "{userdesktop}\Forex Tester 4"; Filename: "{app}\ForexTester4.exe"; Tasks: desktopicon
部分安装日志文件:
2019-02-01 12:50:46.376 -- Icon entry --
2019-02-01 12:50:46.376 Dest filename: C:\Users\Mike\Desktop\Forex Tester 4.lnk
2019-02-01 12:50:46.376 Creating the icon.
2019-02-01 12:50:46.376 Exception message:
2019-02-01 12:50:46.376 Message box (OK):
IPersistFile::Save failed; code 0x80070002.
The system cannot find the file specified.
2019-02-01 12:50:59.066 User chose OK.
该文件夹存在,我可以在那里手动创建文件。但是 inno setup 无法做到这一点......除了桌面图标之外的所有其他图标都没有问题。
有任何想法吗?
解决方案
它可能是一个相对较新的(自 1709 版以来)Windows 10 功能,称为受控文件夹访问。有关打开或关闭它的说明,请参阅在 Windows 安全中心中允许被阻止的应用程序。
推荐阅读
- asp.net - ASP.net 从 vb gridview 隐藏日期时间
- android - 将数据上传到特定的 Google Drive 帐户
- php - PDO LIMIT 和 EMULATE_PREPARES(false)
- javascript - 窗口大小更改时是否可以自动更改组元素的大小?
- mysql - 在 PhpMyadmin 中,“排序规则”突然变为“正在使用”,而无需触及数据库
- angular - 锚标签 href 在 Firefox 中不起作用,但在 chrome 中可以正常工作
- jpa - 如何更新使用 EntityManager.find 检索到的实体
- android - 由于 appcompat 错误,无法构建我的应用程序
- itext - ItextPdf 在将平铺的 tiff 转换为 pdf 时抛出 IllegalArgumentException
- reactjs - 添加项目后页面未更新