Automate Install for Restricted Users (non-ClickOnce)

joe_pool_is

Contributor
Joined
Jan 18, 2004
Messages
507
Location
Longview, TX [USA]
I posted this question a couple of days ago on http://social.msdn.microsoft.com, but I didn't get any responses. Maybe someone here has an idea.

Here is the situation:

In our company's internally controlled application, we check at startup to see if a newer version is available. We do NOT use and we do not want to use ClickOnce (it is problematic with terminal servers and our IT department does not like the way it installs Windows Forms, etc. - basically, we just avoid it).

Anyway, once an update is found, how can I install it under a limited user account (aside from turning to ClickOnce)?

The basic command currently does this:

Code:
public void InstallUpdate()
{
  if (_update != null) // FileInfo _update declared global to this class
  {
    Process installer = Process.Start(_update.FileName);
    if (installer != null)
    {
      Application.Exit();
    }
  }
}

The version above works for Administrators and Power Users, but a Restricted User receives the following message box:

MessageBox.Show("The system administrator has set policies to prevent this installation.", "Windows Installer", MessageBoxButtons.OK, MessageBoxIcon.Error)

(Programming style)

Thanks,
~Joe Pool
 
Back
Top