I'm trying to wrap over an exe and add firewall exceptions. The installer runs, but nothing happens. Where do I look to find out what's going wrong?
I am following the instructions at http://www.advancedinstaller.com/user-g ... r-exe.html and have gone over them several times. I can't see what I might be doing wrong.
My vbs is:
Function Wrapper()
dim x86, x64
dim version64,version86
'Based on these properties we will make the installer selection.
version64 = Session.Property("VersionNT64")
version86 = Session.Property ("VersionNT")
'This is the property of the 1st temporary
'installer file added to the project.
x86 = Session.Property("AI_HICAPSCONNECT_1_0_2_96.EXE")
'This is the property of the 1st temporary
'installer file added to the project.
x64 = Session.Property("AI_HICAPSCONNECT_1_0_2_96.EXE")
set WshShell = CreateObject("WScript.Shell")
'If the machine uses Windows 64bits
If version64 <> "" then
WshShell.Run x64,1,false
'If the machine uses Windows 32bits
Else If version86 <> "" then
WshShell.Run x86,1,false
End If
End If
OpenExe("HICAPS Connect Client", "HicapsConnectClient.exe")
OpenExe("HICAPS Connect Service", "HicapsConnectService.exe")
OpenPort(11000)
OpenPort(11001)
End Function
Function OpenExe(name, fn)
'get the path to HICAPS dir
Set wshShell = CreateObject("WScript.Shell")
sPath = wshShell.ExpandEnvironmentStrings("%PROGRAMFILES(x86)%")
if sPath = "%PROGRAMFILES(x86)%" then sPath = wshShell.ExpandEnvironmentStrings("%PROGRAMFILES%")
sPath = sPath & "\HICAPSConnect\"
Set objFirewall = CreateObject("HNetCfg.FwMgr")
Set objPolicy = objFirewall.LocalPolicy
Set objProfile = objPolicy.GetProfileByType(1)
Set objApplication = CreateObject("HNetCfg.FwAuthorizedApplication")
objApplication.Name = name
objApplication.IPVersion = 2
objApplication.ProcessImageFileName = sPath & fn
objApplication.RemoteAddresses = "*"
objApplication.Scope = 0
objApplication.Enabled = True
Set colApplications = objProfile.AuthorizedApplications
colApplications.Add(objApplication)
End Function
Function OpenPort(pn)
Set objFirewall = CreateObject("HNetCfg.FwMgr")
Set objPolicy = objFirewall.LocalPolicy.CurrentProfile
Set objPort = CreateObject("HNetCfg.FwOpenPort")
objPort.Port = pn
objPort.Name = "HICAPS Port " & pn
objPort.Enabled = TRUE
Set colPorts = objPolicy.GloballyOpenPorts
errReturn = colPorts.Add(objPort)
End Function
FOLLOW US
Get the latest news in Application Packaging