Why add this functionality to your program when Windows XP and Server 2003
ship net.exe which can start and stop services, and sc.exe, which can create
and delete services as well? Net.exe has been able to start and stop
services since Windows NT 4.0 at least, and sc.exe was previously part of
the Windows Resource Kit Tools.
If you want to start and stop services remotely, you can do so with the
psservice utility from Sysinternals
(http://www.microsoft.com/technet/sysinternals/utilities/psservice.mspx).
It's really not necessary to do it in your application.
If you're that bothered about repeating yourself, skip the application end.
Don't make use of a custom action - very hard to get right - over built-in
Windows Installer functionality.
--
Mike Dimmick
_____
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Gonzalo
Diethelm
Sent: 02 October 2007 17:24
To: Bob Arnson
Cc: Rob Mensching; wix-users@lists.sourceforge.net
Subject: Re: [WiX-users] [WiX-commits] Wix 2 and service
I guess that's arguable. I already had to provide all those details (service
name, startup information, etc.) in the EXE itself, in order to support the
/install, /remove, /start and /stop switches. Why would I want to repeat
that in the installer, instead of just calling the EXE?
Thanks and best regards.
On Tue, 2007-10-02 at 08:38 -0700, Bob Arnson wrote:
Gonzalo Diethelm wrote:
The only reason not to use ServiceInstall and ServiceControl is the DRY
principle (Don't Repeat Yourself).Since I MUST provide a way for users to
start/stop/install/delete the service from the console, I don't want to
replicate that mechanism anywhere else, hence the very simple actions in a
DLL that invoke these operations.
Both DRY and Occam's Razor include the term "unnecessarily." Correctly
handling service installation isn't "simple," so this is a case where
repeating the information has value.
--
sig://boB
http://joyofsetup.com/
--
Gonzalo Diethelm
[EMAIL PROTECTED]
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users