Shortcuts removal fails on Windows Vista
来源:互联网 发布:淘宝如何选择发货地 编辑:程序博客网 时间:2024/06/06 04:22
转载:http://nsis.sourceforge.net/Shortcuts_removal_fails_on_Windows_Vista
Shortcuts removal fails on Windows Vista
From NSIS Wiki
Windows Vista and Windows 7 automatically identify installer executables, including NSIS installers, and ask 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 the 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
- Shortcuts removal fails on Windows Vista
- Windows Vista On Demand
- My GCC Environment on Windows Vista
- Debugging a Service on Windows Vista
- Howto Install Windows XP / Vista on Xen
- Windows MMC shortcuts
- Keyboard shortcuts for Windows
- Windows command shortcuts
- Install IIS 7 on Windows Vista and Windows 7
- Sublime Keyboard Shortcuts - Windows/Linux
- VS 2005 & SQL Server 2005 on Windows Vista
- VS 2005 & SQL Server 2005 on Windows Vista
- VS 2005 & SQL Server 2005 on Windows Vista
- VS 2005 & SQL Server 2005 on Windows Vista
- VS 2005 & SQL Server 2005 on Windows Vista
- VS 2005 & SQL Server 2005 on Windows Vista
- VS 2005 & SQL Server 2005 on Windows Vista
- VS 2005 & SQL Server 2005 on Windows Vista
- 设计模式:模板模式
- JQuery+radio相关操作
- Printer Queue打印队列
- Ubuntu 12.04 中安装和配置 Java JDK
- Android OpenGL基础教程 1
- Shortcuts removal fails on Windows Vista
- Android开发:如何实现TCP和UDP传输
- ffmpeg对ts流的解析
- 卡西欧(casio)-SGW-100 磁偏角矫正(电子指南针数码罗盘矫正)
- 求2~2000的所有素数.有足够的内存,要求尽量快
- iOS 6 Secure密码UITextField造成非密码UITextField退格清空Bug
- 编程题
- suse10虚拟机root 密码丢失找回
- 大小端互相转换