Connecting Tech Pros Worldwide Forums | Help | Site Map

part of setup exe runs under system account

Prashant
Guest
 
Posts: n/a
#1: Nov 18 '05
Hi,
I have a setupt program that calls an exe as custom action, problem is this
exe gets executed under system account, while setup runs under olgged in
user account, that prevents exe to make sql connections, as it is using
windows authentication.
If i run that exe separately it runs under logged in user account.

does anyone have any idea what to do next?

Thanks in advance,
Prashant



Girish bharadwaj
Guest
 
Posts: n/a
#2: Nov 18 '05

re: part of setup exe runs under system account


I think You can do, OpenProcessToken() and use the returned TokenHandle in
ImpersonateLoggedOnUser().

Or Check out http://www.thecodeproject.com/csharp/RunAs.asp


--
Girish Bharadwaj
http://msmvps.com/gbvb
"Prashant" <barnwal_p@hotmail.com> wrote in message
news:%23jD7LQ0uEHA.1448@TK2MSFTNGP10.phx.gbl...[color=blue]
> Hi,
> I have a setupt program that calls an exe as custom action, problem is
> this
> exe gets executed under system account, while setup runs under olgged in
> user account, that prevents exe to make sql connections, as it is using
> windows authentication.
> If i run that exe separately it runs under logged in user account.
>
> does anyone have any idea what to do next?
>
> Thanks in advance,
> Prashant
>
>[/color]


Prashant
Guest
 
Posts: n/a
#3: Nov 18 '05

re: part of setup exe runs under system account


has been great help.
thanks a lot.

Prashant

"Girish bharadwaj" <girishb@mvps.org> wrote in message
news:eaHZwm0uEHA.3948@TK2MSFTNGP15.phx.gbl...[color=blue]
> I think You can do, OpenProcessToken() and use the returned TokenHandle in
> ImpersonateLoggedOnUser().
>
> Or Check out http://www.thecodeproject.com/csharp/RunAs.asp
>
>
> --
> Girish Bharadwaj
> http://msmvps.com/gbvb
> "Prashant" <barnwal_p@hotmail.com> wrote in message
> news:%23jD7LQ0uEHA.1448@TK2MSFTNGP10.phx.gbl...[color=green]
> > Hi,
> > I have a setupt program that calls an exe as custom action, problem is
> > this
> > exe gets executed under system account, while setup runs under olgged in
> > user account, that prevents exe to make sql connections, as it is using
> > windows authentication.
> > If i run that exe separately it runs under logged in user account.
> >
> > does anyone have any idea what to do next?
> >
> > Thanks in advance,
> > Prashant
> >
> >[/color]
>
>[/color]


Closed Thread