Firewall-Disabler plug-in

From NSIS Wiki
(Redirected from Firewall Disabler)
Jump to navigationJump to search
Author: hardwired (talk, contrib)


Links

Plugin + C++ Source Code:

Firewall-disabler-1.0.zip (34 KB)

Warning

This plug-in will be detected by some anti-virus applications as a virus or a trojan.

Description

Version
1.0.0.1
Release
24.july.2005
Description
Nullsoft Installer (NSIS) plug-in for managing?! processes.
Copyright
© 2004-2005 Hardwired. No rights reserved.
There is no restriction for using this software...
...no guaranty either!
Author
Andrei Ciubotaru [Hardwired]
President of Inocentric SRL (http://www.inocentric.com/)
hardwired@inocentric.com
Project Manager ICode&Ideas SRL (http://www.icode.ro/)
hardwired@icode.ro

Introduction

Same story - I need it for the one of my installers.

Briefly: In my case I needed to tell the user that magic of Windows Firewall is present and with the users consent to get rid of it.

Support

Supported platforms are: >= WinXP SP2 (with the super built-in firewall:))

DLL Functions

Firewall-Disabler::QueryFirewall

Looks for firewall presence.

return:

1 - the firewall is enabled
0 - the firewall is disabled
Firewall-Disabler::EnableFirewall

Put the spell on the user - enable the Windows Firewall.

return:

1 - success (if you can call this action a success)
0 - failure (good for you!)
Firewall-Disabler::DisableFirewall

Does the best thing that can be done for the user... "And they shall be saved!":)

return:

1 - SUCCESS!!! YES!!!
0 - you cannot brake the spell... you are cursed!:))



Usage

First of all, does not matter where you use it. Ofcourse, the routines must be called inside of a Section/Function scope.

Firewall-Disabler::DisableFirewall

Pop $R0
StrCmp $R0 "1" curse
 
curse:
...
 
no_curse:
...
Firewall-Disabler::EnableFirewall
 
Pop $R0
StrCmp $R0 "1" hahaha muhaha
 
hahaha:
...
 
muhaha:
...
Firewall-Disabler::DisableFirewall

Pop $R0
StrCmp $R0 "1" ooohhh_yes noooo
 
ooohhh_yes:
...
 
noooo:
...


Thanks

Again: a lot of good thoughts and thanks and all the best to NULLSOFT who developed this great installer! NSIS RULEZ!!!

... and again: ME for being such a great coder... man, I love... ME:))))...

One more thing

If you use the plugin or it's source-code, I would apreciate if my name is mentioned... so, I could love me more!HAHAHAhaha...