automatic selection perUser/perMachine installation

classic Classic list List threaded Threaded
12 messages Options
Reply | Threaded
Open this post in threaded view
|

automatic selection perUser/perMachine installation

Carles Pina i Estany

Hi,

I'm not sure if this is possible, I'd like something like:
(I'm using WixUI_Advanced but I could change by something else if
needed)

If an Administrator installs the MSI: I'd like that gets installed, by
default, perMachine (and the Administrator could change it).

If a non-administrator installs the MSI: by default the perUser
option should be selected: and the user could change it and the the UAC
dialog will appear when needed.

Is this possible at all?
References to this are appreciated, indeed.

Regards,

--
Carles Pina i Estany
        Web: http://pinux.info || Blog: http://pintant.cat
        GPG Key 0x8CD5C157

------------------------------------------------------------------------------
_______________________________________________
WiX-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/wix-users
Reply | Threaded
Open this post in threaded view
|

Re: automatic selection perUser/perMachine installation

Hoover, Jacob
Fairly certain that WixStdBA doesn't support this today. As for if you could write a custom BA, and modify the plan to accomplish this, I'm not certain.  

-----Original Message-----
From: Carles Pina i Estany [mailto:[hidden email]]
Sent: Thursday, June 04, 2015 6:36 AM
To: [hidden email]
Subject: [WiX-users] automatic selection perUser/perMachine installation


Hi,

I'm not sure if this is possible, I'd like something like:
(I'm using WixUI_Advanced but I could change by something else if
needed)

If an Administrator installs the MSI: I'd like that gets installed, by default, perMachine (and the Administrator could change it).

If a non-administrator installs the MSI: by default the perUser option should be selected: and the user could change it and the the UAC dialog will appear when needed.

Is this possible at all?
References to this are appreciated, indeed.

Regards,

--
Carles Pina i Estany
        Web: http://pinux.info || Blog: http://pintant.cat
        GPG Key 0x8CD5C157

------------------------------------------------------------------------------
_______________________________________________
WiX-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/wix-users

------------------------------------------------------------------------------
_______________________________________________
WiX-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/wix-users
Reply | Threaded
Open this post in threaded view
|

Re: automatic selection perUser/perMachine installation

Carles Pina i Estany

Is BA a Bootstrapper Application (a .exe) in this context?

I wanted to avoid a Bootstrapper application and just deliver the
.msi, with the sensible defaults (perMachine if the user is an
administrator or perUser otherwise).

On Jun/04/2015, Hoover, Jacob wrote:

> Fairly certain that WixStdBA doesn't support this today. As for if you could write a custom BA, and modify the plan to accomplish this, I'm not certain.  
>
> -----Original Message-----
> From: Carles Pina i Estany [mailto:[hidden email]]
> Sent: Thursday, June 04, 2015 6:36 AM
> To: [hidden email]
> Subject: [WiX-users] automatic selection perUser/perMachine installation
>
>
> Hi,
>
> I'm not sure if this is possible, I'd like something like:
> (I'm using WixUI_Advanced but I could change by something else if
> needed)
>
> If an Administrator installs the MSI: I'd like that gets installed, by default, perMachine (and the Administrator could change it).
>
> If a non-administrator installs the MSI: by default the perUser option should be selected: and the user could change it and the the UAC dialog will appear when needed.
>
> Is this possible at all?
> References to this are appreciated, indeed.
>
> Regards,
>
> --
> Carles Pina i Estany
> Web: http://pinux.info || Blog: http://pintant.cat
> GPG Key 0x8CD5C157
>
> ------------------------------------------------------------------------------
> _______________________________________________
> WiX-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/wix-users
>
> ------------------------------------------------------------------------------
> _______________________________________________
> WiX-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/wix-users
--
Carles Pina i Estany
        Web: http://pinux.info || Blog: http://pintant.cat
        GPG Key 0x8CD5C157

------------------------------------------------------------------------------
_______________________________________________
WiX-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/wix-users
Reply | Threaded
Open this post in threaded view
|

Re: automatic selection perUser/perMachine installation

Carles Pina i Estany

I'll try to use a condition with %Priviliged property to setup the
installation type by default (I see it in the page 122 of the Wix 3.6
book)

Thanks for all your answers, it helps me to understand what's possible
or not and if I missed something (I'm new in WiX)

On Jun/04/2015, Carles Pina i Estany wrote:

>
> Is BA a Bootstrapper Application (a .exe) in this context?
>
> I wanted to avoid a Bootstrapper application and just deliver the
> .msi, with the sensible defaults (perMachine if the user is an
> administrator or perUser otherwise).
>
> On Jun/04/2015, Hoover, Jacob wrote:
> > Fairly certain that WixStdBA doesn't support this today. As for if you could write a custom BA, and modify the plan to accomplish this, I'm not certain.  
> >
> > -----Original Message-----
> > From: Carles Pina i Estany [mailto:[hidden email]]
> > Sent: Thursday, June 04, 2015 6:36 AM
> > To: [hidden email]
> > Subject: [WiX-users] automatic selection perUser/perMachine installation
> >
> >
> > Hi,
> >
> > I'm not sure if this is possible, I'd like something like:
> > (I'm using WixUI_Advanced but I could change by something else if
> > needed)
> >
> > If an Administrator installs the MSI: I'd like that gets installed, by default, perMachine (and the Administrator could change it).
> >
> > If a non-administrator installs the MSI: by default the perUser option should be selected: and the user could change it and the the UAC dialog will appear when needed.
> >
> > Is this possible at all?
> > References to this are appreciated, indeed.
> >
> > Regards,
> >
> > --
> > Carles Pina i Estany
> > Web: http://pinux.info || Blog: http://pintant.cat
> > GPG Key 0x8CD5C157
> >
> > ------------------------------------------------------------------------------
> > _______________________________________________
> > WiX-users mailing list
> > [hidden email]
> > https://lists.sourceforge.net/lists/listinfo/wix-users
> >
> > ------------------------------------------------------------------------------
> > _______________________________________________
> > WiX-users mailing list
> > [hidden email]
> > https://lists.sourceforge.net/lists/listinfo/wix-users
> --
> Carles Pina i Estany
> Web: http://pinux.info || Blog: http://pintant.cat
> GPG Key 0x8CD5C157
>
> ------------------------------------------------------------------------------
> _______________________________________________
> WiX-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/wix-users
--
Carles Pina i Estany
        Web: http://pinux.info || Blog: http://pintant.cat
        GPG Key 0x8CD5C157

------------------------------------------------------------------------------
_______________________________________________
WiX-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/wix-users
Reply | Threaded
Open this post in threaded view
|

Re: automatic selection perUser/perMachine installation

Hoover, Jacob
In reply to this post by Carles Pina i Estany
Yes.  Sorry I read this as you were trying to get a burn bundle to morph between per-user and per-machine.

It should be possible, but UAC brings in interesting challenges. A user could be an admin, but not ran elevated.  I'd start by looking at https://msdn.microsoft.com/en-us/library/aa370852(v=vs.85).aspx and see if you can schedule an action to set the default option in the UI, but the issue is typically the UI sequence is ran un-elevated.

-----Original Message-----
From: Carles Pina i Estany [mailto:[hidden email]]
Sent: Thursday, June 04, 2015 10:15 AM
To: General discussion about the WiX toolset.
Subject: Re: [WiX-users] automatic selection perUser/perMachine installation


Is BA a Bootstrapper Application (a .exe) in this context?

I wanted to avoid a Bootstrapper application and just deliver the .msi, with the sensible defaults (perMachine if the user is an administrator or perUser otherwise).

On Jun/04/2015, Hoover, Jacob wrote:

> Fairly certain that WixStdBA doesn't support this today. As for if you could write a custom BA, and modify the plan to accomplish this, I'm not certain.  
>
> -----Original Message-----
> From: Carles Pina i Estany [mailto:[hidden email]]
> Sent: Thursday, June 04, 2015 6:36 AM
> To: [hidden email]
> Subject: [WiX-users] automatic selection perUser/perMachine
> installation
>
>
> Hi,
>
> I'm not sure if this is possible, I'd like something like:
> (I'm using WixUI_Advanced but I could change by something else if
> needed)
>
> If an Administrator installs the MSI: I'd like that gets installed, by default, perMachine (and the Administrator could change it).
>
> If a non-administrator installs the MSI: by default the perUser option should be selected: and the user could change it and the the UAC dialog will appear when needed.
>
> Is this possible at all?
> References to this are appreciated, indeed.
>
> Regards,
>
> --
> Carles Pina i Estany
> Web: http://pinux.info || Blog: http://pintant.cat
> GPG Key 0x8CD5C157
>
> ----------------------------------------------------------------------
> -------- _______________________________________________
> WiX-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/wix-users
>
> ----------------------------------------------------------------------
> -------- _______________________________________________
> WiX-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/wix-users
--
Carles Pina i Estany
        Web: http://pinux.info || Blog: http://pintant.cat
        GPG Key 0x8CD5C157

------------------------------------------------------------------------------
_______________________________________________
WiX-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/wix-users

------------------------------------------------------------------------------
_______________________________________________
WiX-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/wix-users
Reply | Threaded
Open this post in threaded view
|

Re: automatic selection perUser/perMachine installation

Nir Bar
In reply to this post by Carles Pina i Estany
This article should give you what you need
https://msdn.microsoft.com/en-us/library/aa367559%28v=vs.85%29.aspx
Nir Bar
Freelance Developer
Mail: nir.bar@panel-sw.com
Web: www.panel-sw.com
- C++ On Windows, Linux and Embedded Platforms
- WiX & InstallShield
Reply | Threaded
Open this post in threaded view
|

Re: automatic selection perUser/perMachine installation

Carles Pina i Estany

Hi Nir,

Thank you for your answer! I appreciate it!

I'm testin and there is something that I'm not sure that I'm doing
correctly.

I'm testing it on Windows 7, I have ALLUSERS=2, not setting
MSIINSTALLPERUSER. I'm using WixUI_Advanced, when I press "Advanced" I
have the "Install just for you" option always selected even if I'm using
the account with the administrator account (privileged account).

My wish is that WiX would show the UAC dialog and if the user gets
elevated privileges it would default to "Install for all users of this
machine" and if the user doesn't enter the password then would default
to "Install just for you".

Do you think that this is possible?

Another option and I think that this is what I'll do: default per-user,
if the user changes it will bring the UAC dialog.

Thank you!

PS: and I have an extra problem because how cpack generates files.wxs
but this is under control :-) or at least I'm more familiar with
cmake/cpack to work around it.

On Jun/05/2015, Nir Bar wrote:

> This article should give you what you need
> https://msdn.microsoft.com/en-us/library/aa367559%28v=vs.85%29.aspx
> <https://msdn.microsoft.com/en-us/library/aa367559%28v=vs.85%29.aspx>  
>
>
>
>
> -----
> Nir Bar
> Freelance Developer
> Mail: [hidden email]
> Web: www.panel-sw.com
>    - C++ On Windows, Linux and Embedded Platforms
>    - WiX & InstallShield
> --
> View this message in context: http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/automatic-selection-perUser-perMachine-installation-tp7600534p7600545.html
> Sent from the wix-users mailing list archive at Nabble.com.
>
> ------------------------------------------------------------------------------
> _______________________________________________
> WiX-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/wix-users
--
Carles Pina i Estany
        Web: http://pinux.info || Blog: http://pintant.cat
        GPG Key 0x8CD5C157

------------------------------------------------------------------------------
_______________________________________________
WiX-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/wix-users
Reply | Threaded
Open this post in threaded view
|

Re: automatic selection perUser/perMachine installation

Nir Bar
I think you should set property WixAppFolder="WixPerMachineFolder" if conditions are met for a per-machine installation
Nir Bar
Freelance Developer
Mail: nir.bar@panel-sw.com
Web: www.panel-sw.com
- C++ On Windows, Linux and Embedded Platforms
- WiX & InstallShield
Reply | Threaded
Open this post in threaded view
|

Re: automatic selection perUser/perMachine installation

Carles Pina i Estany

Ideally the "conditions are met" in my case is to bring the UAC prompt and
verify that the user could get privileged rights. But I don't think that
this is possible to do in WiX?

On Jun/06/2015, Nir Bar wrote:

> I think you should set property WixAppFolder="WixPerMachineFolder" if
> conditions are met for a per-machine installation
>
>
>
> -----
> Nir Bar
> Freelance Developer
> Mail: [hidden email]
> Web: www.panel-sw.com
>    - C++ On Windows, Linux and Embedded Platforms
>    - WiX & InstallShield
> --
> View this message in context: http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/automatic-selection-perUser-perMachine-installation-tp7600534p7600551.html
> Sent from the wix-users mailing list archive at Nabble.com.
>
> ------------------------------------------------------------------------------
> _______________________________________________
> WiX-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/wix-users
--
Carles Pina i Estany
        Web: http://pinux.info || Blog: http://pintant.cat
        GPG Key 0x8CD5C157

------------------------------------------------------------------------------
_______________________________________________
WiX-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/wix-users
Reply | Threaded
Open this post in threaded view
|

Re: automatic selection perUser/perMachine installation

Carles Pina i Estany

I've even used a setup.exe and then a manifesto: then I can force the
user to execute the setup.exe elevated but I can't make it optional as I
wanted.

On Jun/07/2015, Carles Pina i Estany wrote:

>
> Ideally the "conditions are met" in my case is to bring the UAC prompt and
> verify that the user could get privileged rights. But I don't think that
> this is possible to do in WiX?
>
> On Jun/06/2015, Nir Bar wrote:
> > I think you should set property WixAppFolder="WixPerMachineFolder" if
> > conditions are met for a per-machine installation
> >
> >
> >
> > -----
> > Nir Bar
> > Freelance Developer
> > Mail: [hidden email]
> > Web: www.panel-sw.com
> >    - C++ On Windows, Linux and Embedded Platforms
> >    - WiX & InstallShield
> > --
> > View this message in context: http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/automatic-selection-perUser-perMachine-installation-tp7600534p7600551.html
> > Sent from the wix-users mailing list archive at Nabble.com.
> >
> > ------------------------------------------------------------------------------
> > _______________________________________________
> > WiX-users mailing list
> > [hidden email]
> > https://lists.sourceforge.net/lists/listinfo/wix-users
> --
> Carles Pina i Estany
> Web: http://pinux.info || Blog: http://pintant.cat
> GPG Key 0x8CD5C157
--
Carles Pina i Estany
        Web: http://pinux.info || Blog: http://pintant.cat
        GPG Key 0x8CD5C157

------------------------------------------------------------------------------
_______________________________________________
WiX-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/wix-users
Reply | Threaded
Open this post in threaded view
|

Re: automatic selection perUser/perMachine installation

Nir Bar
This article gives the guideelines for authoring a dual-context package:
https://msdn.microsoft.com/en-us/library/dd408068(v=vs.85).aspx

The condition you should test is ALLUSERS="1" for per-machine installation.
Nir Bar
Freelance Developer
Mail: nir.bar@panel-sw.com
Web: www.panel-sw.com
- C++ On Windows, Linux and Embedded Platforms
- WiX & InstallShield
Reply | Threaded
Open this post in threaded view
|

Re: automatic selection perUser/perMachine installation

Phill Hogland
>>>I've even used a setup.exe and then a manifesto
If you are referring to a Burn bundle, a bundle is always 'per-machine' as I understand it.   But that does not preclude you from using the WiX toolset to produce a msi package which meets the guidelines to which Nir referenced.  (I have not done this but there are other posts in this forum of folks that have created dual scoped msi packages, so I would not assume that there is any limitation imposed by the WiX toolset.)