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

Reply via email to