[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Chris Ellis

9/19/2008 8:12:00 PM

Hi,

I'm creating a project in VS2008 along with a built-in setup project for
deployment. Is there any way to install an executable in such a way that it
will be granted admin (or elevated) privileges when it is run, even if the
currently logged in user does not have those privileges? It seems like
there must be a way to do something like that. What I am trying to
accomplish is an automatic updater that is able to write to the Program
Files directory. In Vista this requires administrative privileges, but I
would like to be able to make it so that the updater can run regardless of
the privileges of the logged in user. I am currently testing the
possibility of installing a service that would run with system privileges as
a means of doing this, but if there is a less convoluted means then I'd
greatly appreciate a pointer in the right direction.

Thanks in advance,
Chris


1 Answer

Phil Wilson

9/20/2008 6:32:00 PM

0

Keep in mind that what you're saying is basically that there must be a way
for a limited user to break security by writing to a restricted part of the
system. If you found that, it would be a security breach.

Also, this is not really a Vista issue. The Program Files folder is
restricted on XP as well, it's just that everyone and their dog runs with
Administrator privilege on XP. On Vista you're running limited even when
you're an administrator. If you expect your app to work on XP then you
already require that the user must be an Administrator. Therefore the
obvious solution is just to continue with that requirement and provide a
manifested program that requests elevation for the update, even if the rest
of the app doesn't actually require admin privilege.
--
Phil Wilson

"Chris Ellis" <praiseGod777.Drop.After.Dots@hotmail.com> wrote in message
news:%23hiVyPpGJHA.2408@TK2MSFTNGP04.phx.gbl...
> Hi,
>
> I'm creating a project in VS2008 along with a built-in setup project
> for deployment. Is there any way to install an executable in such a way
> that it will be granted admin (or elevated) privileges when it is run,
> even if the currently logged in user does not have those privileges? It
> seems like there must be a way to do something like that. What I am
> trying to accomplish is an automatic updater that is able to write to the
> Program Files directory. In Vista this requires administrative
> privileges, but I would like to be able to make it so that the updater can
> run regardless of the privileges of the logged in user. I am currently
> testing the possibility of installing a service that would run with system
> privileges as a means of doing this, but if there is a less convoluted
> means then I'd greatly appreciate a pointer in the right direction.
>
> Thanks in advance,
> Chris
>