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!

clive_bor
Posts: 48
Joined: Thu Mar 09, 2006 8:32 am

Administrator privileges on Vista

Hi,

I created a new installation package for our application using the new version of AI 4.5.

The installer now gives this error
Error 1303. The installer has insufficient privileges to access this directory: C:\Program Files\Our App. The installation cannot continue. Log on as administrator or contact your system administrator.
when run on Windows Vista (works on XP).
The user logged on is an administrator.

The old installation package created using AI 4.2 works.

Kind Regards,
Clive
gigi
Posts: 2103
Joined: Tue Apr 11, 2006 9:55 am
Contact: Website

Hi Clive,

This behavior resides if your package is per-user only (the "Installation Type" option in the "Install Parameters" page). In this case make sure that you have privileges to write in that folder.

On Vista even administrators don't have the full power, a program that requires administrator privileges needs to be elevated before runs. This is done when Vista ask the user for elevation.

So if your package requires administrator privileges you need to change the "Installation Type" to per-machine. If you want your package per-user then make sure you have sufficient privileges to write in the installation folder.

Best Regards,
Gigi
______________
Gheorghe Rada
Advanced Installer Team
http://www.advancedinstaller.com
clive_bor
Posts: 48
Joined: Thu Mar 09, 2006 8:32 am

Hi,

I just tested this with a simple project.
I created 2 msi's, one created with AI version 4.2 and another with version 4.5.

Both were set to install per-user only.

Results:
-ver 4.2: it asks the user for elevated privileges and when allow is selected the install completes fine.
-ver 4.5: it fails with the "Error 1303" previously stated.

So the problem only seems to exist on the latest version (4.5).

Thanks for the help
Clive
gigi
Posts: 2103
Joined: Tue Apr 11, 2006 9:55 am
Contact: Website

Hi,

In per user-only installation is no need for elevation.
-ver 4.2: it asks the user for elevated privileges and when allow is selected the install completes fine.
The 4.2 version of Advanced Installer was not fully Vista compatible and the elevation dialog is not shown correctly because per-user is no need for elevation (all type of users can install the package).
-ver 4.5: it fails with the "Error 1303" previously stated.
This error resides because you don't have privileges to write in the destination directory (where the package will be installed). Select a directory where you have write privileges.

Best Regards,
Gigi
______________
Gheorghe Rada
Advanced Installer Team
http://www.advancedinstaller.com
clive_bor
Posts: 48
Joined: Thu Mar 09, 2006 8:32 am

Hi Gigi,

I really do not understand why an administrator cannot install a per-user only application in the "Program Files" directory in Vista.
The user I am using is an administrator and has write privileges for the program files directory, but I get the error previously mentioned.

According to this:
http://technet2.microsoft.com/WindowsVi ... x?mfr=true
Under Scenario 3 - "Change the elevation prompt behavior"; it can be configured to elevate without prompt etc.
This is currently set to "Prompt for consent".

What seems to be happening is that the prompt is not being triggered off by the installation.

The fact that an installation file built by AI 4.2 prompted for elevation and an installation file built by AI 4.5 does not, tells me that it was purposefully taken out for the Vista support, and I cannot understand the reasoning behind this.

Could you please explain.
Kind regards,
Clive
gigi
Posts: 2103
Joined: Tue Apr 11, 2006 9:55 am
Contact: Website

Hi Clive,

On per-user installation a flag is set in the summary information, that because in this case there is no need for elevation. On per-machine this flag is not set and in this case elevation is needed.
I really do not understand why an administrator cannot install a per-user only application in the "Program Files" directory in Vista.
The user I am using is an administrator and has write privileges for the program files directory, but I get the error previously mentioned.
This is more related to Vista behavior. But we shall investigate this issue.

As a workaround you can choose "Per-machine only" as installation type, build the package and open the msi with orca. In the "Property" table remove the "ALLUSERS" property. But in this case the elevation dialog will appear for a normal user (asking for the administrator password).

Kind Regards,
Gigi
______________
Gheorghe Rada
Advanced Installer Team
http://www.advancedinstaller.com
Jim Beveridge
Posts: 32
Joined: Wed May 10, 2006 10:54 pm

Hello Gigi,

I am also working on Logo certification. I have my installation type set to "Per machine if user is admin, per-user otherwise." My installation is pretty simple - a couple of files in "Application Folder", one file in "Application Shortcut" and one file under "Desktop".

When I run this installer as a Standard User, I expect it to run to completion without a privilege escalation. However, the install prompts me for an Administrator password to continue.

How can I fix this?
gigi
Posts: 2103
Joined: Tue Apr 11, 2006 9:55 am
Contact: Website

Hi,

This is Windows Vista behavior for more details please see:
http://msdn2.microsoft.com/en-us/library/aa367559.aspx

Best Regards,
Gigi
_______________
Gheorghe Rada
Advanced Installer Team
http://www.advancedinstaller.com
Jim Beveridge
Posts: 32
Joined: Wed May 10, 2006 10:54 pm

Thanks very much for the link. If I understand properly, it means that the setting "Per machine if user is admin, per-user otherwise" won't behave properly on Vista. So I have 3 questions:

1. Is there any difference on Vista between ALLUSERS=1 and ALLUSERS=2?

2. I tried to do a per-user install with the following command:

mysetup.exe ALLUSERS=

However, this didn't appear to work because I still got a privilege escalation prompt and the software was still installed to Program Files. Am I doing this wrong?

3. For Logo Certification, Test Case 13 (Verify application’s installer contains an embedded manifest ) requires that Bootstrappers that do not explicitly require elevation must have requestedExecutionLevel tag set to “asInvoker”. [The AI bootstrap EXE is set to highestAvailable.] This is discussed in more detail at:

http://blogs.msdn.com/windows_installer ... bcast.aspx

Why is AdvancedInstaller using highestAvailable?

Thank you.
gigi
Posts: 2103
Joined: Tue Apr 11, 2006 9:55 am
Contact: Website

Hi,

1. From our tests and Microsoft documentation it seams that under Windows Vista UAC there is no difference between ALLUSERS=1 and ALLUSERS=2. MSDN states:
If UAC is enabled and the correct Admin credentials are not provided, the installation fails with an error stating that administrator privileges are required. If UAC is disabled by the registry key, group policy, or the control panel, the UAC dialog box is not displayed and the installation fails with an error stating that administrator privileges are required.
2. To do a per-user installation just select the "Per-user only" option in the "Install Parameters" page. It does not work just to modify the ALLUSERS property because there is a flag in the "Summary Information" that needs to be set to 1 for per-user installation (no elevation is needed).

3. Under XP the bootstrapper runs as administrator and under Vista we set ExecutionLevel to highestAvailable for backwards compatibility. But beginning with 4.7 version of Advanced Installer scheduled for release at the end of this month the ExecutionLevel will be configurable. We still investigate what is the best default value to be set.

Best Regards,
Gigi
______________
Gheorghe Rada
Advanced Installer Team
http://www.advancedinstaller.com
Jim Beveridge
Posts: 32
Joined: Wed May 10, 2006 10:54 pm

Thank you for the helpful answer.

For #2, I'm aware that I can change it myself by rebuilding the installer, but that's not the intent. I will definitely have users who need to install per-user, so I need to be able to tell them how to do that, preferably without having to give them a completely different installer.

For #3, is it possible for me to get a prerelease of 4.7 as soon as ExecutionLevel fix is implemented? Logo certification is time-sensitive at the moment and the end of the month will be too late.

Thank you.
gigi
Posts: 2103
Joined: Tue Apr 11, 2006 9:55 am
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").
is it possible for me to get a prerelease of 4.7 as soon as ExecutionLevel fix is implemented?
ExecutionLevel tag set to “asInvoker” will be included in the 4.6.4 version of Advanced Installer which is scheduled for release this week.

Best Regards,
Gigi
______________
Gheorghe Rada
Advanced Installer Team
http://www.advancedinstaller.com

Return to “Common Problems”