Old 12th June 2015, 07:21   #41
TrifonovS
Senior Member
 
Join Date: Apr 2009
Location: Bulgaria
Posts: 192
Ok, but I always have problems with the parameter for the group. I switched the compiler to ANSI (just for test) and I still get error in any case except when I pass an empty string.
TrifonovS is offline   Reply With Quote
Old 9th October 2015, 15:05   #42
StephaneTr
Junior Member
 
Join Date: Sep 2015
Posts: 3
Hello,

I have a problem with this plugin. Under Win 7, I am able to add firewall rules for an application using AdvAddRule. However, it seems it crashes in the uninstall when using AdvRemoveRule to remove that rule.

The uninstaller will turn gray (such as when an application freezes) and a dialog will pop up stating that Au_.exe has crashed. Or something similar.

Here are the relevant code bits

At install:

Quote:
!define PROGRAM "My Program"
!define InboundRuleName "${PROGRAM} In"
...
Section -Post
...
; Add firewall rules depending on Windows version
SimpleFC::AdvAddRule "${InboundRuleName}" "" "256" "1" "1" "2147483647" "1" "$INSTDIR\Program.exe" "" "" "" "" "" "" ""
Pop $0
DetailPrint "Added firewall rule $\"${InboundRuleName}$\"."
SectionEnd
Quote:
...
Section Uninstall
...
; Remove firewall rules depending on Windows version
SimpleFC::AdvRemoveRule "${InboundRuleName}"
Pop $0
DetailPrint "Removed firewall rule $\"${InboundRuleName}$\""
SectionEnd
StephaneTr is offline   Reply With Quote
Old 9th October 2015, 16:04   #43
StephaneTr
Junior Member
 
Join Date: Sep 2015
Posts: 3
Ok I think I found the issue.

I had a function un.DeleteDirIfEmpty that was called just beforehand which seemed to interfere with the plugin.

Quote:
Function un.DeleteDirIfEmpty
FindFirst $R0 $R1 "$0\*.*"
strcmp $R1 "." 0 NoDelete
FindNext $R0 $R1
strcmp $R1 ".." 0 NoDelete
ClearErrors
FindNext $R0 $R1
IfErrors 0 NoDelete
FindClose $R0
Sleep 1000
RMDir "$0"
NoDelete:
FindClose $R0
FunctionEnd
Maybe because something was already in one of the registers, it caused the plugin function to fail?
StephaneTr is offline   Reply With Quote
Old 4th May 2021, 21:34   #44
Speed78
Senior Member
 
Join Date: Jul 2003
Location: Germany
Posts: 114
SimpleFC Unicode Version released!

Dear all,

I know this thread is really pretty old but I'm happy to can say that I'm released the unicode version of the SimpleFC-Plugin so that NSIS 3.x is fully supported now. This plugin version has the same functions like the ANSI version. The ANSI version is still supported. You can find both versions here: https://nsis.sourceforge.io/NSIS_Simple_Firewall_Plugin

Best regards

Rainer
Speed78 is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump