Page 1 of 1

Framework 3.5SP1 install in per-user installer

Posted: Mon May 17, 2010 1:09 pm
by benjoTLV
Hi,
We built an installer that target a per user install (allusers=false) but still requires the target machine to have .NET 3.5SP1.
What we expect is that a user that already has the .NET will be able to install the app without any admin rights and a user who doesn't will be prompt for admin rights to install the .NET components but not our app.

The result is that .NET 2.0SP2 and 3.0SP2 behaves as expected and prompt the user for permission to install (UAC is on). then the .NET is installed for all users and our app only for the current user... perfect!
But when trying to install 3.5SP1, I get an error message that tells me that I don't have the permissions to install this component... then the installer fails. I does not trigger the UAC to ask me for permission

What can I do in order to make this work?? I tried to specify allusers=true at the beginning of the 3.5sp1 script and even added allusers=1 inside the install MSI script entry to trigger the UAC to react but nothing helped.

one more thing: ideally, the installer would ask only for one permission prompt at the beginning of the .NET setup and install all of them without asking again. Is there a way to do that?

It is really critical for us since our customer start to think we don't know how to build an installer (which is partly true of course!)
Any help, ideas would be great.Thanks a lot!

PS:We are using IA9

Re: Framework 3.5SP1 install in per-user installer

Posted: Mon May 17, 2010 6:12 pm
by MichaelNesmith
ALLUSERS is just a script variable, nothing else. So your logic in giving it a value is flawed - you are thinking instead of a command that would elevate/de-elevate on demand.

Your solution would be something like this:

- Elevate your setup at start
- All your .NET installs will then have the necessary rights
- Code your script so you are not using any admin rights for your own files
- If you are launching an external program, launch it with de-elevation

Re: Framework 3.5SP1 install in per-user installer

Posted: Tue May 18, 2010 12:33 am
by benjoTLV
Thanks for the quick reply.
This solution raises few more questions:
1. How come it is currently working properly when my installer installs 2.0 and 3.0 (even though I did not change anything inside, it is the IA automatic scripts)?
2. I am calling IA /update at start up and this would not be allowed if the the installer was elevated from start (start menu can launch only non-admin programs)... is there a way to elevate only if .NET is required?
3. It wouldn't be so good if my users would be prompt by UAC each time they want to update (some are not admins at all, so they would need their admin to update...). Do you have suggestions for this scenario?

Thanks a lot!

Re: Framework 3.5SP1 install in per-user installer

Posted: Tue May 18, 2010 12:40 am
by benjoTLV
One last question:
Is there such a command that elevate/de-elevate on demand?
Thanks

Michael, any idea on this? I am really stuck here, I would like to avoid the drastic solution to create a nested installer one for my app without prerequisites and one called from the first installer that will install only the prerequisite... the second one would have a manifest that states "RequireAdministrator"
Kind of ugly and not sure this would even succeed