Archive: Shortcut problem


Shortcut problem
Hi,

I have a wierd problem with creating shortcuts,
for some reason, when I run the installation using 'Run As' local administrator (which I have to do because it needs administrator permissions on certain parts), the shortcut I place on the desktop, the target gets screwed up.

The target should read: "R:\Hill Labs Cube Viewer\Cube Viewer.exe" and when it is run as the normal logged in user, this is what it is. (to test this i commented out the code that required admin permissions).
But when I run as administrator, the target is R:\Hill_Lab\Cube_Vie.exe

Why would running as do this?

Here is the part of the script that creates the shortcut:


DetailPrint "Creating Shortcut"
SetShellVarContext All
SetOutPath "R:\Hill Labs Cube Viewer"
CreateShortCut "$DESKTOP\Hill Labs Cube Viewer.lnk" '"R:\Hill Labs Cube Viewer\Cube Viewer.exe"' "" "" "" "" "" "Open to view hill labs cube files"
AccessControl::GrantOnFile "$DESKTOP\Hill Labs Cube Viewer.lnk" "Everyone" "FullAccess"


Any help on this would be much appreciated.

Hannes.

Remove the extra quotes.


Removing the single quotes makes no difference to the outcome.


Are you sure R: exists for the administrator? It's probably the same problem as this one.


Ok, that would be the problem, It doesn't exist for administrator. so nsis doesn't create the shortcut, windows does?
How can I workaround this problem? I don't want to map a drive, is that even possible when using 'Run As'?

Thanks for your fast replies


A simple workaround would be using \\server\share instead of the map.


Of course!

thanks for that, works perfect!

:)