RE: If you went to Webcast week...

  • From: "josephk" <josephk@xxxxxxxxx>
  • To: "[ISAserver.org Discussion List]" <isalist@xxxxxxxxxxxxx>
  • Date: Thu, 27 Jan 2005 13:00:06 -0800

Yes there are variable names and naming standards that eve should apply
to script.
o or obj = Objects, s or str = strings, i or n = Integers etc
Arr = Arrays
Then FSA would become oFSA or objFSA
WshShell would become oWshShell or objWshShell
ISAArray would become arrISA
The thing to not is that vbscript does not use strongly typed names
i.e. dim somename is still just a variable name and prefixing a data
type is more for script readability.

Thank you,

Joseph

-----Original Message-----
From: Jim Harrison [mailto:Jim@xxxxxxxxxxxx] 
Sent: Thursday, January 27, 2005 6:35 AM
To: [ISAserver.org Discussion List]
Subject: [isalist] RE: If you went to Webcast week...

http://www.ISAserver.org

Actually, that one should break.
You should avoid using the word "array" as a variable name, since it's a
keyword in script.
Sometimes it works, sometimes it doesn't; VBScript is flaky like that.
I generally use ISAArray to avoid those entanglements...

This script accomplishes the same task - what's the difference?

Dim FilePath : FilePath = Wscript.Arguments( 0 )
Dim ISA : Set ISA = CreateObject( "FPC.Root" )
Dim WshShell : Set WshShell = CreateObject( "Wscript.Shell" )
Dim ISAArray : Set ISAArray = ISA.GetContainingArray
ISAArray.ExportToFile( FilePath & "\" &
WshShell.ExpandEnvironmentStrings( "%ComputerName%" ) & "-" & Month
(Now) & "-" & Day (Now) & "-" Year (Now) & ".xml"

:-)

-----Original Message-----
From: Thomas W Shinder [mailto:tshinder@xxxxxxxxxxx] 
Sent: Wednesday, January 26, 2005 8:39 PM
To: [ISAserver.org Discussion List]
Subject: [isalist] If you went to Webcast week...

http://www.ISAserver.org

If you went to Webcast week, then you'll know what this does:

=====================
Dim fileName
Dim WSHNetwork
Dim shareName: shareName = WScript.Arguments (0)
Dim xmldom : set xmldom = CreateObject ("Msxm12.DOMDocument")
Dim fpc : set fpc = WScript.CreateObject ("Fpc.Root")
Dim array : set array = fpc.GetContainingArray

set WSHNetwork = CreateObject ("WScript.Network")
fileName=shareName & "\" & WSHNetwork.ComputerName & "-" & Month (Now)
        & "-" & Day (Now) & "-" Year (Now) & ".xml"

array.Export xmldom, 0
xmldom.save (fileName)
===========================

Cool!
 
 
Tom
www.isaserver.org/shinder <http://www.isaserver.org/shinder> 
Tom and Deb Shinder's Configuring ISA Server 2004
http://tinyurl.com/3xqb7 <http://tinyurl.com/3xqb7> 
MVP -- ISA Firewalls



------------------------------------------------------
List Archives: http://www.webelists.com/cgi/lyris.pl?enter=isalist
ISA Server Newsletter: http://www.isaserver.org/pages/newsletter.asp
ISA Server FAQ: http://www.isaserver.org/pages/larticle.asp?type=FAQ
------------------------------------------------------
Other Internet Software Marketing Sites:
World of Windows Networking: http://www.windowsnetworking.com
Leading Network Software Directory: http://www.serverfiles.com
No.1 Exchange Server Resource Site: http://www.msexchange.org
Windows Security Resource Site: http://www.windowsecurity.com/
Network Security Library: http://www.secinf.net/
Windows 2000/NT Fax Solutions: http://www.ntfaxfaq.com
------------------------------------------------------
You are currently subscribed to this ISAserver.org Discussion List as:
jim@xxxxxxxxxxxx
To unsubscribe visit http://www.webelists.com/cgi/lyris.pl?enter=isalist
Report abuse to listadmin@xxxxxxxxxxxxx

------------------------------------------------------
List Archives: http://www.webelists.com/cgi/lyris.pl?enter=isalist
ISA Server Newsletter: http://www.isaserver.org/pages/newsletter.asp
ISA Server FAQ: http://www.isaserver.org/pages/larticle.asp?type=FAQ
------------------------------------------------------
Other Internet Software Marketing Sites:
World of Windows Networking: http://www.windowsnetworking.com
Leading Network Software Directory: http://www.serverfiles.com
No.1 Exchange Server Resource Site: http://www.msexchange.org
Windows Security Resource Site: http://www.windowsecurity.com/
Network Security Library: http://www.secinf.net/
Windows 2000/NT Fax Solutions: http://www.ntfaxfaq.com
------------------------------------------------------
You are currently subscribed to this ISAserver.org Discussion List as:
josephk@xxxxxxxxxxxxxxxxx
To unsubscribe visit http://www.webelists.com/cgi/lyris.pl?enter=isalist
Report abuse to listadmin@xxxxxxxxxxxxx



Other related posts: