I run my custom action to register namespaces as immediate. Works with no 
problem. Does your Package element has InstallPrivileges="elevated"?


-----Original Message-----
From: Marcus Gelderie [mailto:t-mge...@microsoft.com] 
Sent: Friday, March 27, 2009 11:45
To: General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] http namespace reservation in WIX

Well, deferred doesn't work either. Unfortunately I don't get any details on 
the exception that arises (I tried bringing up a message box with that 
information, without success). Windows logs won't show me anything other than 
"installation failed" either.


A colleague just told me he had similar problems when working with certificates 
within a custom action. Same pattern: code needs admin privileges, works fine 
when run in an elevated console app but won't work in a custom action.

Does WIX lower the privileges again at some point? Does it maybe use a subset 
of permissions of those, that would normally come with admin privileges?

Cheers


Marcus

-----Original Message-----
From: Brian Rogers [mailto:rogers.br...@gmail.com]
Sent: Freitag, 27. März 2009 17:11
To: General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] http namespace reservation in WIX

Hey Marcus,

Intuition is not a strong suite when working with Windows Installer <grin/>
Deferred is run under the System context and is elevated. Immediate custom
actions are generally used for setting values in the current MSI context and
passing values to the deferred context and scheduling deferred actions.

Hope that helps,

Brian Rogers
"Intelligence removes complexity." - Me
http://icumove.spaces.live.com


On Fri, Mar 27, 2009 at 7:39 AM, Marcus Gelderie <t-mge...@microsoft.com>wrote:

> It runs as immediate. I will try as deferred, though I would intuitively
> think that if it doesn't have the privileges running immediate, it won't
> haven them running deferred.
>
> Thanks
>
> Marcus
>
> -----Original Message-----
> From: Brian Rogers [mailto:rogers.br...@gmail.com]
> Sent: Donnerstag, 26. März 2009 16:34
> To: General discussion for Windows Installer XML toolset.
> Subject: Re: [WiX-users] http namespace reservation in WIX
>
> Hey Marcus,
>
> Is your custom action running as immediate or deferred?
>
> Thanks,
>
> Brian Rogers
> "Intelligence removes complexity." - Me
> http://icumove.spaces.live.com
>
>
> On Thu, Mar 26, 2009 at 2:16 AM, Marcus Gelderie <t-mge...@microsoft.com
> >wrote:
>
> > Hey all,
> >
> > I am trying to install a WCF web service as a windows service using WIX.
> > For obvious reasons I don't want that service to run under admin
> privileges
> > (since it won't need them) but under the Network Service account.
> >
> > As of XP SP2 (afaik) the http namespace (e.g. http://+:80/Foo/) that any
> > such service wants to use must be registered, giving the appropriate
> account
> > the right to use it. So far so good. Now there are three ways that I know
> of
> > to make such reservations:
> >
> >
> > 1)      Using httpcfg.exe
> >
> > 2)      Using netsh.exe (under Vista)
> >
> > 3)      Using some native library to make the changes
> >
> > The first two possibilities are somewhat dissatisfying: Under Vista
> > httpcfg.exe does not exists per default (and is really unnecessary) and
> > under XP netsh cannot be used to make the reservation (
> > http://msdn.microsoft.com/en-us/library/ms733768.aspx). I would like not
> > to have any dependency on the OS version or the availability of certain
> > extensions (I take it from the referenced msdn article that under XP
> > httpcfg.exe is only installed as a part of certain optional SP2
> extensions).
> > Hence I went for option 3. I found a managed wrapper API on the net that
> can
> > be used to make the changes. Using that I wrote up a piece of code that
> > registers an arbitrary namespace for the NetworkService account. If I run
> > that code under admin privileges (i.e. in a simple console app) it works
> > just fine. If I run it in a custom action (which I thought had admin
> > privileges) I get an exception saying "access denied".
> >
> > Now I wonder whether there is a better way to go about this. I'm pretty
> > sure that I'm not the only one who ran into this problem. Alternatively I
> > would like to know whether there is a good way of getting the custom
> action
> > to obtain sufficient privileges to make the adjustment.
> >
> > Thanks in advance for your comments
> >
> >
> > Marcus
> >
> >
> ------------------------------------------------------------------------------
> > _______________________________________________
> > WiX-users mailing list
> > WiX-users@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/wix-users
> >
>
> ------------------------------------------------------------------------------
> _______________________________________________
> WiX-users mailing list
> WiX-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wix-users
>
>
>
> ------------------------------------------------------------------------------
> _______________________________________________
> WiX-users mailing list
> WiX-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wix-users
>
------------------------------------------------------------------------------
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


------------------------------------------------------------------------------
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

------------------------------------------------------------------------------
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to