PDA

View Full Version : Create Shortcut on desktop %_CSIDL_COMMON_DESKTOPDIRECTORY%



harncw
10-28-2010, 11:29 AM
With UAC I believe the installer needs to be administrator to create a shortcut in %_CSIDL_COMMON_DESKTOPDIRECTORY%.

I would prefer to not requireAdministrator in my installer.

Therefore I'm trying:


Create Shortcut "Global Data Manager" to Custom\%_CSIDL_COMMON_DESKTOPDIRECTORY%\Global Data Manager
If %_SB_ERRORCODE% Equals "0" Then
Create Shortcut "Global Data Manager" to Custom\%_CSIDL_DESKTOPDIRECTORY%\Global Data Manager
End

So that the installer will try to create to a common shortcut and only when that fails will it create a shortcut on the desktop for that user.

However what I'm finding is:

1. 2 shortcuts on my desktop, when I run the installer as Administrator
1.A C:\Users\Public\Desktop\Global Data Manager.lnk
1.B C:\Users\harncw\Desktop\Global Data Manager.lnk

2. 1 shortcut when I install asInvoker
2.A C:\Users\harncw\Desktop\Global Data Manager.lnk

SetupBuilder Online Documentation
Create Shortcut
Return Values
If the function succeeds, the %_SB_ERRORCODE% return value is nonzero.
If the function fails, the return value is zero.

Where am I going wrong?

linder
10-29-2010, 02:16 AM
Hello,

You are not doing anything wrong! This is definitely a bug in %_SB_ERRORCODE% :(

We have fixed this in our latest internal source codes now and the fix will be part of the upcoming SetupBuilder 7.3.

Thank you for bringing this to our attention!

--
Friedrich Linder
Lindersoft
www.lindersoft.com
+1.954.252.3910

SetupBuilder is Windows 7 installation -- "point. click. ship"

-- Official Comodo Code Signing and SSL Certificate Partner