Go Back   Winamp Forums > Developer Center > NSIS Discussion

Reply
Thread Tools Search this Thread Display Modes
Old 13th October 2004, 23:10   #1
hannes
Member
 
hannes's Avatar
 
Join Date: Jul 2001
Location: NZ
Posts: 71
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:

code:

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.
hannes is offline   Reply With Quote
Old 13th October 2004, 23:18   #2
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,338
Remove the extra quotes.

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 13th October 2004, 23:22   #3
hannes
Member
 
hannes's Avatar
 
Join Date: Jul 2001
Location: NZ
Posts: 71
Removing the single quotes makes no difference to the outcome.
hannes is offline   Reply With Quote
Old 13th October 2004, 23:42   #4
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,338
Are you sure R: exists for the administrator? It's probably the same problem as this one.

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 13th October 2004, 23:50   #5
hannes
Member
 
hannes's Avatar
 
Join Date: Jul 2001
Location: NZ
Posts: 71
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
hannes is offline   Reply With Quote
Old 14th October 2004, 00:23   #6
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,338
A simple workaround would be using \\server\share instead of the map.

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 14th October 2004, 00:51   #7
hannes
Member
 
hannes's Avatar
 
Join Date: Jul 2001
Location: NZ
Posts: 71
Of course!

thanks for that, works perfect!

hannes is offline   Reply With Quote
Reply
Go Back   Winamp Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump