Archive: Why VNISedit could not creat correct desktop shortcut in Vista?


Why VNISedit could not creat correct desktop shortcut in Vista?
Why VNISedit could not creat correct desktop shortcut in Vista?

!)use code


ReadRegStr $0 HKEY_CURRENT_USER "Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" "Desktop"
MessageBox MB_OK "your desktop path is :$0"
CreateShortCut "$0\vistaSCTest.lnk" "$INSTDIR\test.exe ...


and here ,$0 push correct path

but,at last setup app could not creat correct desktop shortcut

such as:

$0=D:\Users\secowu\desktop

but setup app. creat shortcut c:\Users\secowu\desktop

omm,it makes me crazy...

tks for helping.

You should be using $DESKTOP for the desktop path.
Additionally, by using SetShellVarContext all, you can ensure that it is installed for all users, otherwise use SetShellVarContext current, if you want it installed on the current user only.


I use this code,but it still creates error desktop shortcut
it will be work good under xp,but could not under Vista.


SetShellVarContext current
CreateShortCut "$0\vistaSCTest.lnk" "$INSTDIR\test.exe

do you have RequestExecutionLevel in your script?


Originally posted by Anders
do you have RequestExecutionLevel in your script?
error....