Do I need to specificily set impersonation for a custom action (on non vista machines)?

  • Thread starter Thread starter DAXU
  • Start date Start date
D

DAXU

Hello,

I have a msi package with some custom actions in it.

In my test, I find out that occasionally the custom action was running
under system context, instead of the user context. I can't really
reproduce this problem as it happens now and then.

So my question is that is there a impersonation bit I need to set for
custom actions? I closet one I found is
msidbCustomActionTypeNoImpersonate. Currently I didn't set this bit,
which I think it means that windows installer will impersonate this
custom action.

Many thanks

Jerry
 
Setting that bit (....NoImpersonate) means that MSI will not impersonate and
so will run in the system context. Without that bit set, the custom actions
impersonates the installing user. On Vista, this can mean impersonated but
running as limited, depending on how the MSI was launched.
 
Thanks

I checked my msi package and definitely I did not set it.
But how comes that I saw the installation ruuning under system context
for one or twice?
In most cases, it is impersonating the user.

Is there some secuirty settings for the computer I should check? The
machine is just a windows 2003 server , not a vista machine by the
way.

Many Thanks
Jerry


Setting that bit (....NoImpersonate) means that MSI will not impersonate and
so will run in the system context. Without that bit set, the custom actions
impersonates the installing user. On Vista, this can mean impersonated but
running as limited, depending on how the MSI was launched.
--
Phil Wilson
[MVP Windows Installer]


I have a msi package with some custom actions in it.
In my test, I find out that occasionally the custom action was running
under system context, instead of the user context. I can't really
reproduce this problem as it happens now and then.
So my question is that is there a impersonation bit I need to set for
custom actions? I closet one I found is
msidbCustomActionTypeNoImpersonate. Currently I didn't set this bit,
which I think it means that windows installer will impersonate this
custom action.
Many thanks
 
I'm not sure what you're saking when you say "saw the installation running
under system, context". The installation runs in user context in the UI
sequence, then switches to system context (the service) for the system
changes. Whether custom action code runs as user or system depends on the
impersonation bit settings.
--
Phil Wilson
[MVP Windows Installer]

Thanks

I checked my msi package and definitely I did not set it.
But how comes that I saw the installation ruuning under system context
for one or twice?
In most cases, it is impersonating the user.

Is there some secuirty settings for the computer I should check? The
machine is just a windows 2003 server , not a vista machine by the
way.

Many Thanks
Jerry


Setting that bit (....NoImpersonate) means that MSI will not impersonate
and
so will run in the system context. Without that bit set, the custom
actions
impersonates the installing user. On Vista, this can mean impersonated
but
running as limited, depending on how the MSI was launched.
--
Phil Wilson
[MVP Windows Installer]


I have a msi package with some custom actions in it.
In my test, I find out that occasionally the custom action was running
under system context, instead of the user context. I can't really
reproduce this problem as it happens now and then.
So my question is that is there a impersonation bit I need to set for
custom actions? I closet one I found is
msidbCustomActionTypeNoImpersonate. Currently I didn't set this bit,
which I think it means that windows installer will impersonate this
custom action.
Many thanks
 
In my custom action, I have some code to display the current user to a
textbox. In most cases, it displays "administrator", which is the user
who running it.
But in one or two test runs, it shows "SYSTEM".

So I saw the installation running under system context for the custom
action.


I'm not sure what you're saking when you say "saw the installation running
under system, context". The installation runs in user context in the UI
sequence, then switches to system context (the service) for the system
changes. Whether custom action code runs as user or system depends on the
impersonation bit settings.
--
Phil Wilson
[MVP Windows Installer]


I checked my msi package and definitely I did not set it.
But how comes that I saw the installation ruuning under system context
for one or twice?
In most cases, it is impersonating the user.
Is there some secuirty settings for the computer I should check? The
machine is just a windows 2003 server , not a vista machine by the
way.
Many Thanks
Jerry
Setting that bit (....NoImpersonate) means that MSI will not impersonate
and
so will run in the system context. Without that bit set, the custom
actions
impersonates the installing user. On Vista, this can mean impersonated
but
running as limited, depending on how the MSI was launched.
--
Phil Wilson
[MVP Windows Installer]

Hello,
I have a msi package with some custom actions in it.
In my test, I find out that occasionally the custom action was running
under system context, instead of the user context. I can't really
reproduce this problem as it happens now and then.
So my question is that is there a impersonation bit I need to set for
custom actions? I closet one I found is
msidbCustomActionTypeNoImpersonate. Currently I didn't set this bit,
which I think it means that windows installer will impersonate this
custom action.
Many thanks
Jerry
 
It depends on things like the custom action type, the impersonation bits
(there's also a terminal services setting), whether the CA is in the UI
sequence, and also where it is in the Execute sequence.
--
Phil Wilson
[MVP Windows Installer]

In my custom action, I have some code to display the current user to a
textbox. In most cases, it displays "administrator", which is the user
who running it.
But in one or two test runs, it shows "SYSTEM".

So I saw the installation running under system context for the custom
action.


I'm not sure what you're saking when you say "saw the installation
running
under system, context". The installation runs in user context in the UI
sequence, then switches to system context (the service) for the system
changes. Whether custom action code runs as user or system depends on the
impersonation bit settings.
--
Phil Wilson
[MVP Windows Installer]


I checked my msi package and definitely I did not set it.
But how comes that I saw the installation ruuning under system context
for one or twice?
In most cases, it is impersonating the user.
Is there some secuirty settings for the computer I should check? The
machine is just a windows 2003 server , not a vista machine by the
way.
Many Thanks
Jerry
On 10 Jul, 23:46, "Phil Wilson" <[email protected]>
wrote:
Setting that bit (....NoImpersonate) means that MSI will not
impersonate
and
so will run in the system context. Without that bit set, the custom
actions
impersonates the installing user. On Vista, this can mean impersonated
but
running as limited, depending on how the MSI was launched.
I have a msi package with some custom actions in it.
In my test, I find out that occasionally the custom action was
running
under system context, instead of the user context. I can't really
reproduce this problem as it happens now and then.
So my question is that is there a impersonation bit I need to set
for
custom actions? I closet one I found is
msidbCustomActionTypeNoImpersonate. Currently I didn't set this bit,
which I think it means that windows installer will impersonate this
custom action.
Many thanks
 
It depends on things like the custom action type, the impersonation bits
(there's also a terminal services setting), whether the CA is in the UI
sequence, and also where it is in the Execute sequence.
--
Phil Wilson
[MVP Windows Installer]




In my custom action, I have some code to display the current user to a
textbox. In most cases, it displays "administrator", which is the user
who running it.
But in one or two test runs, it shows "SYSTEM".
So I saw the installation running under system context for the custom
action.
I'm not sure what you're saking when you say "saw the installation
running
under system, context". The installation runs in user context in the UI
sequence, then switches to system context (the service) for the system
changes. Whether custom action code runs as user or system depends on the
impersonation bit settings.
--
Phil Wilson
[MVP Windows Installer]

Thanks
I checked my msi package and definitely I did not set it.
But how comes that I saw the installation ruuning under system context
for one or twice?
In most cases, it is impersonating the user.
Is there some secuirty settings for the computer I should check? The
machine is just a windows 2003 server , not a vista machine by the
way.
Many Thanks
Jerry
On 10 Jul, 23:46, "Phil Wilson" <[email protected]>
wrote:
Setting that bit (....NoImpersonate) means that MSI will not
impersonate
and
so will run in the system context. Without that bit set, the custom
actions
impersonates the installing user. On Vista, this can mean impersonated
but
running as limited, depending on how the MSI was launched.
--
Phil Wilson
[MVP Windows Installer]

Hello,
I have a msi package with some custom actions in it.
In my test, I find out that occasionally the custom action was
running
under system context, instead of the user context. I can't really
reproduce this problem as it happens now and then.
So my question is that is there a impersonation bit I need to set
for
custom actions? I closet one I found is
msidbCustomActionTypeNoImpersonate. Currently I didn't set this bit,
which I think it means that windows installer will impersonate this
custom action.
Many thanks
Jerry

Hi,
It is not a terminal service setting and I am aware the changes I need
to do if terminal service needs to be supported.
Would you mind to explain a bit deail on "whether the CA is in the UI
sequence, and also where it is in the Execute sequence"?

Many Thanks
 
Basically a CA can only run in the system context if it is deferred and
between InstallInitialize and InstallFinalize. So CAs in other places run
with the user context, but between InstallInitialize and InstallFinalize
they can optionally be deferred and marked to run in the system context.
--
Phil Wilson
[MVP Windows Installer]

It depends on things like the custom action type, the impersonation bits
(there's also a terminal services setting), whether the CA is in the UI
sequence, and also where it is in the Execute sequence.
--
Phil Wilson
[MVP Windows Installer]




In my custom action, I have some code to display the current user to a
textbox. In most cases, it displays "administrator", which is the user
who running it.
But in one or two test runs, it shows "SYSTEM".
So I saw the installation running under system context for the custom
action.
On 11 Jul, 18:07, "Phil Wilson" <[email protected]>
wrote:
I'm not sure what you're saking when you say "saw the installation
running
under system, context". The installation runs in user context in the
UI
sequence, then switches to system context (the service) for the system
changes. Whether custom action code runs as user or system depends on
the
impersonation bit settings.
I checked my msi package and definitely I did not set it.
But how comes that I saw the installation ruuning under system
context
for one or twice?
In most cases, it is impersonating the user.
Is there some secuirty settings for the computer I should check? The
machine is just a windows 2003 server , not a vista machine by the
way.
Many Thanks
Jerry
On 10 Jul, 23:46, "Phil Wilson"
<[email protected]>
wrote:
Setting that bit (....NoImpersonate) means that MSI will not
impersonate
and
so will run in the system context. Without that bit set, the custom
actions
impersonates the installing user. On Vista, this can mean
impersonated
but
running as limited, depending on how the MSI was launched.
I have a msi package with some custom actions in it.
In my test, I find out that occasionally the custom action was
running
under system context, instead of the user context. I can't really
reproduce this problem as it happens now and then.
So my question is that is there a impersonation bit I need to set
for
custom actions? I closet one I found is
msidbCustomActionTypeNoImpersonate. Currently I didn't set this
bit,
which I think it means that windows installer will impersonate
this
custom action.
Many thanks

Hi,
It is not a terminal service setting and I am aware the changes I need
to do if terminal service needs to be supported.
Would you mind to explain a bit deail on "whether the CA is in the UI
sequence, and also where it is in the Execute sequence"?

Many Thanks
 
Back
Top