Short answer is, "No."
Medium answer is "Just launching netsh would not be sufficient to correctly
install, uninstall, rollback, repair and patch Firewall exceptions."
Why? Well there are a number of issues to think about:
What happens if the user hits cancel (or something actually fails in your
install?) after your netsh.exe CustomAction executed? How do you rollback, and
you want to rollback to the previous exception if there was one. There is
rollback on Uninstall too (to put it back the way it was). And during
uninstall, how do you handle the case that two different products may install
the same firewall exception?
Lots of tricky problems to solve in there. I encourage you to take a look at
the WiX CustomActions sometime. I'm actually working on some bugs in there
where rollback does the wrong thing. Check out the oldest open WiX v2 bugs.
CustomActions that modify machine state are non-trivial programming exercises.
Please, be aware of that before you write one... and if you do write one
consider offering it back to the community so nobody else has to go through the
trouble again. That's how the IIS, SQL, User, Certificate, FileShare,
PerformanceCounter, MSMQ, COM+ stuff all came to be.
From: Levi Wilson [mailto:[EMAIL PROTECTED]
Sent: Tuesday, January 16, 2007 10:43 AM
To: Rob Mensching
Cc: David Thielen; wix-users@lists.sourceforge.net
Subject: Re: [WiX-users] Set firewall exception
Couldn't you just do a ShellExecute() on "netsh.exe" with the command line of
something like "firewall add allowedprogram \"c:\\myprogram.exe\" ENABLE" as
the parameter? Then you can have another one ("netsh firewall delete etc.")
that removes it upon uninstall. Wouldn't that work?
On 1/16/07, Rob Mensching <[EMAIL PROTECTED]<mailto:[EMAIL PROTECTED]>> wrote:
How would you the "netsh firewall" command back? Also, what if two installs
both install the same firewall exception? How would you reference count the
firewall exception?
Writing CustomActions that modify machine state is rarely an easy task.
Transactions (even compensating transactions) are hard things to get right.
From: [EMAIL PROTECTED]<mailto:[EMAIL PROTECTED]> [mailto:[EMAIL
PROTECTED]<mailto:[EMAIL PROTECTED]>] On Behalf Of Levi Wilson
Sent: Tuesday, January 16, 2007 10:33 AM
To: David Thielen
Cc: wix-users@lists.sourceforge.net<mailto:wix-users@lists.sourceforge.net>
Subject: Re: [WiX-users] Set firewall exception
It probably wouldn't be hard to do a Custom Action to do such a thing. You
could do a "netsh firewall" command to do it.
On 1/16/07, David Thielen <[EMAIL PROTECTED]<mailto:[EMAIL PROTECTED]>> wrote:
Hi;
Is there a WIX command to set an exception in the Windows firewall? If so, what
is it? And can it be set for a program we are not installing (winword.exe)?
Thanks - dave
David Thielen
www.windwardreports.com<http://www.windwardreports.com>
303-499-2544 x1185
Cubicle Wars - http://www.windwardreports.com/film.htm
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net<mailto:WiX-users@lists.sourceforge.net>
https://lists.sourceforge.net/lists/listinfo/wix-users
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users