Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

How to use script to manually select ISA server by firewall client

Posted on 2009-04-05
3
Medium Priority
?
832 Views
Last Modified: 2012-05-06
We had a Microsoft ISA 2006 server. After install firewall client by login script, we want to use script to change firewall client  to manually select ISA server.
How can i do this?
Many thanks.
0
Comment
Question by:dickchan
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 15

Expert Comment

by:Raj-GT
ID: 24075341
The Firewall Client stores the configuration information on an .ini file under C:\Documents and Settings\username\Application Data\Microsoft\Firewall Client 2004.

You can use scripting or group policy preferences to edit common.ini file. The values are quite self explanatory...

ServerName -
Disbaled - Disables Firewall Client
Autodetection - 1 to enable and 0 to disable.

Hope this helps.
0
 

Author Comment

by:dickchan
ID: 24094258
Do you mind show me some example about how script to change ini file content?
I am a newbie. Many thanks.
0
 
LVL 15

Accepted Solution

by:
Raj-GT earned 2000 total points
ID: 24095440
You can use the attached script, which was from here - http://blogs.technet.com/pfe-ireland/archive/2008/05/08/scripting-how-to-edit-an-ini-file-from-a-script.aspx

Save the script as modini.vbs and call it from your log-on batch file like this

cscript //nologo modini.vbs "%appdata%\Microsoft\Firewall Client 2004\common.ini" "Autodetection" "0"
cscript //nologo modini.vbs "%appdata%\Microsoft\Firewall Client 2004\common.ini" "ServerName" "ISASERVERNAME"
cscript //nologo modini.vbs "%appdata%\Microsoft\Firewall Client 2004\common.ini" "TrayIconVisualState" "0"

The last line will hide the Firewall Client icon from the taskbar.

Hope this helps.
'Example: modini.vbs c:\folder\my.ini "Parameter" "new value"
 
Const ForReading = 1
Const ForWriting = 2
 
strINIFile = WScript.Arguments.Item(0)
strParam = WScript.Arguments.Item(1)
strValue = WScript.Arguments.Item(2)
 
If WScript.Arguments.Count <> 3 Then WScript.Quit
 
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objTextFile = objFSO.OpenTextFile(strINIFile, ForReading)
 
Do Until objTextFile.AtEndOfStream
    strNextLine = objTextFile.Readline
 
    intLineFinder = InStr(strNextLine, strParam)
    If intLineFinder <> 0 Then
        strNextLine = strParam & "=" & strValue
    End If
 
    strNewFile = strNewFile & strNextLine & vbCrLf
Loop
 
objTextFile.Close
 
Set objTextFile = objFSO.OpenTextFile(strINIFile, ForWriting)
 
objTextFile.WriteLine strNewFile
objTextFile.Close

Open in new window

0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In all versions of ISA Server and the current version of FTMG, the default https protocol uses TCP port 443 and 563 only. This cannot be changed within the ISA or FTMG GUI and must be completed from a Windows cmd prompt on the ISA Server itself. …
Microsoft's ISA Server has been its pre-eminent security product for about a decade and is still regarded amongst the well-informed as one of the best software firewalls and application gateways ever released, by any manufacturer. ISA Server has bee…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses

618 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question