phil999
Posts: 4
Joined: Thu Sep 04, 2008 11:36 am

Update as user

Hi Cosmin

As requested i will write this here so everyone can see and benefit

------------------

I have a msi which is setup to install as admin or user. My idea was that i could install this when the PC is deployed and then issues updates that the user could install.

In order to support this i made the install modifiable by everyone.

The application when installed would deploy desktop shortcuts to all users and install the files to the program folder. the update would just replace the files hense not need admin rights.

Is this possible? If so how? as i am getting access denied
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Update as user

Hi,

Please note that this is not supported by Windows Installer. If the original installation writes information in per-machine locations, it will require Administrator privileges. When the installed application is upgraded, this information needs to be removed or modified. Therefore, the upgrade process will require the same privileges as the original package (Administrator privileges).

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
phil999
Posts: 4
Joined: Thu Sep 04, 2008 11:36 am

Re: Update as user

OK so one way round this could be to have 2 packages? One msi which was installed by the admin and then that installs all the "all user settings etc" and files including the exe then a second package which would contain just the exe which all the shortcuts goto in apprdir and then patch this package?

Would that work?
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Update as user

Hi,

Since the original package is installed in a per-machine location, the update will need Administrator privileges in order to write into that location. Therefore, the second package would also require Administrator privileges.

You could try creating an UAC Patch, but I'm not sure if it will work.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
phil999
Posts: 4
Joined: Thu Sep 04, 2008 11:36 am

Re: Update as user

cosmin wrote:Hi,

Since the original package is installed in a per-machine location, the update will need Administrator privileges in order to write into that location. Therefore, the second package would also require Administrator privileges.

Regards,
Cosmin
If the programfiles\myapp\myapp.exe already had everyone modify rights (set by the orginal package) the second package could work no as it would be able to write to the location?

The way i see it is i would have all the shortcuts set by the main package as creating the cp icon / folder perms etc the second package would contain the files for the program files folder / updater so then that could be updated?
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Update as user

Hi,
If the programfiles\myapp\myapp.exe already had everyone modify rights (set by the orginal package) the second package could work no as it would be able to write to the location?
By using two packages you should be able to set the appropriate permissions for the folder of your application. However, this approach is not recommended because it allows any user to modify the installation files. Therefore, an user may corrupt the application data of another user.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”