PDA

View Full Version : Windows Firewall



NewsArchive
12-03-2007, 03:00 AM
Will there be any ability to add a program that will be alowed to
communicate through Windows Firewall ?

Mike

NewsArchive
12-03-2007, 03:01 AM
Mike,

You been look'n inside my computer while I'm on the Internet? <g> Yes, one
of the next builds will have a built-in function to add and remove
applications to/from the Windows Firewall exception list. It's already
code-complete, but did not make it into a release yet.

Friedrich

--
Friedrich Linder
Lindersoft
www.lindersoft.com
+1.954.252.3910

"point. click. ship" - that's SetupBuilder 6.6
Create Windows Vista ready installations in minutes

-- Official Comodo Code Signing and SSL Certificate Partner

NewsArchive
12-03-2007, 03:01 AM
It was tough to break into your computer!

Great news!

Mike

NewsArchive
12-04-2007, 02:32 AM
Hi Friedrich,

This is what worked for us but was quite a long work around. look forward to
a simpler way. I don't know if this is vista friendly either.

Created a file called firewall.vbs

' SetupBuilder 5 Example

Dim InputVar
Dim OutputVar
'sample()

'Sub Sample()
Set objFirewall = CreateObject("HNetCfg.FwMgr")
Set objPolicy = objFirewall.LocalPolicy
Set objProfile = objPolicy.GetProfileByType(1)

Set objApplication = CreateObject("HNetCfg.FwAuthorizedApplication")
objApplication.Name = "MyApp 5.1"
objApplication.IPVersion = 2
Set fsoo = CreateObject("Scripting.FileSystemObject")
Set f = fsoo.Getfolder(".")
InputVar = f.Path & "\MyProg.exe"

'set arg = wscript.Arguments
'msgbox arg(0)
objApplication.ProcessImageFileName = InputVar
objApplication.RemoteAddresses = "*"
objApplication.Scope = 0
objApplication.Enabled = True

Set colApplications = objProfile.AuthorizedApplications
colApplications.Add(objApplication)
outputvar = "ok"
'msgbox InputVar
'End Sub

The problem I had was i had to call a DLL to change the folder before
calling vbscript and then call DLL again to change path

PROGRAM
MAP
CALLCHANGEPATH(*CSTRING),LONG,PASCAL
END
! -----------------------------------------------------------------------------
CODE

CALLCHANGEPATH FUNCTION(szText)
CODE
Setpath(clip(szText))
IF ERRORCODE() THEN
RETURN 1
ELSE
RETURN 0
END

In script Editor After
[Finalise Setup]


Call DLL
library:
%TMPDIR%\SBDLL.DLL

function:
CALLCHANGEPATH
Calling Convention:
_Stdcall
Parameter Types:
*CSTRING
Function Parameters:
%_SB_INSTALLDIR%


include General installer function Run Vbscript (.vbs)

Enter the following values

VbScript Name:
%TMPDIR%\FIREWALL.VBS
Input Value:
[INSTALLDIR]
VBscript Input Variable Name:
InputVar
VBscript Output Variable Name:
OutputVar
Execute Statment:
Sample()
output Variable:
%RESULT%


Call DLL
library:
%TMPDIR%\SBDLL.DLL

function:
CALLCHANGEPATH
Calling Convention:
_Stdcall
Parameter Types:
*CSTRING
Function Parameters:
%CURDIR%

Regards
Albert Mitchell

NewsArchive
12-04-2007, 02:33 AM
Hi Albert,

Thank you (looks great, btw). We have developed a non-VBS function to
handle this (one line in the script). It's already code and feature
complete and will be introduced in one of the next builds.

SetupBuilder 6.7 will be available very soon and I think this will be the
last 6.x version. SetupBuilder 7 is around the corner - we'll make an
announcement later this week.

Thanks again,
Friedrich

--
Friedrich Linder
Lindersoft
www.lindersoft.com
+1.954.252.3910

"point. click. ship" - that's SetupBuilder 6.6
Create Windows Vista ready installations in minutes

-- Official Comodo Code Signing and SSL Certificate Partner