View Full Version : Placing shortcut on specific user's desktop
NewsArchive
05-12-2010, 01:02 AM
Hello Friedrich
I have tried everything I could see to force a shortcut on to a specific
user's desktop but it always ends up on the "All users" desktop, even if
I mark it as NOT belonging to the "common group"
What am I missing?
Regards
Daan Marais
NewsArchive
05-12-2010, 01:04 AM
Daan,
> I have tried everything I could see to force a shortcut on to a specific
> user's desktop but it always ends up on the "All users" desktop, even if
> I mark it as NOT belonging to the "common group"
>
> What am I missing?
I assume you are missing that you have to do a per-user installation to
write a per-user shortcut (or to handle any per-user configuration). But I
think you are doing a per-machine installation.
BTW, if you do a per-user installation, please note that, as a result, you
can't write to any protected Windows area. That is the Program Folder tree,
the Windows folder tree, HKLM registry, and so on.
In the modern Windows world (Windows Vista, Windows Server 2008, Windows 7,
Server 7), installations are always per-machine and your application
("asInvoker" manifested) has to do the per-user configuration.
I would suggest to read "Learning SetupBuilder Part I" which covers UAC and
other general Windows development guidelines. We developed this free
resource to help you write UAC-compliant and Windows 7 compatible
installations and applications.
Does this help?
Friedrich
--
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
NewsArchive
05-12-2010, 01:05 AM
I forgot the link:
http://www.lindersoft.com/forums/showthread.php?t=24376
Friedrich
NewsArchive
05-12-2010, 01:06 AM
Hi Friedrich
I was afraid that was going to be the answer. I have a reasonable
understanding of UAC and the protected folders and have several
successful installers being used every day on a variety of OS from Win98
to Server2008, but this is a really stupid situation affecting an old
system we have been running since 1990 in various incarnations.
The target OS is XP, and this is a large corporate customer with limited
user access implemented via domain policies. One of the stupid little
things they do is to NOT show the "All users" desktop icons on
individual user desktops. The installation is indeed a per-machine
installation as the data is kept on a server (IP Driver).
Oh well, time to bite the bullet.
Thanks & regards
Daan
NewsArchive
05-12-2010, 01:07 AM
Hi Daan,
> I was afraid that was going to be the answer. I have a reasonable
> understanding of UAC and the protected folders and have several successful
> installers being used every day on a variety of OS from
> Win98 to Server2008, but this is a really stupid situation affecting
> an old system we have been running since 1990 in various incarnations.
>
> The target OS is XP, and this is a large corporate customer with
> limited user access implemented via domain policies. One of the stupid
> little things they do is to NOT show the "All users" desktop icons on
> individual user desktops. The installation is indeed a per-machine
> installation as the data is kept on a server (IP Driver).
>
> Oh well, time to bite the bullet.
If the target operating system is XP (and not any UAC-aware system) then you
can try the following. But I don't know if this really works!
One line before you create the Desktop shortcut, disable per-machine
installation. Then create the Desktop shortcut and re-enable per-machine
mode.
Similar to this:
Set Installer Flag $SB_ALLUSERSFLAG$ to "0"
>---- install desktop shortcut here <----
Set Installer Flag $SB_ALLUSERSFLAG$ to "1"
But again, I am not sure if this works.
Another option could be the use of the "Create Shortcut..." script function.
As "Location", use %_CSIDL_DESKTOPDIRECTORY%.
Please keep us posted.
Friedrich
NewsArchive
05-12-2010, 01:08 AM
Hi Friedrich
friedrich linder wrote:
> Hi Daan,
>
>> I was afraid that was going to be the answer. I have a reasonable
>> understanding of UAC and the protected folders and have several successful
>> installers being used every day on a variety of OS from
>> Win98 to Server2008, but this is a really stupid situation affecting
>> an old system we have been running since 1990 in various incarnations.
>>
>> The target OS is XP, and this is a large corporate customer with
>> limited user access implemented via domain policies. One of the stupid
>> little things they do is to NOT show the "All users" desktop icons on
>> individual user desktops. The installation is indeed a per-machine
>> installation as the data is kept on a server (IP Driver).
>>
>> Oh well, time to bite the bullet.
>
> If the target operating system is XP (and not any UAC-aware system) then you
> can try the following. But I don't know if this really works!
>
> One line before you create the Desktop shortcut, disable per-machine
> installation. Then create the Desktop shortcut and re-enable per-machine
> mode.
>
> Similar to this:
>
> Set Installer Flag $SB_ALLUSERSFLAG$ to "0"
>> ---- install desktop shortcut here <----
> Set Installer Flag $SB_ALLUSERSFLAG$ to "1"
>
> But again, I am not sure if this works.
>
> Another option could be the use of the "Create Shortcut..." script function.
> As "Location", use %_CSIDL_DESKTOPDIRECTORY%.
>
> Please keep us posted.
>
> Friedrich
>
>
Thank you - your first solution works perfectly. So easy when you know how!
The "Create shortcut" script function needs a folder name as well so one
would need to fool around with it a bit, but no need, as solution 1 works.
This also means that I can do the UAC story later on without pressure.
Regards
Daan
NewsArchive
05-12-2010, 01:10 AM
Hi Daan,
> Thank you - your first solution works perfectly. So easy when you know
> how!
Perfect!! Thanks for the update.
I think we'll add this info to the manual because there are still quite a
few "XP-only" installs out there.
Friedrich
NewsArchive
05-12-2010, 01:11 AM
I'm late (as usual) for an appointment... so haven't thoroughly tested the
attached. :rolleyes:
But something like this seems to work in a UAC environment (installs the
"application" inside of Program Files and shortcut in my regular user
profile on Vista 64)
You need to compile the asInvoker "helper" app first, then put it where the
script for the "real" installation can find it.
And you'll need to add something manually to the uninstall log if you need
to clean up the shortcut.
This takes advantage of Friedrich's magic "run non-elevated" trick.
jf
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.