win7 64位快捷方式bug

通过IShellLink::SetIconLocation给新创建的设置一个exe的图标路径后,在windows 7 64位下,右键该快捷方式,然后点击切换图标,会提示Windows 找不到%ProgramFiles%\xxx\xxx.exe,如图:

image.png

经查阅,这应该算是windows 7版本的bug,它在点击更改图标按钮时自动将C:\Programe files (x86)\替换成了%ProgramFiles%,但在64位程序(explorer.exe)中%ProgramFiles%对应的是C:\Programe files\,所以就出错了。

参考链接:

  1. https://stackoverflow.com/questions/10324004/nsis-createshortcut-insists-on-using-programfiles-for-the-icon-path#
  2. https://www.sevenforums.com/general-discussion/220749-bug-shortcuts-windows-seven-change-icon-not-working.html

你可能感兴趣的:(win7 64位快捷方式bug)