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?
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?