tru*_*ger 21 inno-setup desktop-shortcut
如何通过Innosetup删除桌面快捷方式?它是由以前的版本创建的,不再需要了.我尝试在[InstallDelete]中删除它
[InstallDelete]
Type: files; Name: {userdesktop}\Shortcut Name
并删除CurStepChanged事件处理程序的"ssInstall"中的文件
DeleteFile(ExpandConstant('{userdesktop}\Shortcut Name'));
但它们不起作用.任何建议表示赞赏!
Ger*_*ald 29
Either option will work, but there are a couple of considerations.
1) You'll either need to use {userdesktop} or {commondesktop} depending on whether the shortcut was installed for a specific user or for all users.
2) You'll need to make sure to add the .lnk extension to the shortcut name.
So this will probably work:
DeleteFile(ExpandConstant('{userdesktop}\Shortcut Name.lnk'));
DeleteFile(ExpandConstant('{commondesktop}\Shortcut Name.lnk'));
or
[InstallDelete]
Type: files; Name: "{userdesktop}\Shortcut Name.lnk"
Type: files; Name: "{commondesktop}\Shortcut Name.lnk"
| 归档时间: | 
 | 
| 查看次数: | 8528 次 | 
| 最近记录: |