Per user install on Vista when not admin - Advanced Installer Community

We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

wakerunner
Posts: 18
Joined: Mon Aug 13, 2007 9:55 pm

Per user install on Vista when not admin

I have a project setup with the setting "Per machine if user is admin, per user otherwise" and when I install it in Vista on a non-admin account it ends and says, "Cannot install per machine on non-admin account, logon as admin" (That isn't exactly what it says but something like that). But anyway the install fails unless you are on an admin account. Is that setting not working properly?
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Hi,

This is the normal behavior of Windows Vista.

When you create a package using "Per machine if user is administrator, per user otherwise", on Vista the installation is automatically set to "Per machine". If you run in an user account you are prompted to log in as an administrator by the UAC elevation platform.

Under Windows Vista, "Per machine if user is administrator, per user otherwise" is equivalent to "Per machine only".

Note that "Per user only (with administrator rights required)" will prompt to log in as an administrator, but will install per user, and "Per user only" will allow installation only where that user has write privileges, otherwise the installation will fail.

Regards,
cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
wakerunner
Posts: 18
Joined: Mon Aug 13, 2007 9:55 pm

In Vista is it possible to have the following option: If the setup is run by a non administrator it would be installed for that user only, if setup is run by administrator it is setup for all users? If so which choice would I pick in your list of choices?
wakerunner
Posts: 18
Joined: Mon Aug 13, 2007 9:55 pm

Is there any way of displaying an option to the user if they want it installed for that user only or for everybody? And if they choose everybody ask for admin approval?
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Hi,

Just to clarify, under Windows Vista ALLUSER=2 does not work, which means that you cannot create mixed packages ("Per-machine if user is administrator, per-user otherwise").

However, another option is to use the ALLUSERS option to let the user choose between "Per user only (with administrator rights required)" and "Per machine":
- in the "Dialogs" page, in the "FolderDlg" dialog you add a Radio Button Group which will contain two radio buttons:
  • - "Only for me" (in the "Properties" page, "Value" section, you set "Value=0" and "Selected=True")
    - "For Everyone" (in the "Properties" page, "Value" section, you set "Value=1" and "Selected=False")
- In the "Properties" page of the RadioButtonGroup you set the "Property Name" to RADIO_PROP (this property will be 0 if "Only for me" is selected and 1 if "For Everyone" is selected)
- you select the "Next" button and under the "Published Events" tab you add the following control events:

Code: Select all

[ALLUSERS]           1            RADIO_PROP = "1"
[ALLUSERS]        [DUMMY]         RADIO_PROP = "0"
The first control event sets a "Per machine" installation and the second one sets a "Per user only (with administrator rights required)" installation by using the non-existing property DUMMY which is empty by default.

Regards,
cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
wakerunner
Posts: 18
Joined: Mon Aug 13, 2007 9:55 pm

Ok so you need the Enterprise version to do that. That should be a dialog that is included with the professional version. Maybe in the future?
gigi
Posts: 2103
Joined: Tue Apr 11, 2006 9:55 am
Contact: Website

Hi,

We have added this on our TODO list. Thank you for your suggestion.

Regards,
Gigi
Gheorghe Rada
Advanced Installer Team
http://www.advancedinstaller.com/
wakerunner
Posts: 18
Joined: Mon Aug 13, 2007 9:55 pm

Thank you. I just wanted to add, I switched from Installshield Express because of its inability to register files correctly in Vista under all configs of the UAC. Advanced Installer handles registration in Vista perfectly. I also applaud you on your support, ISE's support is non-existant.

Keep up the good work, I will probably be upgrading to Enterprise soon anyway. Can you upgrade from Pro to Ent?
ktsun
Posts: 9
Joined: Sat Aug 11, 2007 3:37 am

Would you give more detail instruction on setting the event of Next button?

[ALLUSERS] 1 RADIO_PROP = "1"
[ALLUSERS] [DUMMY] RADIO_PROP = "0"

What control event I should use? AddLocal?
What argument I should use?
And how to set the condition? The UI is a bit confusing to me.

Thanks in advance!
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Hi,
wakerunner wrote:I will probably be upgrading to Enterprise soon anyway. Can you upgrade from Pro to Ent?
You can upgrade your current license here:
http://www.advancedinstaller.com/upgrade.html
ktsun wrote:Would you give more detail instruction on setting the event of Next button?
Please note that all of these operations are done in the "New Control Event" dialog. This pops up after you press the "New" button in the "Published Events" tab for the "Next" button (in the "Dialogs" page).

In order to create those events you use the SetProperty Control event. In the "New Control Event" dialog, after you select "SetProperty" it will automatically be replaced with [PropertyName] and you modify it to look like this: [ALLUSERS].

In the "Argument" field you write 1 for the first control event and [DUMMY] for the second one.

To set the condition, in the "Condition" field you press the "..." button and in the "Expression" field you replace 1 with RADIO_PROP = "1" (for the first example) and with RADIO_PROP = "0" (for the second example).

Regards,
cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
ktsun
Posts: 9
Joined: Sat Aug 11, 2007 3:37 am

I understand now. Thanks you very much :D

Return to “Common Problems”