NSIS不能删除其打包的程序桌面快捷方式的解决方式
来源:互联网 发布:网络剧十宗罪疑点 编辑:程序博客网 时间:2024/05/18 18:15
实质上就是权限的问题,可以模仿如下方式处理
Windows Vista and Windows 7 automatically identifies installer executables, including NSIS installers, and asks the user permission to run them with elevated privileges. Automatic detection, however, comes with the price of automatic backward compatibility tricks. One of which is automatic relocation of shortcuts created in the Start Menu to All Users' Start Menu.
To workaround this, use the new RequestExecutionLevel command or create the shortcuts in All Users' folders in the first place, using SetShellVarContext.
OutFile vista.exeName Vista RequestExecutionLevel user Section CreateDirectory "$SMPROGRAMS/Vista Test" CreateShortcut "$SMPROGRAMS/Vista Test/hello.lnk" $WINDIR/notepad.exe WriteUninstaller $EXEDIR/uninst.exeSectionEnd Section uninstall Delete "$SMPROGRAMS/Vista Test/hello.lnk" RMDir "$SMPROGRAMS/Vista Test"SectionEnd
OutFile vista.exeName Vista RequestExecutionLevel admin #NOTE: You still need to check user rights with UserInfo! Function .onInit#TODO: call UserInfo plugin to make sure user is adminFunctionEnd Section SetShellVarContext all CreateDirectory "$SMPROGRAMS/Vista Test" CreateShortcut "$SMPROGRAMS/Vista Test/hello.lnk" $WINDIR/notepad.exe WriteUninstaller $EXEDIR/uninst.exeSectionEnd Section uninstall SetShellVarContext all Delete "$SMPROGRAMS/Vista Test/hello.lnk" RMDir "$SMPROGRAMS/Vista Test"SectionEnd
原文链接:http://nsis.sourceforge.net/Shortcuts_removal_fails_on_Windows_Vista
- NSIS不能删除其打包的程序桌面快捷方式的解决方式
- 使用 NSIS打包的应用程序,在Vista中无法正确删除开始菜单快捷方式的问题解决方案
- Android桌面 快捷方式的删除
- NSIS 打包 win7 中无法删除快捷方式
- NSIS 打包 win7 中无法删除快捷方式
- NSIS 打包 win7 中无法删除快捷方式
- android程序卸载后无法删除桌面快捷方式的解决办法
- android程序卸载后无法删除桌面快捷方式的解决办法
- android程序卸载后无法删除桌面快捷方式的解决办法
- android程序卸载后无法删除桌面快捷方式的解决办法
- 删除桌面无法删除的网页快捷方式
- 关于快捷方式不能使用,发表自己的解决方式
- Vista/Win7系统,如何删除NSIS脚本生成的快捷方式?
- NSIS 如何删除VISTA系统开始菜单的快捷方式
- NSIS 删除开始菜单中快捷方式的方法(学习八)
- NSIS创建快捷方式增加起始位置的解决教程
- android桌面快捷方式的创建与删除
- Android 桌面快捷方式的创建与删除
- ruby on rails与MySql的环境配置——支持rails 2.3.5以上版本
- 3G手机的市场技术分析:3G手机不能有更大的市场,10年之内必将跌入低谷
- 气象观测园地建设初探
- [草稿]消除C代码中的冗余
- ajax+json
- NSIS不能删除其打包的程序桌面快捷方式的解决方式
- html无素input的onclick事件大全
- 编译Qt的MySql驱动
- 找不到Oracle驱动程序的安装例程——解决方法
- DOS常用命令
- 编译Qt的MySql驱动
- 使用类前置声明的好处-结合Qt 4一个主窗口实例讲解
- Delphi7下用dbExpress调用Oracle存储过程(返回数据集)的一个简单示例和调试过程
- 查看Apache并发请求数及其TCP连接状态