JEditorPane and output Scaling

Hi, I don't know if this topic's title is appropriate enough, but my problem is as follows:
I have got an array of JEditorPane objects (HTML pages). Now I want to add **ALL** these objects to a JPanel inside a JScrollPane so that I might view all of them as thumbnails. Therefore, I will draw my JEditorPanes in small size, side by side.
My question is, how to make the JEditorPane paint its content in a small scale, as though it were a thumbnail of the actual size?
Thank you all in advance,
Filipe Fedalto

It is something like an HTML preview function in an JEditorPane. It would show the HTML page as it always does, but in a smaller scale, like a thumbnail.
Please, I am getting nuts...
Thank you all,
Filipe Fedalto

Similar Messages

  • Importing .asf files, blurry in source/sequence monitors and output

    I have a large amount of material to work with in .asf form, 480x360 resolution. I'll be outputting to 480x360 as well, so no scaling/zooming needed at all. Problem is, when I import one of those asfs it immediately becomes blurry, i.e. in the source monitor even before I insert it into the sequence and do any modifications. Comparing the imported files to the originals there is a noticeable difference at the exact same dimensions.
    I've made sure my sequence settings are at 480x360 resolution. Not sure where else to look on this, any suggestions?
    In the past I've done a very similar workflow in PE with no problems, so I'm assuming (hoping??) that there's some easily changed option. Thanks in advance.

    Have tried various other permutations in project setup and output - still no luck.
    I'm wondering if a clue is the behavior of the program monitor - the clip displays clearly in it until I 'select' the video screen, at which point it blurs just like the output. If I click another area of the screen again, the image resharpens, and so forth. Anyone know what mechanism is causing that?

  • Incorrect output scaling on Officejet 7612

    I bought this printer last weekend and it has installed fine.  I have updated the drivers and it will both print and scan.  But I have found that the print output is incorrectly scaled.  I have a PDF document that contains a 12" line that is printed only 11.6" long.  The problem is the same both horizontally and vertically.  I can fix the problem by setting the print scaling in the Adobe Reader to 103.9%.I had planned to use this printer for my landscape designs but without an accurate output, the printer won't be acceptable and will need to be returned.My plans are generated using Vectorworks and the same problem occurs there so I know this is not an Adobe problem.

    The paper type does not matter. The size of the paper does not matter. Choosing borderless or not does not matter. Ditto for margins. I tried it any number of ways and the scaling still came out wrong.
    I set up a layout with the certificate at a specific size and to print on letter sized paper. I saved the document as a PDF and printed out a sample of it where I work, in this case, on a Ricoh laser printer. It came off that printer scaled to the proper size with nothing cut off. Is there an understandable reason that it would not print out at that same correct size, on an 8.5 X 11 sheet at home on this color inkjet? I used both Acrobat Reader and Acrobat Pro, and it still was not correct. I actually had to "fudge" the percentage at the Acrobat Pro stage to even get a print I could use! Even it wasn't an accurate size.
    If there is a solution, I want to know. If this is an issue that hasn't been resolved, it urgently needs to be, for the sake if anyone who spends money on HP printers in the future, and expects to complete a project with accurate results, without hacking.  Hacking is not a solution, it is a disappointing workaround.
    If it's a driver issue, it should be fixed. If a bug that was not fixed, has it been fixed since? Do HP's new printers all do the same thing or are some printing properly to scale and others not ? Please inform me what HP's expectation is for this particular model. Finding that this machine cannot print properly is not acceptable and the product should either be fixed or discontinued.

  • How do I make a VI that contols a 6534 card take less time to load 1Mbyte and output data ?

    Hello-
    I'm developing a pattern generation burst mode type VI that reads byte characters from a text file, manipulates the bytes that it reads and then outputs the data from a 6534 card. The REQ1 pin is pulled high which makes the card continually output data until the internal buffer is empty. An internal clock is used. The problem is that the size of the file that is read by the VI can be relatively large, in the 1MByte range. After the VI manipulation, the output array is 16 times larger than the input string. So, when the VI reads a 1MByte text file, the output array contains 16 million entries (each array entry is 3 bits by the way). It takes about 20 seco
    nds to run and output data from the 6534 even when reading files that are 200kbyte or so. I'm outputting the data at 5Mbps. I'm not sure where all the delay is coming from. Using the 'Profile VI" function under the 'Tools' menu shows a snapshot of time that really doesn't help me since it only shows that the time is spent in my VI. Is this just the result of loading large files ? Or, is there a way to preload the 1MByte file into the 32MB of RAM on the 6534 card before the VI is actually run. What I mean is that I do have the option in my system to have a time when all text files will somehow be loaded into the 6534 memory, during some initialization period, and then the VI would be run with the text file already loaded. This of course assumes that the delay is loading the file from the harddrive, but since the harddrive transfer speed is fast, I have no idea where to speed things up. Any ideas ? Thanks !

    Your question actually belongs to the Measurement Devices >> Digital IO section since it concerns operating the 653x family of digital boards. You will see other related questions and answers there. In the future, please direct your digital questions to that forum.
    If you are trying to profile your VI, you can break it into different pieces. For instance, you can make a subVI out of the file data manipulation.
    Now, are you doing pattern generation or burst mode handshaking output? From your description of the signal connections, it looks like burst mode. You can double-check in the 653x User Manual at the http://www.ni.com/manuals pages. Still, it looks like you could accomplish your task with pattern generation. There are example VIs for both operations that
    I suggest you start with. They are located in the LabVIEW >> Examples >> Daq >> Digital >> 653x.llb directory.
    It also sounds like you are doing a single buffered operation, where you have a set amount of data that you want to output, and once done, the VI will stop. You are preloading the data to the buffer at DIO Write.vi before the 6534 actually outputs the data with DIO Start.vi when you program like the examples.
    Thus, start with the appropriate example and then add the File I/O to it. You can even test with a smaller file to see the effects. You will also find useful information concerning the 6534 in the KnowledgeBase, particularly KnowledgeBase 298CGF9M "How Many Samples of Data Can I Store in the Onboard Memory of the NI 6534?". You can find this online by going to the http://www.ni.com/support and choosing KnowledgeBase from the Technical Resources pull-down menu. Then, type in keywords to search for, such as "6534".
    Regards,
    Geneva L.
    Applications Engineering
    Nati
    onal Instruments
    http://www.ni.com/ask

  • Parse and output XML document while preserving attribute order

    QUESTION: How can I take in an element with attributes from an XML and output the same element and attributes while preserving the order of those attributes?
    The following code will parse and XML document and generate (practically) unchanged output. However, all attributes are ordered a-z
    Example: The following element
    <work_item_type work_item_db_site="0000000000000000" work_item_db_id="0" work_item_type_code="3" user_tag_ident="Step" name="Work Step" gmt_last_updated="2008-12-31T18:00:00.000000000" last_upd_db_site="0000000000000000" last_upd_db_id="0" rstat_type_code="1">
    </work_item_type>is output as:
    <work_item_type gmt_last_updated="2008-12-31T18:00:00.000000000" last_upd_db_id="0" last_upd_db_site="0000000000000000" name="Work Step" rstat_type_code="1" user_tag_ident="Step" work_item_db_id="0" work_item_db_site="0000000000000000" work_item_type_code="3">
    </work_item_type>As you may notice, there is no difference in these besides order of the attributes!
    I am convened that the problem is not in the stylesheet.xslt but if you are not then it is posted bellow.
    Please, someone help me out with this! I have a feeling the solution is simple
    The following take the XML from source.xml and outputs it to DEST_filename with attributes in a-z order
    Code:
    private void OutputFile(String DEST_filename, String style_filename){
         //StreamSource stylesheet = new StreamSource(style_filename);
         try{
              File dest_file = new File(DEST_filename);
              if(!dest_file.exists())
                  dest_file.createNewFile();
              TransformerFactory tranFactory = TransformerFactory.newInstance();
              Transformer aTransformer = tranFactory.newTransformer();
              aTransformer.setOutputProperty(OutputKeys.ENCODING, "UTF-8");
              Source src = new DOMSource("source.xml");
              Result dest = new StreamResult(dest_file);
              aTransformer.transform(src, dest);
              System.out.println("Finished");
         catch(Exception e){
              System.err.print(e);
              System.exit(-1);
        }

    You can't. The reason is, the XML Recommendation explicitly says the order of attributes is not significant. Therefore conforming XML serializers won't treat it as if it were significant.
    If you have an environment where you think that the order of attributes is significant, your first step should be to reconsider. Possibly it isn't really significant and you are over-reaching in some way. Or possibly someone writing requirements is ignorant of this fact and the requirement can be discarded.
    Or possibly your output is being given to somebody else who has a defective parser which expects the attributes to be in a particular order. You could quote the XML Recommendation to those people but often XML bozos are resistant to change. If you're stuck writing for that parser then you'll have to apply some non-XML processing to your output to fix it up on their behalf.

  • How to get Log and Output File Names for a concurrent request

    Hi,
    I am submitting a concurrent frm OAF with the following code in AM
    try{
    OADBTransaction tx = getOADBTransaction();
    Connection conn = tx.getJdbcConnection();
    ConcurrentRequest cr = new ConcurrentRequest(conn);
    Vector parameters = new Vector();
    parameters.addElement("10");
    nRequestID= cr.submitRequest("CIE","DTFEMP","","",false,parameters);
    tx.commit();
    }catch(RequestSubmissionException e)
    How do i get the handle to log and output files for the abvoe concurrent request ?
    One more thing is there a way where we can evaluate the environment variables
    like in the above example once i get a the request id
    logfile = $APPLCSF/$APPLOUT/"l"+requestID+".log"
    and
    outputfile=$APPLCSF/$APPLOUT/"o"+requestID+".out"
    is there a way i can get the values of $APPLCSF and $APPLOUT from the os ?
    Thanks
    Tom...
    Thanks
    Tom ...

    You can query the Fnd_Concurrent_Requests table using Request_ID, which has the log & out file directory details.
    Hth
    Srini

  • Harvesting asset info and output to CSV

    I need a script modified that will run on all servers in a work group in order to gather asset data on the appliances running Windows Server 2000 embedded edition. There are no domain services and these systems and this network technology is not an option
    in our environment due to proprietary security, networking and infrastructure restrictions. I have found a script that works but i need it modified to output to a csv as it wont output and .xls .xlsx properly. The script will be run on the only computer on
    the network that can access these devices. Any help on this would be awesome.
    ' Get Windows Server Information
    ' Written By Kely Mulcahey, E.C.S. LLC.
    ' Created: March 1, 2006
    ' Version: 3.0, Revised 5/30/2014
    On Error Resume Next
    Dim PUBOSVer ' Global OS Version
    ' Open File For Writing
    Set WshNetwork = WScript.CreateObject("WScript.Network")
    Const ForReading = 1
    ' Get Server List
    strServerFilename = "servers.txt"
    Set objFSO = CreateObject("Scripting.FileSystemObject")
    If objFSO.FileExists(strServerFilename) Then
    ' Open Servers File
    Set objServers = objFSO.OpenTextFile(strServerFilename, ForReading)
    Else
    ' Server File is missing: Exit
    intMsg = MsgBox("File: " & Chr(34) & UCASE(strServerFilename) & Chr(34) & _
    " is either " & _
    "Missing or Damaged!" & vbcrlf & _
    vbcrlf & _
    "This Script will now Exit.", vbCritical, "Server File Error")
    WScript.Quit(0)
    End If
    Do Until objServers.AtEndOfStream
    strNewServer = Trim(objServers.ReadLine)
    strServerList = strServerList & strNewServer & vbcrlf
    intServerCnt = intServerCnt + 1
    Loop
    ' Enumerate Server Array
    For a = 0 To intServerCnt - 1
    strServer = Split(strServerList, vbcrlf)
    Next
    ' Create Excel Spreadsheet
    Set objXLA = CreateObject("Excel.Application")
    objXLA.Visible = False
    objXLA.DisplayAlerts = False
    Set objWorkbook = objXLA.Workbooks.Add()
    Set objWorksheet = objWorkbook.Worksheets(1)
    'Excel Constants
    Const xlEdgeLeft = 7
    Const xlContinuous = 1
    Const xlNone = -4142
    Const xlMedium = -4138
    Const xlThin = 2
    'Set Headers
    ' System Information
    objXLA.Cells(1,1).Value = "Service ID"
    objXLA.Cells(1,2).Value = "Company Name"
    objXLA.Cells(1,3).Value = "Manufacturer"
    objXLA.Cells(1,4).Value = "Model"
    objXLA.Cells(1,5).Value = "Operating System"
    ' Processors
    objXLA.Cells(1,6).Value = "Processor Type"
    objXLA.Cells(1,7).Value = "Processors"
    ' RAM
    objXLA.Cells(1,8).Value = "RAM"
    objXLA.Cells(1,9).Value = "Slots"
    objXLA.Cells(1,10).Value = "Max Capacity"
    ' Network
    objXLA.Cells(1,11).Value = "NIC Port"
    objXLA.Cells(1,12).Value = "Speed"
    objXLA.Cells(1,13).Value = "Connection Name"
    objXLA.Cells(1,14).Value = "Primary IP"
    objXLA.Cells(1,15).Value = "Virtual IP"
    objXLA.Cells(1,16).Value = "Primary DNS"
    objXLA.Cells(1,17).Value = "Secondary DNS"
    ' Hard Disks
    objXLA.Cells(1,18).Value = "Interface"
    objXLA.Cells(1,19).Value = "Physical Disks"
    objXLA.Cells(1,20).Value = "Disk Size"
    objXLA.Cells(1,21).Value = "Fault Tolerant"
    objXLA.Cells(1,22).Value = "Hot Spare"
    ' Set Top Line
    objXLA.Cells(1, 1).EntireRow.Font.Bold = True
    objXLA.Cells(1, 1).EntireRow.Font.Underline = True
    For b = 0 To UBound(strServer) - 1
    strServerParts = Split(strServer(b), " ")
    strComputer = strServerParts(0)
    ' Parse Server Information
    If UBound(strServerParts) = 2 Then
    strUsername = Trim(strServerParts(1))
    strPassword = Trim(strServerParts(2))
    End If
    ' Create Connection Object
    Set objWMIService = Nothing
    Set objSWbemLocator = CreateObject("WbemScripting.SWbemLocator")
    Set objWMIService = objSWbemLocator.ConnectServer _
    (strComputer, "root\cimv2", strUsername, strPassword)
    objWMIServices.Security_.ImpersonationLevel = 3
    ' Check if Server Exists
    For intWMICheck = 0 To 15
    If Not objWMIService Is Nothing Then
    Exit For
    Else
    WScript.Sleep(1000)
    End If
    Next
    ' Server Exists
    If intWMICheck < 15 Then
    ' Get CPU Information
    Set colProcessor = objWMIService.ExecQuery("SELECT * FROM Win32_Processor")
    For Each colProc In colProcessor
    strManuf = colProc.Manufacturer
    strDescription = ProcessorName(colProc.Name)
    strClockSpeed = colProc.CurrentClockSpeed
    strSocket = strSocket & colProc.SocketDesignation & vbcrlf
    strProcID = strProcID & colProc.ProcessorID & vbcrlf
    strUniqueID = strUniqueID & colProc.UniqueID & vbcrlf
    ProcCount = ProcCount + 1
    Next
    ' Determine if Hyperthreading is Enabled
    strHTStatus = GetHTStatus(strSocket, ProcCount, strProcID, strUniqueID)
    ' DC / HT Results
    If strHTStatus = "True" Then
    If InStr(strManuf, "Intel") Then
    strDescription = strDescription & " (Dual Core or H/T)"
    Else
    strDescription = strDescription & " (Dual Core)"
    End If
    ProcCount = ProcCount / 2
    End If
    ' Export Information
    Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
    Set colCS = objWMIService.ExecQuery("Select * from Win32_ComputerSystem",,48)
    ' Write Basic System Information
    For Each objItem in colCS
    Set colOS = objWMIService.ExecQuery("Select * from Win32_OperatingSystem",,48)
    For Each objItemOS in colOS
    ' Get SP Version
    If objItemOS.CSDVersion <> "" Then
    strSPVersion = objItemOS.CSDVersion
    Else
    strSPVersion = "No Service Packs Installed"
    End If
    If objItemOS.LastBootUpTime <> "" Then
    strLastBoot = DateConvert(objItemOS.LastBootUpTime)
    Else
    strLastBoot = "N/A"
    End If
    ' Set OS Version Information
    PUBOSVer = objItemOS.Caption
    objXLA.Cells(b + 2, 1).Value = objItemOS.csname
    objXLA.Cells(b + 2, 3).Value = objItem.Manufacturer
    objXLA.Cells(b + 2, 4).Value = objItem.Model
    objXLA.Cells(b + 2, 5).Value = PUBOSVer & " - " & strSPVersion
    objXLA.Cells(b + 2, 6).Value = strDescription
    objXLA.Cells(b + 2, 7).Value = ProcCount
    objXLA.Cells(b + 2, 8).Value = MemoryConvert(objItem.TotalPhysicalMemory)
    Next
    Next
    ' Get Memory Breakdown
    Dim strMemBreak
    strMemBreak = Split(MemoryBreakdown(), vbcrlf)
    n = 0
    For n = 0 To UBound(strMemBreak) - 1
    strSlots = strSlots & strMemBreak(n) & Chr(10)
    Next
    strMaxCapacity = strMemBreak(UBound(strMemBreak))
    objXLA.Cells(b + 2, 9).Value = Left(strSlots, Len(strSlots) - 1)
    objXLA.Cells(b + 2, 10).Value = strMaxCapacity
    ' Dispose
    strMemBreak = ""
    strMaxCapacity = ""
    strSlots = ""
    '--------------Computer Information (End)------------------'
    '-------------Partition Information (Start)----------------'
    ' Get Drive Count
    Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
    Set DiskItemsParent = objWMIService.ExecQuery("Select * from Win32_DiskDrive")
    intCount = DiskItemsParent.Count
    ' Process Drives
    intDriveMark = 0
    For i = 0 To intCount - 1
    Set DiskItems = objWMIService.ExecQuery("Select * from Win32_DiskDrive WHERE Index = " & i)
    For Each diskItem in DiskItems
    ' Convert Drive Size
    If diskItem.Size <> "" Then strSize = strSize & ByteConvert(diskItem.Size) & Chr(10) Else strSize = "N/A" & Chr(10)
    If diskItem.StatusInfo <> "" Then strStsInfo = diskItem.StatusInfo Else strStsInfo = "N/A"
    If diskItem.SCSIBus <> "" Then strSCSIBus = diskItem.SCSIBus Else strSCSIBus = "N/A"
    If diskItem.SCSILogicalUnit <> "" Then strSCSILog = diskItem.SCSILogicalUnit Else strSCSILog = "N/A"
    If diskItem.SCSIPort <> "" Then strSCSIPort = diskItem.SCSIPort Else strSCSIPort = "N/A"
    If diskItem.SCSITargetId <> "" Then strSCSITarget = diskItem.SCSITargetId Else strSCSITarget = "N/A"
    ' Get Model
    strModel = Split(diskItem.Model, " ")
    ' Detect HP Array
    If (UCase(strModel(0)) = "HP" Or UCase(strModel(0)) = "COMPAQ") And intDriveMark = 0 Then
    strGetHPArray = GetHPArray(strComputer, strUsername, strPassword)
    If strGetHPArray <> "" Then
    strSplitHP = Split(strGetHPArray, Chr(13))
    For a = 0 To UBound(strSplitHP)
    strSplitResult = Split(strSplitHP(a), ":")
    i = i + 1
    strDriveCount = strDriveCount & Trim(strSplitResult(0)) & Chr(10)
    strDriveSize = strDriveSize & Trim(strSplitResult(1)) & Chr(10)
    strDriveFault = strDriveFault & Trim(strSplitResult(2)) & Chr(10)
    strDriveSpare = strDriveSpare & Trim(strSplitResult(3)) & Chr(10)
    strInterface = strInterface & "HP SCSI" & Chr(10)
    Next
    ' Set Controller Output
    objXLA.Cells(b + 2, 19).Value = Trim(Left(strDriveCount, Len(strDriveCount) - 1))
    objXLA.Cells(b + 2, 20).Value = Trim(Left(strDriveSize, Len(strDriveSize) - 1))
    objXLA.Cells(b + 2, 21).Value = Trim(Left(strDriveFault, Len(strDriveFault) - 1))
    objXLA.Cells(b + 2, 22).Value = Trim(Left(strDriveSpare, Len(strDriveSpare) - 1))
    intDriveMark = 1 ' Mark That Data was Obtained
    Else
    strDriveCount = strDriveCount & "1" & Chr(10)
    strDriveSize = strDriveSize & strSize & Chr(10)
    strDriveFault = strDriveFault & "N/A" & Chr(10)
    strDriveSpare = strDriveSpare & "N/A" & Chr(10)
    strInterface = strInterface & "HP SCSI " & Chr(10)
    ' Set Controller Output
    intDriveMark = 1 ' Mark That Another Pass is Invalid
    ' Set Controller Output
    objXLA.Cells(b + 2, 19).Value = Trim(Left(strDriveCount, Len(strDriveCount) - 1))
    objXLA.Cells(b + 2, 20).Value = Trim(Left(strDriveSize, Len(strDriveSize) - 1))
    objXLA.Cells(b + 2, 21).Value = Trim(Left(strDriveFault, Len(strDriveFault) - 1))
    objXLA.Cells(b + 2, 22).Value = Trim(Left(strDriveSpare, Len(strDriveSpare) - 1))
    End If
    Else
    strDriveCount = strDriveCount & "1" & Chr(10)
    strDriveSize = strDriveSize & strSize & Chr(10)
    strDriveFault = strDriveFault & "N/A" & Chr(10)
    strDriveSpare = strDriveSpare & "N/A" & Chr(10)
    ' Set Controller Output
    intDriveMark = 1 ' Mark That Another Pass is Invalid
    ' Set Controller Output
    objXLA.Cells(b + 2, 19).Value = Trim(Left(strDriveCount, Len(strDriveCount) - 1))
    objXLA.Cells(b + 2, 20).Value = Trim(Left(strDriveSize, Len(strDriveSize) - 1))
    objXLA.Cells(b + 2, 21).Value = Trim(Left(strDriveFault, Len(strDriveFault) - 1))
    objXLA.Cells(b + 2, 22).Value = Trim(Left(strDriveSpare, Len(strDriveSpare) - 1))
    ' Set Interface
    If diskItem.InterfaceType = "IDE" Then
    strInterface = strInterface & "ATA" & Chr(10)
    Else
    strInterface = strInterface & "SATA/SCSI" & Chr(10)
    End If
    End If
    ' Set Cell Value "Interface"
    objXLA.Cells(b + 2, 18).Value = Left(strInterface, Len(strInterface) - 1)
    Next
    ' Dispose Drive Sizes
    strDriveSize = ""
    Next
    ' Dispose Drive Values
    strDriveCount = ""
    strDriveFault = ""
    strDriveSpare = ""
    strInterface = ""
    '----Partition Information (End)---------------------------'
    '----Network Information (Start)---------------------------'
    Set colItems = objWMIService.ExecQuery("Select * from Win32_NetworkAdapter")
    i = 1
    eth = 0
    Dim STOREDIP(0)
    intNum = 0
    For Each objItem in colItems
    If objItem.NetConnectionStatus <> "" Then
    ' Determine Connection Status
    If objItem.NetConnectionStatus = 0 Then
    strNetStat = "Disabled"
    ElseIf objItem.NetConnectionStatus = 2 Then
    strNetStat = "Connected"
    ElseIf objItem.NetConnectionStatus = 7 Then
    strNetStat = "Disconnected"
    Else
    strNetStat = "Unknown"
    End If
    If objItem.NetConnectionStatus <> 0 Then
    ' Get Network Card Information
    Const HKEY_LOCAL_MACHINE = &H80000002
    strKeyPath1 = "SYSTEM\CurrentControlSet\Services\Tcpip\Parameters"
    strKeyPath2 = "SYSTEM\CurrentControlSet\Services\NetBT\Parameters"
    strHostEntry = "Hostname"
    strDomainEntry = "Domain"
    strNodeEntry = "DhcpNodeType"
    strRoutingEntry = "IPEnableRouter"
    Set objReg = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & _
    strComputer & "\root\default:StdRegProv")
    objReg.GetStringValue HKEY_LOCAL_MACHINE,strKeyPath1,strHostEntry,strHostname
    objReg.GetStringValue HKEY_LOCAL_MACHINE,strKeyPath1,strDomainEntry,strDomain
    objReg.GetDWORDValue HKEY_LOCAL_MACHINE,strKeyPath2,strNodeEntry,dwNodeType
    objReg.GetDWORDValue HKEY_LOCAL_MACHINE,strKeyPath1,strRoutingEntry,dwIPRouting
    Select Case dwNodeType
    Case 4 strNodeType = "Mixed"
    Case 8 strNodeType = "Hybrid"
    Case Else strNodeType = dwNodeType
    End Select
    If dwIPRouting = 0 Then
    strIPRouting = "No"
    ElseIf dwIPRouting = 1 Then
    strIPRouting = "Yes"
    Else
    strIPRouting = "?"
    End If
    Set colFirstNicConfig = objWMIService.ExecQuery _
    ("SELECT * FROM Win32_NetworkAdapterConfiguration WHERE IPEnabled = True")
    For Each objFirstNicConfig In colFirstNicConfig
    strDnsWins = objFirstNicConfig.DNSEnabledForWINSResolution
    Next
    Set colNicConfigs = objWMIService.ExecQuery _
    ("SELECT * FROM Win32_NetworkAdapterConfiguration WHERE IPEnabled = True")
    ' Display per-adapter settings.
    For Each objNicConfig In colNicConfigs
    intIndex = objNicConfig.Index
    Set objNic = objWMIService.Get("Win32_NetworkAdapter.DeviceID=" & intIndex)
    ' Connection Name
    If GetOsVer > 5 Then
    ' Works only in XP / 2003
    strNetConn = objNic.NetConnectionID
    ElseIf GetOsVer = 5 Then
    strNetConn = ""
    ' Get Home Drive of Remote Server
    Set objShell = CreateObject("WScript.Shell")
    Set objEtherName = objShell.Exec("cmd /c ipconfig | find " & Chr(34) & "Ethernet" & Chr(34))
    strEtherName = objEtherName.StdOut.ReadAll()
    strEtherParse = Split(strEtherName, Chr(13))
    strEtherConn = Split(strEtherParse(eth), " ")
    For y = 2 To UBound(strEtherConn)
    strNetConn = strNetConn & " " & strEtherConn(y)
    Next
    ' Trim Connection Name
    strNetConn = Left(Trim(strNetConn), Len(Trim(strNetConn)) - 1)
    Else
    strNetConn = ""
    End If
    ' IP Addresses
    strIPAddresses = ""
    If Not IsNull(objNicConfig.IPAddress) Then
    For Each strIPAddress In objNicConfig.IPAddress
    strIPAddresses = strIPAddresses & strIPAddress & " "
    Next
    End If
    strIPCollection = Split(strIPAddresses, " ")
    ' Subnets
    strIPSubnets = ""
    If Not IsNull(objNicConfig.IPSubnet) Then
    For Each strIPSubnet In objNicConfig.IPSubnet
    strIPSubnets = strIPSubnets & strIPSubnet & " "
    Next
    End If
    strSMCollection = Split(strIPSubnets, " ")
    ' Virtual IP's
    strVirtual = ""
    If UBound(strIPCollection) > 1 Then
    For IPCount = 1 To UBound(strIPCollection) - 1
    strVirtual = strVirtual & (strIPCollection(IPCount) & " / " & strSMCollection(IPCount)) & Chr(10)
    Next
    strVirtual = Left(strVirtual, Len(strVirtual) - 1)
    End If
    If Trim(strVirtual) = "" Then strVirtual = "N/A"
    ' Gateways
    strDefaultIPGateways = ""
    If Not IsNull(objNicConfig.DefaultIPGateway) Then
    For Each strDefaultIPGateway In objNicConfig.DefaultIPGateway
    strDefaultIPGateways = strDefaultIPGateways & strDefaultIPGateway & " "
    Next
    Else
    strDefaultIPGateways = "N/A"
    End If
    ' If IP is repeated, and was already reported.
    intSkipLoop = 0
    If Trim(strNetConn) <> "" Then
    For j = 0 To intNum - 1
    If STOREDIP(j) = strIPAddresses Then
    intSkipLoop = 1
    Exit For
    End If
    Next
    If intSkipLoop = 0 Then
    ReDim Preserve STOREDIP(intNum)
    STOREDIP(intNum) = strIPAddresses
    intNum = intNum + 1
    End If
    Else
    intSkipLoop = 1
    End If
    ' DNS
    strDNSServerSearchOrder = ""
    If Not IsNull(objNicConfig.DNSServerSearchOrder) Then
    For Each strDNSServer In objNicConfig.DNSServerSearchOrder
    strDNSServerSearchOrder = strDNSServerSearchOrder & strDNSServer & " "
    Next
    strDNS = Split(strDNSServerSearchOrder, " ")
    strDNS1 = strDNS(0)
    If Trim(strDNS1) = "" Then strDNS1 = "N/A"
    If UBound(strDNS) > 1 Then
    strDNS2 = strDNS(1)
    Else
    strDNS2 = "N/A"
    End If
    Else
    strDNS1 = "N/A"
    strDNS2 = "N/A"
    End If
    ' Run Output Process
    If intSkipLoop = 0 Then
    ' Connection Speed
    strSpeed = "Unknown"
    Set objWMIService2 = objSWbemLocator.ConnectServer _
    (strComputer, "root\WMI", strUsername, strPassword)
    objWMIServices.Security_.ImpersonationLevel = 3
    Set listAdapters = objWMIService2.ExecQuery("SELECT * FROM MSNdis_LinkSpeed")
    Set enumAdapters = objWMIService2.ExecQuery("SELECT * FROM MSNdis_EnumerateAdapter")
    For Each objAdapter in listAdapters
    For Each objEnum in enumAdapters
    intEnum = Len(objEnum.DeviceName)
    If objNicConfig.SettingID = Right(objEnum.DeviceName, intEnum - 8) Then
    If objEnum.InstanceName = objAdapter.InstanceName Then
    intLength = Len(objAdapter.NdisLinkSpeed/10000)
    If intLength > 3 Then
    strSpeed = Left(objAdapter.NdisLinkSpeed/10000, intLength - 3)
    strSpeed = strSpeed & ".0 Gbps"
    Else
    strSpeed = objAdapter.NdisLinkSpeed/10000 & " Mbps"
    End If
    End If
    End If
    Next
    Next
    strTotalDesc = strTotalDesc & objNicConfig.Description & Chr(10)
    strTotalSpeed = strTotalSpeed & strSpeed & Chr(10)
    strTotalNetConn = strTotalNetConn & strNetConn & Chr(10)
    strPrimaryIP = strPrimaryIP & strIPCollection(0) & " / " & strSMCollection(0) & Chr(10)
    strDNSTotal1 = strDNSTotal1 & strDNS1 & Chr(10)
    strDNSTotal2 = strDNSTotal2 & strDNS2 & Chr(10)
    strTotalVirtual = strTotalVirtual & strVirtual & Chr(10)
    i = i + 1
    eth = eth + 2
    ' Dispose
    strDescription = ""
    ProcCount = 0
    strClockSpeed = ""
    strInterface = ""
    intCount = 0
    strSize = ""
    strSpeed = ""
    strIPCollection = ""
    strVirtual = ""
    strDNS = ""
    strDNS1 = ""
    strDNS2 = ""
    End If
    Next
    ' Output
    ' Trim Leading Chr(10)
    If Left(strPrimaryIP, 1) = Chr(10) Then strPrimaryIP = Right(strPrimaryIP, Len(strPrimaryIP) - 1)
    If Left(strTotalVirtual, 1) = Chr(10) Then strTotalVirtual = Right(strTotalVirtual, Len(strTotalVirtual) - 1)
    If Left(strDNSTotal1, 1) = Chr(10) Then strDNSTotal1 = Right(strDNSTotal1, Len(strDNSTotal1) - 1)
    If Left(strDNSTotal2, 1) = Chr(10) Then strDNSTotal2 = Right(strDNSTotal2, Len(strDNSTotal2) - 1)
    objXLA.Cells(b + 2, 11).Value = Trim(Left(strTotalDesc, Len(strTotalDesc) - 1))
    objXLA.Cells(b + 2, 12).Value = Trim(Left(strTotalSpeed, Len(strTotalSpeed) - 1))
    objXLA.Cells(b + 2, 13).Value = Trim(Left(strTotalNetConn, Len(strTotalNetConn) - 1))
    objXLA.Cells(b + 2, 14).Value = Trim(Left(strPrimaryIP, Len(strPrimaryIP) - 1))
    objXLA.Cells(b + 2, 15).Value = Trim(Left(strTotalVirtual, Len(strTotalVirtual) - 1))
    objXLA.Cells(b + 2, 16).Value = Trim(Left(strDNSTotal1, Len(strDNSTotal1) - 1))
    objXLA.Cells(b + 2, 17).Value = Trim(Left(strDNSTotal2, Len(strDNSTotal2) - 1))
    End If
    End If
    ' Dispose Per Loop
    strTotalDesc = ""
    strTotalSpeed = ""
    strTotalNetConn = ""
    strPrimaryIP = ""
    strDNSTotal1 = ""
    strDNSTotal2 = ""
    strTotalVirtual = ""
    Set eth = 0
    Set i = 0
    Next
    '------------Network Information (End)------------------'
    Else
    'No Data Present
    objXLA.Cells(b + 2, 1).Value = strComputer
    objXLA.Cells(b + 2, 3).Value = "Information Not Available"
    objXLA.Cells(b + 2, 1).EntireRow.Font.Bold = True
    objXLA.Cells(b + 2, 1).EntireRow.Interior.ColorIndex = 44
    End If
    ' Dispose Per Server
    ProcCount = 0
    strSocket = ""
    strProcID = ""
    strUniqueID = ""
    Set objWMIService = Nothing
    Next
    '-----------------Functions (Start)---------------------'
    ' System Memory Conversion
    Function MemoryConvert(strMem)
    Dim intLength
    Dim intExp
    Dim intSize
    Dim strSize
    Dim strMeasure
    Dim strMemory
    intLength = Len(strMem)
    If (intLength Mod 4 = 0) Then
    intExp = CInt((intLength / 3) - 2)
    Else
    intExp = CInt((intLength / 3) - 1)
    End If
    ' Convert to Lowest Integer Value
    For intCount = 1 To Len(intExp)
    chrRead = Mid(intExp, intCount, 1)
    If chrRead = "." Then
    Exit For
    Else
    strRead = strRead & chrRead
    End If
    Next
    intExp = Cint(strRead)
    intSize = CLng(strMem / (2 ^ (intExp * (10))))
    If Len(intSize) = 1 Then
    strFormat = FormatNumber(CStr(intSize), 2)
    Else
    strFormat = intSize + 1
    End If
    If (intExp = 1) Then
    strMeasure = "KB"
    ElseIf (intExp = 2) Then
    strMeasure = "MB"
    ElseIf (intExp = 3) Then
    strMeasure = "GB"
    ElseIf (intExp = 4) Then
    strMeasure = "TB"
    ElseIf (intExp = 5) Then
    strMeasure = "PB"
    ElseIf (intExp = 6) Then
    strMeasure = "EB"
    End If
    MemoryConvert = strFormat & " " & strMeasure
    End Function
    ' System Byte Conversion
    Function ByteConvert(strMem)
    Dim intLength
    Dim intExp
    Dim intSize
    Dim strSize
    Dim strMeasure
    Dim strMemory
    intLength = Len(strMem)
    If (intLength Mod 3 = 0) Then
    intExp = (intLength / 3) - 1
    Else
    intExp = (intLength / 3)
    End If
    ' Convert to Lowest Integer Value
    For intCount = 1 To Len(intExp)
    chrRead = Mid(intExp, intCount, 1)
    If chrRead = "." Then
    Exit For
    Else
    strRead = strRead & chrRead
    End If
    Next
    intExp = Cint(strRead)
    intSize = CLng(strMem / (2 ^ (intExp * (10))))
    strFormat = FormatNumber(CStr(intSize), 2)
    If (intExp = 1) Then
    strMeasure = "KB"
    ElseIf (intExp = 2) Then
    strMeasure = "MB"
    ElseIf (intExp = 3) Then
    strMeasure = "GB"
    ElseIf (intExp = 4) Then
    strMeasure = "TB"
    ElseIf (intExp = 5) Then
    strMeasure = "PB"
    ElseIf (intExp = 6) Then
    strMeasure = "EB"
    End If
    ByteConvert = strFormat & " " & strMeasure
    End Function
    ' System RAID Byte Conversion
    Function ByteConvertRAID(strMem)
    Dim intLength
    Dim intExp
    Dim intSize
    Dim strSize
    Dim strMeasure
    Dim strMemory
    intLength = Len(strMem)
    If (intLength Mod 3 = 0) Then
    intExp = (intLength / 3) - 1
    Else
    intExp = (intLength / 3)
    End If
    ' Convert to Lowest Integer Value
    For intCount = 1 To Len(intExp)
    chrRead = Mid(intExp, intCount, 1)
    If chrRead = "." Then
    Exit For
    Else
    strRead = strRead & chrRead
    End If
    Next
    intExp = Cint(strRead)
    intSize = (strMem / (2 ^ (intExp * (10))))
    strFormat = FormatNumber(CStr(intSize), 2)
    If (intExp = 0) Then
    strMeasure = "MB"
    ElseIf (intExp = 1) Then
    strMeasure = "GB"
    ElseIf (intExp = 2) Then
    strMeasure = "TB"
    ElseIf (intExp = 3) Then
    strMeasure = "PB"
    ElseIf (intExp = 4) Then
    strMeasure = "EB"
    End If
    ByteConvertRAID = strFormat & " " & strMeasure
    End Function
    ' Trim Processor Description
    Function ProcessorName(strName)
    Dim intCounter
    Dim strRead
    Dim chrRead, chrReadMore
    For intCounter = 1 to Len(strName)
    chrRead = Mid(strName, intCounter, 1)
    chrReadMore = Mid(strName, intCounter + 1, 1)
    If ((chrRead <> " ") Or ((chrRead = " ") And (chrReadMore <> " "))) Then
    strRead = strRead & chrRead
    End If
    Next
    ProcessorName = Trim(strRead)
    End Function
    ' Get Hyper-Threading Status
    Function GetHTStatus(strName, intProc, strID, strUnique)
    strNameArray = Split(strName, vbcrlf)
    strIDArray = Split(strID, vbcrlf)
    strUniqueList = Split(strUnique, vbcrlf)
    intTotal = 0
    ' Check Socket Designation
    For i = 0 To UBound(strNameArray) - 1
    intMark = 1
    ' Check for Redundancies
    For j = i + 1 To UBound(strNameArray) - 1
    If strNameArray(i) = strNameArray(j) Then
    intMark = 0
    End If
    Next
    ' If Redundant Unique ID's Exist
    For j = i + 1 To UBound(strNameArray) - 1
    If strUniqueList(i) <> "" And strUniqueList(j) <> "" And _
    (strUniqueList(i) <> strUniqueList(j)) Then
    intMark = 1
    End If
    Next
    ' Check for NULL ProcessorID
    If Trim(strIDArray(i)) = "0000000000000000" Then
    intMark = 0
    End If
    ' Calculate Total
    If intMark = 1 Then
    intTotal = intTotal + intMark
    End If
    Next
    ' Compare Results
    If intProc = 2 * intTotal Then
    GetHTStatus = "True"
    Else
    GetHTStatus = "False"
    End If
    End Function
    ' Get Memory Breakdown
    Function MemoryBreakdown
    Set colPMAItems = objWMIService.ExecQuery("Select * from Win32_PhysicalMemoryArray",,48)
    For Each objPMAItem in colPMAItems
    lngMax = CLng(objPMAItem.MaxCapacity)
    intCount = CInt(objPMAItem.MemoryDevices)
    Next
    ReDim Preserve strPMArray(intCount)
    Set colPMItems = objWMIService.ExecQuery("Select * from Win32_PhysicalMemory",,48)
    For Each objPMItem in colPMItems
    strValue = strValue & objPMItem.DeviceLocator & ": "
    strValue = strValue & objPMItem.Capacity / 2^20 & "MB, "
    strValue = strValue & objPMItem.Speed & "MHz"
    strPMArray(TrimTrailingNumber(objPMItem.Tag)) = strValue
    strValue = ""
    Next
    j = 0
    strResult = ""
    For j = 0 To intCount - 1
    If Trim(strPMArray(j)) = "" Then strPMArray(j) = "<Empty>"
    strResult = strResult & strPMArray(j) & vbcrlf
    Next
    strResult = strResult & (lngMax / 2^10) & "MB"
    MemoryBreakdown = strResult
    End Function
    ' Get Part Name
    Function ExtractPartName(strName)
    Dim chrRead
    Dim strRead
    Dim i
    For i = 2 To Len(strName)
    chrRead = Mid(strName, Len(strName) - (i - 1), 1)
    If chrRead <> Chr(34) Then
    strRead = chrRead & strRead
    Else
    Exit For
    End If
    Next
    ExtractPartName = strRead
    End Function
    ' Get Trailing Number
    Function TrimTrailingNumber(strNum)
    Dim chrRead
    Dim strRead
    Dim intLen
    strNum = Trim(strNum)
    intLen = Len(strNum)
    i = 1
    For i = 1 To intLen
    chrRead = Mid(strNum, intLen - (i - 1), 1)
    If IsNumeric(chrRead) = "True" Then
    strRead = chrRead & strRead
    Else
    Exit For
    End If
    Next
    TrimTrailingNumber = strRead
    End Function
    ' Function: WMIDateStringToDate(dtmDate)
    Function WMIDateToString(dtmDate)
    WMIDateToString = CDate(Mid(dtmDate, 5, 2) & "/" & _
    Mid(dtmDate, 7, 2) & "/" & _
    Left(dtmDate, 4) & " " & _
    Mid(dtmDate, 9, 2) & ":" & _
    Mid(dtmDate, 11, 2) & ":" & _
    Mid(dtmDate, 13, 2))
    End Function
    ' Function: GetOsVer
    Function GetOsVer
    Set colOperatingSystems = objWMIService.ExecQuery _
    ("Select * from Win32_OperatingSystem")
    For Each objOperatingSystem In colOperatingSystems
    GetOSVer = CSng(Left(objOperatingSystem.Version, 3))
    Next
    End Function
    ' Function: GetHPArray
    Function GetHPArray(strComputer2, strUsername2, strPassword2)
    ' Check for 64-bit Windows
    If InStr(PUBOSVer, "x64") Then
    strCompaq = "Program Files (x86)\Compaq\Cpqacuxe\Bin"
    Else
    strCompaq = "Program Files\Compaq\Cpqacuxe\Bin"
    End If
    ' Create Connection Object
    Set objWMIServiceRem = objWMIService.Get("Win32_Process")
    ' Confirm Location of Compaq Array Manager
    Set objHPShell = CreateObject("WScript.Shell")
    Set objHPFSO = CreateObject("Scripting.FileSystemObject")
    Set WshNetwork2 = WScript.CreateObject("WScript.Network")
    WshNetwork2.MapNetworkDrive "", "\\" & strComputer2 & "\C$" ,,strUsername2, strPassword2
    strProgram = "\\" & strComputer2 & "\C$\" & strCompaq & "\cpqacuxe.exe"
    ' Ensure Access is Possible
    If objHPFSO.FileExists(strProgram) Then
    ' Process Array Config
    strProcess = Chr(34) & "C:\" & strCompaq & "\cpqacuxe.exe" & Chr(34) & " -c c:\output.txt"
    Process = objWMIServiceRem.Create(strProcess, null, null, intProcessID)
    ' Check for "output.txt"
    For intTimerHP = 0 To 10
    If objFSO.FileExists("\\" & strComputer2 & "\C$\output.txt") Then
    Exit For
    Else
    WScript.Sleep(1000)
    End If
    Next
    ' Process Output
    If intTimerHP < 10 Then
    ' Check for Locked Output File
    Set objHPOutputFile = objHPFSO.GetFile("\\" & strComputer2 & "\C$\output.txt")
    If objHPOutputFile.Size <> 0 Then
    ' Close File
    Set objHPOutputFile = Nothing
    ' Continue Processesing File
    Set objHPInputFile = objHPFSO.OpenTextFile("\\" & strComputer2 & "\C$\output.txt", ForReading)
    Do Until objHPInputFile.AtEndOfStream
    strHPArray = strHPArray & objHPInputFile.ReadLine & vbcrlf
    Loop
    ' Close Input File
    objHPInputFile.Close
    ' Close Link to Server
    objHPFSO.DeleteFile("\\" & strComputer2 & "\C$\output.txt")
    Set objGetHPArray = objHPShell.Exec("net use \\" & strComputer2 & "\C$ /delete /yes")
    Do While (objGetHPArray.Status = 0)
    WScript.Sleep(500)
    Loop
    ' Create String Array
    strHPParse = Split(strHPArray, vbcrlf)
    ' Parse For Individual RAID Arrays
    Dim strArrayList()
    z = 0
    For i = 0 To UBound(strHPParse)
    j = 0
    ' Array and Drives
    If InStr(strHPParse(i), "Array Specifications") Then
    ReDim Preserve strArrayList(z)
    strArrayList(z) = strArrayList(z) & strHPParse(i) & vbcrlf
    For j = i + 1 To Ubound(strHPParse)
    If InStr(strHPParse(j), "Array Specifications") Then
    Exit For
    Else
    strArrayList(z) = strArrayList(z) & strHPParse(j) & vbcrlf
    End If
    Next
    z = z + 1
    End If
    Next
    ' Process Each RAID Array
    x = 0
    For x = 0 To UBound(strArrayList)
    strListParse = Split(strArrayList(x), vbcrlf)
    For y = 0 To UBound(strListParse)
    ' Drives
    If Left(strListParse(y), 6) = "Drive=" Then
    strDrives = ""
    strDrives = Split(strListParse(y), ",")
    k = 0
    For j = 0 To UBound(strDrives)
    k = k + 1
    Next
    strDriveCount = k ' For Output
    End If
    ' Hot Spare
    If InStr(strListParse(y), "OnlineSpare=") Then
    If InStr(strListParse(y), "OnlineSpare= No") Then
    strHotSpare = strHotSpare & "N" ' For Output
    Else
    strHotSpare = strHotSpare & "Y" ' For Output
    End If
    End If
    ' Logical Drives
    If InStr(strListParse(y), "Logical Drive Specifications") Then
    ' Find First Logical Drive
    strRAID = Split(strListParse(y + 2), " ")
    strRAIDResult = strRAIDResult & "RAID " & strRAID(1) & " / " ' For Output
    strGetDrive = Split(strListParse(y + 3), " ")
    strRAIDSize = strRAIDSize & ByteConvertRAID(strGetDrive(1)) & " / " ' For Output
    End If
    Next
    ' Process Results
    strRAIDSize = Left(strRAIDSize, Len(strRAIDSize) - 3)
    strRAIDResult = Left(strRAIDResult, Len(strRAIDResult) - 3)
    strNewList = strNewList & strDriveCount & _
    ":" & strRAIDSize & ":" & strRAIDResult & ":" & strHotSpare & Chr(13)
    ' Dispose Array Variables
    strDriveCount = ""
    strRAIDSize = ""
    strRAIDResult = ""
    strHotSpare = ""
    Next
    ' Return Array Output
    GetHPArray = Left(strNewList, Len(strNewList) - 1)
    Exit Function
    Else ' "output.txt" Is Locked
    ' Close File
    Set objHPOutputFile = Nothing
    ' Kill Remote Connection
    Set objGetHPArray = objHPShell.Exec("net use \\" & strComputer2 & "\C$ /delete /yes")
    Do While (objGetHPArray.Status = 0)
    WScript.Sleep(500)
    Loop
    GetHPArray = ""
    Exit Function
    End If
    Else ' "output.txt" Does not Exist
    ' Kill Remote Connection
    Set objGetHPArray = objHPShell.Exec("net use \\" & strComputer2 & "\C$ /delete /yes")
    Do While (objGetHPArray.Status = 0)
    WScript.Sleep(500)
    Loop
    GetHPArray = ""
    Exit Function
    End If
    Else ' "Array Manager Does not Exist
    ' Input not Available
    Set objGetHPArray = objHPShell.Exec("net use \\" & strComputer2 & "\C$ /delete /yes")
    Do While (objGetHPArray.Status = 0)
    WScript.Sleep(500)
    Loop
    GetHPArray = ""
    Exit Function
    End If
    End Function
    '--------------------Functions (End)--------------------'
    ' Set Excel Attributes
    Const xlVAlignTop = -4160
    Set objRange2 = objWorksheet.UsedRange
    objRange2.VerticalAlignment = xlVAlignTop
    ' Set Font Attributes
    objXLA.Cells.Font.Size = 8
    objXLA.Cells.Font.Name = "Arial"
    objXLA.Cells.Font.ColorIndex = 11
    objXLA.Cells.EntireColumn.AutoFit
    objXLA.Cells(1, 9).ColumnWidth = 30 ' RAM Slots
    objXLA.Cells(1, 11).ColumnWidth = 40 ' NIC Port
    objXLA.Cells(1, 13).ColumnWidth = 25 ' Connection Name
    objXLA.Cells(1, 14).ColumnWidth = 25 ' Interface IP's
    objXLA.Cells(1, 15).ColumnWidth = 25 ' Virtual IP's
    objXLA.Cells(1, 16).ColumnWidth = 15 ' DNS1
    objXLA.Cells(1, 17).ColumnWidth = 15 ' DNS2
    objXLA.Cells(1, 18).ColumnWidth = 15 ' Interface Type
    objXLA.Cells.HorizontalAlignment = 2 ' Drive Count
    objXLA.Cells(1, 20).ColumnWidth = 20 ' Virtual IP's
    objXLA.Cells(1, 21).ColumnWidth = 20 ' Virtual IP's
    ' Save
    set objFSO2 = CreateObject("Scripting.FileSystemObject")
    strFileName = objFSO2.getAbsolutePathName("") & "\Scan Results.xls"
    objWorkbook.SaveAs(strFileName)
    objWorkbook.Close
    objXLA.Quit
    ' Notify User
    WScript.Echo "Process Completed (" & Now & ")"
    ' Close Program
    WScript.Quit(0)

    I Need my script modified to run this script and output to CSV but its so big I am not sure where to start. I don't need it in XLS at all, and I can add my own headers, cell sizes and colors, etc. so It should just output the data to a simple CSV. 
    On Error Resume Next
    Dim PUBOSVer ' Global OS Version
    ' Open File For Writing
    Set WshNetwork = WScript.CreateObject("WScript.Network")
    Const ForReading = 1
    ' Get Server List
    strServerFilename = "servers.txt"
    Set objFSO = CreateObject("Scripting.FileSystemObject")
    If objFSO.FileExists(strServerFilename) Then
    ' Open Servers File
    Set objServers = objFSO.OpenTextFile(strServerFilename, ForReading)
    Else
    ' Server File is missing: Exit
    intMsg = MsgBox("File: " & Chr(34) & UCASE(strServerFilename) & Chr(34) & _
    " is either " & _
    "Missing or Damaged!" & vbcrlf & _
    vbcrlf & _
    "This Script will now Exit.", vbCritical, "Server File Error")
    WScript.Quit(0)
    End If
    Do Until objServers.AtEndOfStream
    strNewServer = Trim(objServers.ReadLine)
    strServerList = strServerList & strNewServer & vbcrlf
    intServerCnt = intServerCnt + 1
    Loop
    ' Enumerate Server Array
    For a = 0 To intServerCnt - 1
    strServer = Split(strServerList, vbcrlf)
    Next
    ' Create Excel Spreadsheet
    Set objXLA = CreateObject("Excel.Application")
    objXLA.Visible = False
    objXLA.DisplayAlerts = False
    Set objWorkbook = objXLA.Workbooks.Add()
    Set objWorksheet = objWorkbook.Worksheets(1)
    'Excel Constants
    Const xlEdgeLeft = 7
    Const xlContinuous = 1
    Const xlNone = -4142
    Const xlMedium = -4138
    Const xlThin = 2
    'Set Headers
    ' System Information
    objXLA.Cells(1,1).Value = "Service ID"
    objXLA.Cells(1,2).Value = "Company Name"
    objXLA.Cells(1,3).Value = "Manufacturer"
    objXLA.Cells(1,4).Value = "Model"
    objXLA.Cells(1,5).Value = "Operating System"
    ' Processors
    objXLA.Cells(1,6).Value = "Processor Type"
    objXLA.Cells(1,7).Value = "Processors"
    ' RAM
    objXLA.Cells(1,8).Value = "RAM"
    objXLA.Cells(1,9).Value = "Slots"
    objXLA.Cells(1,10).Value = "Max Capacity"
    ' Network
    objXLA.Cells(1,11).Value = "NIC Port"
    objXLA.Cells(1,12).Value = "Speed"
    objXLA.Cells(1,13).Value = "Connection Name"
    objXLA.Cells(1,14).Value = "Primary IP"
    objXLA.Cells(1,15).Value = "Virtual IP"
    objXLA.Cells(1,16).Value = "Primary DNS"
    objXLA.Cells(1,17).Value = "Secondary DNS"
    ' Hard Disks
    objXLA.Cells(1,18).Value = "Interface"
    objXLA.Cells(1,19).Value = "Physical Disks"
    objXLA.Cells(1,20).Value = "Disk Size"
    objXLA.Cells(1,21).Value = "Fault Tolerant"
    objXLA.Cells(1,22).Value = "Hot Spare"
    ' Set Top Line
    objXLA.Cells(1, 1).EntireRow.Font.Bold = True
    objXLA.Cells(1, 1).EntireRow.Font.Underline = True
    For b = 0 To UBound(strServer) - 1
    strServerParts = Split(strServer(b), " ")
    strComputer = strServerParts(0)
    ' Parse Server Information
    If UBound(strServerParts) = 2 Then
    strUsername = Trim(strServerParts(1))
    strPassword = Trim(strServerParts(2))
    End If
    ' Create Connection Object
    Set objWMIService = Nothing
    Set objSWbemLocator = CreateObject("WbemScripting.SWbemLocator")
    Set objWMIService = objSWbemLocator.ConnectServer _
    (strComputer, "root\cimv2", strUsername, strPassword)
    objWMIServices.Security_.ImpersonationLevel = 3
    ' Check if Server Exists
    For intWMICheck = 0 To 15
    If Not objWMIService Is Nothing Then
    Exit For
    Else
    WScript.Sleep(1000)
    End If
    Next
    ' Server Exists
    If intWMICheck < 15 Then
    ' Get CPU Information
    Set colProcessor = objWMIService.ExecQuery("SELECT * FROM Win32_Processor")
    For Each colProc In colProcessor
    strManuf = colProc.Manufacturer
    strDescription = ProcessorName(colProc.Name)
    strClockSpeed = colProc.CurrentClockSpeed
    strSocket = strSocket & colProc.SocketDesignation & vbcrlf
    strProcID = strProcID & colProc.ProcessorID & vbcrlf
    strUniqueID = strUniqueID & colProc.UniqueID & vbcrlf
    ProcCount = ProcCount + 1
    Next
    ' Determine if Hyperthreading is Enabled
    strHTStatus = GetHTStatus(strSocket, ProcCount, strProcID, strUniqueID)
    ' DC / HT Results
    If strHTStatus = "True" Then
    If InStr(strManuf, "Intel") Then
    strDescription = strDescription & " (Dual Core or H/T)"
    Else
    strDescription = strDescription & " (Dual Core)"
    End If
    ProcCount = ProcCount / 2
    End If
    ' Export Information
    Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
    Set colCS = objWMIService.ExecQuery("Select * from Win32_ComputerSystem",,48)
    ' Write Basic System Information
    For Each objItem in colCS
    Set colOS = objWMIService.ExecQuery("Select * from Win32_OperatingSystem",,48)
    For Each objItemOS in colOS
    ' Get SP Version
    If objItemOS.CSDVersion <> "" Then
    strSPVersion = objItemOS.CSDVersion
    Else
    strSPVersion = "No Service Packs Installed"
    End If
    If objItemOS.LastBootUpTime <> "" Then
    strLastBoot = DateConvert(objItemOS.LastBootUpTime)
    Else
    strLastBoot = "N/A"
    End If
    ' Set OS Version Information
    PUBOSVer = objItemOS.Caption
    objXLA.Cells(b + 2, 1).Value = objItemOS.csname
    objXLA.Cells(b + 2, 3).Value = objItem.Manufacturer
    objXLA.Cells(b + 2, 4).Value = objItem.Model
    objXLA.Cells(b + 2, 5).Value = PUBOSVer & " - " & strSPVersion
    objXLA.Cells(b + 2, 6).Value = strDescription
    objXLA.Cells(b + 2, 7).Value = ProcCount
    objXLA.Cells(b + 2, 8).Value = MemoryConvert(objItem.TotalPhysicalMemory)
    Next
    Next
    ' Get Memory Breakdown
    Dim strMemBreak
    strMemBreak = Split(MemoryBreakdown(), vbcrlf)
    n = 0
    For n = 0 To UBound(strMemBreak) - 1
    strSlots = strSlots & strMemBreak(n) & Chr(10)
    Next
    strMaxCapacity = strMemBreak(UBound(strMemBreak))
    objXLA.Cells(b + 2, 9).Value = Left(strSlots, Len(strSlots) - 1)
    objXLA.Cells(b + 2, 10).Value = strMaxCapacity
    ' Dispose
    strMemBreak = ""
    strMaxCapacity = ""
    strSlots = ""
    '--------------Computer Information (End)------------------'
    '-------------Partition Information (Start)----------------'
    ' Get Drive Count
    Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
    Set DiskItemsParent = objWMIService.ExecQuery("Select * from Win32_DiskDrive")
    intCount = DiskItemsParent.Count
    ' Process Drives
    intDriveMark = 0
    For i = 0 To intCount - 1
    Set DiskItems = objWMIService.ExecQuery("Select * from Win32_DiskDrive WHERE Index = " & i)
    For Each diskItem in DiskItems
    ' Convert Drive Size
    If diskItem.Size <> "" Then strSize = strSize & ByteConvert(diskItem.Size) & Chr(10) Else strSize = "N/A" & Chr(10)
    If diskItem.StatusInfo <> "" Then strStsInfo = diskItem.StatusInfo Else strStsInfo = "N/A"
    If diskItem.SCSIBus <> "" Then strSCSIBus = diskItem.SCSIBus Else strSCSIBus = "N/A"
    If diskItem.SCSILogicalUnit <> "" Then strSCSILog = diskItem.SCSILogicalUnit Else strSCSILog = "N/A"
    If diskItem.SCSIPort <> "" Then strSCSIPort = diskItem.SCSIPort Else strSCSIPort = "N/A"
    If diskItem.SCSITargetId <> "" Then strSCSITarget = diskItem.SCSITargetId Else strSCSITarget = "N/A"
    ' Get Model
    strModel = Split(diskItem.Model, " ")
    ' Detect HP Array
    If (UCase(strModel(0)) = "HP" Or UCase(strModel(0)) = "COMPAQ") And intDriveMark = 0 Then
    strGetHPArray = GetHPArray(strComputer, strUsername, strPassword)
    If strGetHPArray <> "" Then
    strSplitHP = Split(strGetHPArray, Chr(13))
    For a = 0 To UBound(strSplitHP)
    strSplitResult = Split(strSplitHP(a), ":")
    i = i + 1
    strDriveCount = strDriveCount & Trim(strSplitResult(0)) & Chr(10)
    strDriveSize = strDriveSize & Trim(strSplitResult(1)) & Chr(10)
    strDriveFault = strDriveFault & Trim(strSplitResult(2)) & Chr(10)
    strDriveSpare = strDriveSpare & Trim(strSplitResult(3)) & Chr(10)
    strInterface = strInterface & "HP SCSI" & Chr(10)
    Next
    ' Set Controller Output
    objXLA.Cells(b + 2, 19).Value = Trim(Left(strDriveCount, Len(strDriveCount) - 1))
    objXLA.Cells(b + 2, 20).Value = Trim(Left(strDriveSize, Len(strDriveSize) - 1))
    objXLA.Cells(b + 2, 21).Value = Trim(Left(strDriveFault, Len(strDriveFault) - 1))
    objXLA.Cells(b + 2, 22).Value = Trim(Left(strDriveSpare, Len(strDriveSpare) - 1))
    intDriveMark = 1 ' Mark That Data was Obtained
    Else
    strDriveCount = strDriveCount & "1" & Chr(10)
    strDriveSize = strDriveSize & strSize & Chr(10)
    strDriveFault = strDriveFault & "N/A" & Chr(10)
    strDriveSpare = strDriveSpare & "N/A" & Chr(10)
    strInterface = strInterface & "HP SCSI " & Chr(10)
    ' Set Controller Output
    intDriveMark = 1 ' Mark That Another Pass is Invalid
    ' Set Controller Output
    objXLA.Cells(b + 2, 19).Value = Trim(Left(strDriveCount, Len(strDriveCount) - 1))
    objXLA.Cells(b + 2, 20).Value = Trim(Left(strDriveSize, Len(strDriveSize) - 1))
    objXLA.Cells(b + 2, 21).Value = Trim(Left(strDriveFault, Len(strDriveFault) - 1))
    objXLA.Cells(b + 2, 22).Value = Trim(Left(strDriveSpare, Len(strDriveSpare) - 1))
    End If
    Else
    strDriveCount = strDriveCount & "1" & Chr(10)
    strDriveSize = strDriveSize & strSize & Chr(10)
    strDriveFault = strDriveFault & "N/A" & Chr(10)
    strDriveSpare = strDriveSpare & "N/A" & Chr(10)
    ' Set Controller Output
    intDriveMark = 1 ' Mark That Another Pass is Invalid
    ' Set Controller Output
    objXLA.Cells(b + 2, 19).Value = Trim(Left(strDriveCount, Len(strDriveCount) - 1))
    objXLA.Cells(b + 2, 20).Value = Trim(Left(strDriveSize, Len(strDriveSize) - 1))
    objXLA.Cells(b + 2, 21).Value = Trim(Left(strDriveFault, Len(strDriveFault) - 1))
    objXLA.Cells(b + 2, 22).Value = Trim(Left(strDriveSpare, Len(strDriveSpare) - 1))
    ' Set Interface
    If diskItem.InterfaceType = "IDE" Then
    strInterface = strInterface & "ATA" & Chr(10)
    Else
    strInterface = strInterface & "SATA/SCSI" & Chr(10)
    End If
    End If
    ' Set Cell Value "Interface"
    objXLA.Cells(b + 2, 18).Value = Left(strInterface, Len(strInterface) - 1)
    Next
    ' Dispose Drive Sizes
    strDriveSize = ""
    Next
    ' Dispose Drive Values
    strDriveCount = ""
    strDriveFault = ""
    strDriveSpare = ""
    strInterface = ""
    '----Partition Information (End)---------------------------'
    '----Network Information (Start)---------------------------'
    Set colItems = objWMIService.ExecQuery("Select * from Win32_NetworkAdapter")
    i = 1
    eth = 0
    Dim STOREDIP(0)
    intNum = 0
    For Each objItem in colItems
    If objItem.NetConnectionStatus <> "" Then
    ' Determine Connection Status
    If objItem.NetConnectionStatus = 0 Then
    strNetStat = "Disabled"
    ElseIf objItem.NetConnectionStatus = 2 Then
    strNetStat = "Connected"
    ElseIf objItem.NetConnectionStatus = 7 Then
    strNetStat = "Disconnected"
    Else
    strNetStat = "Unknown"
    End If
    If objItem.NetConnectionStatus <> 0 Then
    ' Get Network Card Information
    Const HKEY_LOCAL_MACHINE = &H80000002
    strKeyPath1 = "SYSTEM\CurrentControlSet\Services\Tcpip\Parameters"
    strKeyPath2 = "SYSTEM\CurrentControlSet\Services\NetBT\Parameters"
    strHostEntry = "Hostname"
    strDomainEntry = "Domain"
    strNodeEntry = "DhcpNodeType"
    strRoutingEntry = "IPEnableRouter"
    Set objReg = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & _
    strComputer & "\root\default:StdRegProv")
    objReg.GetStringValue HKEY_LOCAL_MACHINE,strKeyPath1,strHostEntry,strHostname
    objReg.GetStringValue HKEY_LOCAL_MACHINE,strKeyPath1,strDomainEntry,strDomain
    objReg.GetDWORDValue HKEY_LOCAL_MACHINE,strKeyPath2,strNodeEntry,dwNodeType
    objReg.GetDWORDValue HKEY_LOCAL_MACHINE,strKeyPath1,strRoutingEntry,dwIPRouting
    Select Case dwNodeType
    Case 4 strNodeType = "Mixed"
    Case 8 strNodeType = "Hybrid"
    Case Else strNodeType = dwNodeType
    End Select
    If dwIPRouting = 0 Then
    strIPRouting = "No"
    ElseIf dwIPRouting = 1 Then
    strIPRouting = "Yes"
    Else
    strIPRouting = "?"
    End If
    Set colFirstNicConfig = objWMIService.ExecQuery _
    ("SELECT * FROM Win32_NetworkAdapterConfiguration WHERE IPEnabled = True")
    For Each objFirstNicConfig In colFirstNicConfig
    strDnsWins = objFirstNicConfig.DNSEnabledForWINSResolution
    Next
    Set colNicConfigs = objWMIService.ExecQuery _
    ("SELECT * FROM Win32_NetworkAdapterConfiguration WHERE IPEnabled = True")
    ' Display per-adapter settings.
    For Each objNicConfig In colNicConfigs
    intIndex = objNicConfig.Index
    Set objNic = objWMIService.Get("Win32_NetworkAdapter.DeviceID=" & intIndex)
    ' Connection Name
    If GetOsVer > 5 Then
    ' Works only in XP / 2003
    strNetConn = objNic.NetConnectionID
    ElseIf GetOsVer = 5 Then
    strNetConn = ""
    ' Get Home Drive of Remote Server
    Set objShell = CreateObject("WScript.Shell")
    Set objEtherName = objShell.Exec("cmd /c ipconfig | find " & Chr(34) & "Ethernet" & Chr(34))
    strEtherName = objEtherName.StdOut.ReadAll()
    strEtherParse = Split(strEtherName, Chr(13))
    strEtherConn = Split(strEtherParse(eth), " ")
    For y = 2 To UBound(strEtherConn)
    strNetConn = strNetConn & " " & strEtherConn(y)
    Next
    ' Trim Connection Name
    strNetConn = Left(Trim(strNetConn), Len(Trim(strNetConn)) - 1)
    Else
    strNetConn = ""
    End If
    ' IP Addresses
    strIPAddresses = ""
    If Not IsNull(objNicConfig.IPAddress) Then
    For Each strIPAddress In objNicConfig.IPAddress
    strIPAddresses = strIPAddresses & strIPAddress & " "
    Next
    End If
    strIPCollection = Split(strIPAddresses, " ")
    ' Subnets
    strIPSubnets = ""
    If Not IsNull(objNicConfig.IPSubnet) Then
    For Each strIPSubnet In objNicConfig.IPSubnet
    strIPSubnets = strIPSubnets & strIPSubnet & " "
    Next
    End If
    strSMCollection = Split(strIPSubnets, " ")
    ' Virtual IP's
    strVirtual = ""
    If UBound(strIPCollection) > 1 Then
    For IPCount = 1 To UBound(strIPCollection) - 1
    strVirtual = strVirtual & (strIPCollection(IPCount) & " / " & strSMCollection(IPCount)) & Chr(10)
    Next
    strVirtual = Left(strVirtual, Len(strVirtual) - 1)
    End If
    If Trim(strVirtual) = "" Then strVirtual = "N/A"
    ' Gateways
    strDefaultIPGateways = ""
    If Not IsNull(objNicConfig.DefaultIPGateway) Then
    For Each strDefaultIPGateway In objNicConfig.DefaultIPGateway
    strDefaultIPGateways = strDefaultIPGateways & strDefaultIPGateway & " "
    Next
    Else
    strDefaultIPGateways = "N/A"
    End If
    ' If IP is repeated, and was already reported.
    intSkipLoop = 0
    If Trim(strNetConn) <> "" Then
    For j = 0 To intNum - 1
    If STOREDIP(j) = strIPAddresses Then
    intSkipLoop = 1
    Exit For
    End If
    Next
    If intSkipLoop = 0 Then
    ReDim Preserve STOREDIP(intNum)
    STOREDIP(intNum) = strIPAddresses
    intNum = intNum + 1
    End If
    Else
    intSkipLoop = 1
    End If
    ' DNS
    strDNSServerSearchOrder = ""
    If Not IsNull(objNicConfig.DNSServerSearchOrder) Then
    For Each strDNSServer In objNicConfig.DNSServerSearchOrder
    strDNSServerSearchOrder = strDNSServerSearchOrder & strDNSServer & " "
    Next
    strDNS = Split(strDNSServerSearchOrder, " ")
    strDNS1 = strDNS(0)
    If Trim(strDNS1) = "" Then strDNS1 = "N/A"
    If UBound(strDNS) > 1 Then
    strDNS2 = strDNS(1)
    Else
    strDNS2 = "N/A"
    End If
    Else
    strDNS1 = "N/A"
    strDNS2 = "N/A"
    End If
    ' Run Output Process
    If intSkipLoop = 0 Then
    ' Connection Speed
    strSpeed = "Unknown"
    Set objWMIService2 = objSWbemLocator.ConnectServer _
    (strComputer, "root\WMI", strUsername, strPassword)
    objWMIServices.Security_.ImpersonationLevel = 3
    Set listAdapters = objWMIService2.ExecQuery("SELECT * FROM MSNdis_LinkSpeed")
    Set enumAdapters = objWMIService2.ExecQuery("SELECT * FROM MSNdis_EnumerateAdapter")
    For Each objAdapter in listAdapters
    For Each objEnum in enumAdapters
    intEnum = Len(objEnum.DeviceName)
    If objNicConfig.SettingID = Right(objEnum.DeviceName, intEnum - 8) Then
    If objEnum.InstanceName = objAdapter.InstanceName Then
    intLength = Len(objAdapter.NdisLinkSpeed/10000)
    If intLength > 3 Then
    strSpeed = Left(objAdapter.NdisLinkSpeed/10000, intLength - 3)
    strSpeed = strSpeed & ".0 Gbps"
    Else
    strSpeed = objAdapter.NdisLinkSpeed/10000 & " Mbps"
    End If
    End If
    End If
    Next
    Next
    strTotalDesc = strTotalDesc & objNicConfig.Description & Chr(10)
    strTotalSpeed = strTotalSpeed & strSpeed & Chr(10)
    strTotalNetConn = strTotalNetConn & strNetConn & Chr(10)
    strPrimaryIP = strPrimaryIP & strIPCollection(0) & " / " & strSMCollection(0) & Chr(10)
    strDNSTotal1 = strDNSTotal1 & strDNS1 & Chr(10)
    strDNSTotal2 = strDNSTotal2 & strDNS2 & Chr(10)
    strTotalVirtual = strTotalVirtual & strVirtual & Chr(10)
    i = i + 1
    eth = eth + 2
    ' Dispose
    strDescription = ""
    ProcCount = 0
    strClockSpeed = ""
    strInterface = ""
    intCount = 0
    strSize = ""
    strSpeed = ""
    strIPCollection = ""
    strVirtual = ""
    strDNS = ""
    strDNS1 = ""
    strDNS2 = ""
    End If
    Next
    ' Output
    ' Trim Leading Chr(10)
    If Left(strPrimaryIP, 1) = Chr(10) Then strPrimaryIP = Right(strPrimaryIP, Len(strPrimaryIP) - 1)
    If Left(strTotalVirtual, 1) = Chr(10) Then strTotalVirtual = Right(strTotalVirtual, Len(strTotalVirtual) - 1)
    If Left(strDNSTotal1, 1) = Chr(10) Then strDNSTotal1 = Right(strDNSTotal1, Len(strDNSTotal1) - 1)
    If Left(strDNSTotal2, 1) = Chr(10) Then strDNSTotal2 = Right(strDNSTotal2, Len(strDNSTotal2) - 1)
    objXLA.Cells(b + 2, 11).Value = Trim(Left(strTotalDesc, Len(strTotalDesc) - 1))
    objXLA.Cells(b + 2, 12).Value = Trim(Left(strTotalSpeed, Len(strTotalSpeed) - 1))
    objXLA.Cells(b + 2, 13).Value = Trim(Left(strTotalNetConn, Len(strTotalNetConn) - 1))
    objXLA.Cells(b + 2, 14).Value = Trim(Left(strPrimaryIP, Len(strPrimaryIP) - 1))
    objXLA.Cells(b + 2, 15).Value = Trim(Left(strTotalVirtual, Len(strTotalVirtual) - 1))
    objXLA.Cells(b + 2, 16).Value = Trim(Left(strDNSTotal1, Len(strDNSTotal1) - 1))
    objXLA.Cells(b + 2, 17).Value = Trim(Left(strDNSTotal2, Len(strDNSTotal2) - 1))
    End If
    End If
    ' Dispose Per Loop
    strTotalDesc = ""
    strTotalSpeed = ""
    strTotalNetConn = ""
    strPrimaryIP = ""
    strDNSTotal1 = ""
    strDNSTotal2 = ""
    strTotalVirtual = ""
    Set eth = 0
    Set i = 0
    Next
    '------------Network Information (End)------------------'
    Else
    'No Data Present
    objXLA.Cells(b + 2, 1).Value = strComputer
    objXLA.Cells(b + 2, 3).Value = "Information Not Available"
    objXLA.Cells(b + 2, 1).EntireRow.Font.Bold = True
    objXLA.Cells(b + 2, 1).EntireRow.Interior.ColorIndex = 44
    End If
    ' Dispose Per Server
    ProcCount = 0
    strSocket = ""
    strProcID = ""
    strUniqueID = ""
    Set objWMIService = Nothing
    Next
    '-----------------Functions (Start)---------------------'
    ' System Memory Conversion
    Function MemoryConvert(strMem)
    Dim intLength
    Dim intExp
    Dim intSize
    Dim strSize
    Dim strMeasure
    Dim strMemory
    intLength = Len(strMem)
    If (intLength Mod 4 = 0) Then
    intExp = CInt((intLength / 3) - 2)
    Else
    intExp = CInt((intLength / 3) - 1)
    End If
    ' Convert to Lowest Integer Value
    For intCount = 1 To Len(intExp)
    chrRead = Mid(intExp, intCount, 1)
    If chrRead = "." Then
    Exit For
    Else
    strRead = strRead & chrRead
    End If
    Next
    intExp = Cint(strRead)
    intSize = CLng(strMem / (2 ^ (intExp * (10))))
    If Len(intSize) = 1 Then
    strFormat = FormatNumber(CStr(intSize), 2)
    Else
    strFormat = intSize + 1
    End If
    If (intExp = 1) Then
    strMeasure = "KB"
    ElseIf (intExp = 2) Then
    strMeasure = "MB"
    ElseIf (intExp = 3) Then
    strMeasure = "GB"
    ElseIf (intExp = 4) Then
    strMeasure = "TB"
    ElseIf (intExp = 5) Then
    strMeasure = "PB"
    ElseIf (intExp = 6) Then
    strMeasure = "EB"
    End If
    MemoryConvert = strFormat & " " & strMeasure
    End Function
    ' System Byte Conversion
    Function ByteConvert(strMem)
    Dim intLength
    Dim intExp
    Dim intSize
    Dim strSize
    Dim strMeasure
    Dim strMemory
    intLength = Len(strMem)
    If (intLength Mod 3 = 0) Then
    intExp = (intLength / 3) - 1
    Else
    intExp = (intLength / 3)
    End If
    ' Convert to Lowest Integer Value
    For intCount = 1 To Len(intExp)
    chrRead = Mid(intExp, intCount, 1)
    If chrRead = "." Then
    Exit For
    Else
    strRead = strRead & chrRead
    End If
    Next
    intExp = Cint(strRead)
    intSize = CLng(strMem / (2 ^ (intExp * (10))))
    strFormat = FormatNumber(CStr(intSize), 2)
    If (intExp = 1) Then
    strMeasure = "KB"
    ElseIf (intExp = 2) Then
    strMeasure = "MB"
    ElseIf (intExp = 3) Then
    strMeasure = "GB"
    ElseIf (intExp = 4) Then
    strMeasure = "TB"
    ElseIf (intExp = 5) Then
    strMeasure = "PB"
    ElseIf (intExp = 6) Then
    strMeasure = "EB"
    End If
    ByteConvert = strFormat & " " & strMeasure
    End Function
    ' System RAID Byte Conversion
    Function ByteConvertRAID(strMem)
    Dim intLength
    Dim intExp
    Dim intSize
    Dim strSize
    Dim strMeasure
    Dim strMemory
    intLength = Len(strMem)
    If (intLength Mod 3 = 0) Then
    intExp = (intLength / 3) - 1
    Else
    intExp = (intLength / 3)
    End If
    ' Convert to Lowest Integer Value
    For intCount = 1 To Len(intExp)
    chrRead = Mid(intExp, intCount, 1)
    If chrRead = "." Then
    Exit For
    Else
    strRead = strRead & chrRead
    End If
    Next
    intExp = Cint(strRead)
    intSize = (strMem / (2 ^ (intExp * (10))))
    strFormat = FormatNumber(CStr(intSize), 2)
    If (intExp = 0) Then
    strMeasure = "MB"
    ElseIf (intExp = 1) Then
    strMeasure = "GB"
    ElseIf (intExp = 2) Then
    strMeasure = "TB"
    ElseIf (intExp = 3) Then
    strMeasure = "PB"
    ElseIf (intExp = 4) Then
    strMeasure = "EB"
    End If
    ByteConvertRAID = strFormat & " " & strMeasure
    End Function
    ' Trim Processor Description
    Function ProcessorName(strName)
    Dim intCounter
    Dim strRead
    Dim chrRead, chrReadMore
    For intCounter = 1 to Len(strName)
    chrRead = Mid(strName, intCounter, 1)
    chrReadMore = Mid(strName, intCounter + 1, 1)
    If ((chrRead <> " ") Or ((chrRead = " ") And (chrReadMore <> " "))) Then
    strRead = strRead & chrRead
    End If
    Next
    ProcessorName = Trim(strRead)
    End Function
    ' Get Hyper-Threading Status
    Function GetHTStatus(strName, intProc, strID, strUnique)
    strNameArray = Split(strName, vbcrlf)
    strIDArray = Split(strID, vbcrlf)
    strUniqueList = Split(strUnique, vbcrlf)
    intTotal = 0
    ' Check Socket Designation
    For i = 0 To UBound(strNameArray) - 1
    intMark = 1
    ' Check for Redundancies
    For j = i + 1 To UBound(strNameArray) - 1
    If strNameArray(i) = strNameArray(j) Then
    intMark = 0
    End If
    Next
    ' If Redundant Unique ID's Exist
    For j = i + 1 To UBound(strNameArray) - 1
    If strUniqueList(i) <> "" And strUniqueList(j) <> "" And _
    (strUniqueList(i) <> strUniqueList(j)) Then
    intMark = 1
    End If
    Next
    ' Check for NULL ProcessorID
    If Trim(strIDArray(i)) = "0000000000000000" Then
    intMark = 0
    End If
    ' Calculate Total
    If intMark = 1 Then
    intTotal = intTotal + intMark
    End If
    Next
    ' Compare Results
    If intProc = 2 * intTotal Then
    GetHTStatus = "True"
    Else
    GetHTStatus = "False"
    End If
    End Function
    ' Get Memory Breakdown
    Function MemoryBreakdown
    Set colPMAItems = objWMIService.ExecQuery("Select * from Win32_PhysicalMemoryArray",,48)
    For Each objPMAItem in colPMAItems
    lngMax = CLng(objPMAItem.MaxCapacity)
    intCount = CInt(objPMAItem.MemoryDevices)
    Next
    ReDim Preserve strPMArray(intCount)
    Set colPMItems = objWMIService.ExecQuery("Select * from Win32_PhysicalMemory",,48)
    For Each objPMItem in colPMItems
    strValue = strValue & objPMItem.DeviceLocator & ": "
    strValue = strValue & objPMItem.Capacity / 2^20 & "MB, "
    strValue = strValue & objPMItem.Speed & "MHz"
    strPMArray(TrimTrailingNumber(objPMItem.Tag)) = strValue
    strValue = ""
    Next
    j = 0
    strResult = ""
    For j = 0 To intCount - 1
    If Trim(strPMArray(j)) = "" Then strPMArray(j) = "<Empty>"
    strResult = strResult & strPMArray(j) & vbcrlf
    Next
    strResult = strResult & (lngMax / 2^10) & "MB"
    MemoryBreakdown = strResult
    End Function
    ' Get Part Name
    Function ExtractPartName(strName)
    Dim chrRead
    Dim strRead
    Dim i
    For i = 2 To Len(strName)
    chrRead = Mid(strName, Len(strName) - (i - 1), 1)
    If chrRead <> Chr(34) Then
    strRead = chrRead & strRead
    Else
    Exit For
    End If
    Next
    ExtractPartName = strRead
    End Function
    ' Get Trailing Number
    Function TrimTrailingNumber(strNum)
    Dim chrRead
    Dim strRead
    Dim intLen
    strNum = Trim(strNum)
    intLen = Len(strNum)
    i = 1
    For i = 1 To intLen
    chrRead = Mid(strNum, intLen - (i - 1), 1)
    If IsNumeric(chrRead) = "True" Then
    strRead = chrRead & strRead
    Else
    Exit For
    End If
    Next
    TrimTrailingNumber = strRead
    End Function
    ' Function: WMIDateStringToDate(dtmDate)
    Function WMIDateToString(dtmDate)
    WMIDateToString = CDate(Mid(dtmDate, 5, 2) & "/" & _
    Mid(dtmDate, 7, 2) & "/" & _
    Left(dtmDate, 4) & " " & _
    Mid(dtmDate, 9, 2) & ":" & _
    Mid(dtmDate, 11, 2) & ":" & _
    Mid(dtmDate, 13, 2))
    End Function
    ' Function: GetOsVer
    Function GetOsVer
    Set colOperatingSystems = objWMIService.ExecQuery _
    ("Select * from Win32_OperatingSystem")
    For Each objOperatingSystem In colOperatingSystems
    GetOSVer = CSng(Left(objOperatingSystem.Version, 3))
    Next
    End Function
    ' Function: GetHPArray
    Function GetHPArray(strComputer2, strUsername2, strPassword2)
    ' Check for 64-bit Windows
    If InStr(PUBOSVer, "x64") Then
    strCompaq = "Program Files (x86)\Compaq\Cpqacuxe\Bin"
    Else
    strCompaq = "Program Files\Compaq\Cpqacuxe\Bin"
    End If
    ' Create Connection Object
    Set objWMIServiceRem = objWMIService.Get("Win32_Process")
    ' Confirm Location of Compaq Array Manager
    Set objHPShell = CreateObject("WScript.Shell")
    Set objHPFSO = CreateObject("Scripting.FileSystemObject")
    Set WshNetwork2 = WScript.CreateObject("WScript.Network")
    WshNetwork2.MapNetworkDrive "", "\\" & strComputer2 & "\C$" ,,strUsername2, strPassword2
    strProgram = "\\" & strComputer2 & "\C$\" & strCompaq & "\cpqacuxe.exe"
    ' Ensure Access is Possible
    If objHPFSO.FileExists(strProgram) Then
    ' Process Array Config
    strProcess = Chr(34) & "C:\" & strCompaq & "\cpqacuxe.exe" & Chr(34) & " -c c:\output.txt"
    Process = objWMIServiceRem.Create(strProcess, null, null, intProcessID)
    ' Check for "output.txt"
    For intTimerHP = 0 To 10
    If objFSO.FileExists("\\" & strComputer2 & "\C$\output.txt") Then
    Exit For
    Else
    WScript.Sleep(1000)
    End If
    Next
    ' Process Output
    If intTimerHP < 10 Then
    ' Check for Locked Output File
    Set objHPOutputFile = objHPFSO.GetFile("\\" & strComputer2 & "\C$\output.txt")
    If objHPOutputFile.Size <> 0 Then
    ' Close File
    Set objHPOutputFile = Nothing
    ' Continue Processesing File
    Set objHPInputFile = objHPFSO.OpenTextFile("\\" & strComputer2 & "\C$\output.txt", ForReading)
    Do Until objHPInputFile.AtEndOfStream
    strHPArray = strHPArray & objHPInputFile.ReadLine & vbcrlf
    Loop
    ' Close Input File
    objHPInputFile.Close
    ' Close Link to Server
    objHPFSO.DeleteFile("\\" & strComputer2 & "\C$\output.txt")
    Set objGetHPArray = objHPShell.Exec("net use \\" & strComputer2 & "\C$ /delete /yes")
    Do While (objGetHPArray.Status = 0)
    WScript.Sleep(500)
    Loop
    ' Create String Array
    strHPParse = Split(strHPArray, vbcrlf)
    ' Parse For Individual RAID Arrays
    Dim strArrayList()
    z = 0
    For i = 0 To UBound(strHPParse)
    j = 0
    ' Array and Drives
    If InStr(strHPParse(i), "Array Specifications") Then
    ReDim Preserve strArrayList(z)
    strArrayList(z) = strArrayList(z) & strHPParse(i) & vbcrlf
    For j = i + 1 To Ubound(strHPParse)
    If InStr(strHPParse(j), "Array Specifications") Then
    Exit For
    Else
    strArrayList(z) = strArrayList(z) & strHPParse(j) & vbcrlf
    End If
    Next
    z = z + 1
    End If
    Next
    ' Process Each RAID Array
    x = 0
    For x = 0 To UBound(strArrayList)
    strListParse = Split(strArrayList(x), vbcrlf)
    For y = 0 To UBound(strListParse)
    ' Drives
    If Left(strListParse(y), 6) = "Drive=" Then
    strDrives = ""
    strDrives = Split(strListParse(y), ",")
    k = 0
    For j = 0 To UBound(strDrives)
    k = k + 1
    Next
    strDriveCount = k ' For Output
    End If
    ' Hot Spare
    If InStr(strListParse(y), "OnlineSpare=") Then
    If InStr(strListParse(y), "OnlineSpare= No") Then
    strHotSpare = strHotSpare & "N" ' For Output
    Else
    strHotSpare = strHotSpare & "Y" ' For Output
    End If
    End If
    ' Logical Drives
    If InStr(strListParse(y), "Logical Drive Specifications") Then
    ' Find First Logical Drive
    strRAID = Split(strListParse(y + 2), " ")
    strRAIDResult = strRAIDResult & "RAID " & strRAID(1) & " / " ' For Output
    strGetDrive = Split(strListParse(y + 3), " ")
    strRAIDSize = strRAIDSize & ByteConvertRAID(strGetDrive(1)) & " / " ' For Output
    End If
    Next
    ' Process Results
    strRAIDSize = Left(strRAIDSize, Len(strRAIDSize) - 3)
    strRAIDResult = Left(strRAIDResult, Len(strRAIDResult) - 3)
    strNewList = strNewList & strDriveCount & _
    ":" & strRAIDSize & ":" & strRAIDResult & ":" & strHotSpare & Chr(13)
    ' Dispose Array Variables
    strDriveCount = ""
    strRAIDSize = ""
    strRAIDResult = ""
    strHotSpare = ""
    Next
    ' Return Array Output
    GetHPArray = Left(strNewList, Len(strNewList) - 1)
    Exit Function
    Else ' "output.txt" Is Locked
    ' Close File
    Set objHPOutputFile = Nothing
    ' Kill Remote Connection
    Set objGetHPArray = objHPShell.Exec("net use \\" & strComputer2 & "\C$ /delete /yes")
    Do While (objGetHPArray.Status = 0)
    WScript.Sleep(500)
    Loop
    GetHPArray = ""
    Exit Function
    End If
    Else ' "output.txt" Does not Exist
    ' Kill Remote Connection
    Set objGetHPArray = objHPShell.Exec("net use \\" & strComputer2 & "\C$ /delete /yes")
    Do While (objGetHPArray.Status = 0)
    WScript.Sleep(500)
    Loop
    GetHPArray = ""
    Exit Function
    End If
    Else ' "Array Manager Does not Exist
    ' Input not Available
    Set objGetHPArray = objHPShell.Exec("net use \\" & strComputer2 & "\C$ /delete /yes")
    Do While (objGetHPArray.Status = 0)
    WScript.Sleep(500)
    Loop
    GetHPArray = ""
    Exit Function
    End If
    End Function
    '--------------------Functions (End)--------------------'
    ' Set Excel Attributes
    Const xlVAlignTop = -4160
    Set objRange2 = objWorksheet.UsedRange
    objRange2.VerticalAlignment = xlVAlignTop
    ' Set Font Attributes
    objXLA.Cells.Font.Size = 8
    objXLA.Cells.Font.Name = "Arial"
    objXLA.Cells.Font.ColorIndex = 11
    objXLA.Cells.EntireColumn.AutoFit
    objXLA.Cells(1, 9).ColumnWidth = 30 ' RAM Slots
    objXLA.Cells(1, 11).ColumnWidth = 40 ' NIC Port
    objXLA.Cells(1, 13).ColumnWidth = 25 ' Connection Name
    objXLA.Cells(1, 14).ColumnWidth = 25 ' Interface IP's
    objXLA.Cells(1, 15).ColumnWidth = 25 ' Virtual IP's
    objXLA.Cells(1, 16).ColumnWidth = 15 ' DNS1
    objXLA.Cells(1, 17).ColumnWidth = 15 ' DNS2
    objXLA.Cells(1, 18).ColumnWidth = 15 ' Interface Type
    objXLA.Cells.HorizontalAlignment = 2 ' Drive Count
    objXLA.Cells(1, 20).ColumnWidth = 20 ' Virtual IP's
    objXLA.Cells(1, 21).ColumnWidth = 20 ' Virtual IP's
    ' Save
    set objFSO2 = CreateObject("Scripting.FileSystemObject")
    strFileName = objFSO2.getAbsolutePathName("") & "\Scan Results.xls"
    objWorkbook.SaveAs(strFileName)
    objWorkbook.Close
    objXLA.Quit
    ' Notify User
    WScript.Echo "Process Completed (" & Now & ")"
    ' Close Program
    WScript.Quit(0)

  • How can I use a different driver for audio input and output?

    I did a search of course, and came up with something about an aggregate. I have no idea what this is, how to do it, or if it would even work for me.
    What I am trying to do is:
    1) Record into Logic Express using my Tascam US-122.
    2) Have playback come out of my computer sound system, not the Tascam.
    If I go over to the Audio setup window, I can only record when the driver is set to Tascam US-122. Likewise, I can only listen to sound when my Built-In Audio is selected. It gets rather annoying going between the two.
    So, would this aggregate thing solve my problem? If so, how do I do it? Thanks for any help!
    -allen

    Yes it should do what you want.
    Go to "Audio Midi Setup", and go to the Audio menu and click "Open Aggregate Device Editor". The interface is pretty simple but if you do get stuck, just use the help function in Audio Midi Setup, as it has a step by step guide.
    Then when you return to logic, go to the Preferences>Audio>Drivers section and select Aggregate Device as the new driver rather than either the built in sound or the tascam. Then the inputs and outputs will apply to BOTH devices.

  • SSIS: How to use one Variable as Input and Output Parameter in an Execute SQL Task

    Hello,
    i need your help,I'm working on this issue since yesterday and have no idea how to deal with it.
    As I already said in the tilte i want to start a stored procedure via a Execute SQL Task which has around 15 prameters. 10 of these should be used as input AND output value.
    As an example:
    i have three  Variable:
    var1    int        2
    var2    int     100
    var3    int     200
    the stroed procedure:
       sp_test
          @var1 int
          @var2 int output
          @var3 int output
       AS
       BEGIN
            SET @var2 = @var2 * @var1
            SET @var3 = @var3 + @var1
       END
    So in the Execute SQL Task i call the Stored Procedure as follwos:
        Exec sp_test  @var1 = ?, @var2 = ? output, @var3 = ? output
    (I use an OLE DB Connection)
    The parameter mapping is as follows:
    User::Var1        input                   numeric              0                 -1
    User::Var2        input/output         numeric              1                 -1
    User::Var3        input/output         numeric              2                 -1
    Now my problem. If i set  Var2 and Var3 as Input parameter the values are still the same after running the package. If i set them to a output value the are both Null because the procedure doesnt get any values.
    I already tried to list them a second time - like
        User::Var2        input                  numeric              1                 -1
        User::Var2        output                 numeric              1                 -1
    or i use a new variable
        User::Var2                  input                  numeric              1                 -1
        User::Var2Return        output                 numeric              1                 -1
    but i alwas get the error
    "Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done."
    Has anybody an idea how I can solve this problem?
    Thanks a lot.
    Kind Regards,
    Alice

    Hi Alain,
    thx for your answer.
    I have around 15 procedures called one after the other to calculated and modify my values. Each procedure is responsible for an other but overlapping set of variables. So i thought it would be a good idea to call them one after the other with the needed variables via a execute sql task.
    So if i use a result set, how i get my stored procedure to return 10 values? I would have to use a Function instead of a procedure, wouldn't i?
    As if i have 15 procedures this would be a lot of work.
    But thanks a lot for the idea. I think an other idea would be to create one function which calls all stored procedures and returns all the calculated values as a result set, wouldn't it?.
    Kind Regards.
    Alice

  • How can I make Apple Earphones be the Input and Output for Audio

    I have some older headphones and they aren't compatible with a Mid 2010 (Intel Core i3) 21.5 Inch iMac
    Is there some way to make Apple Earphones be the Input and Output for Audio in the iMac
    This is a problem for me personally as when I am talking to someone on Skype the iMac picks up the In-built Microphone audio, and yes the headphones I'm using do work straight from the iMac as audio output
    Any help is appreciated

    you can connect the headset to something like this
    http://www.ebay.com/itm/NEW-MaelineA-3-5mm-Female-to-2-Male-Gold-Plated-Headphon e-Mic-Audio-Y-Splitter-/381100440348
    and then connect the mic to the input and the headset to the headset port

  • Script to search all files in specified folder for multiple string text values listed in a source file and output each match to one single results txt file

    I have been searching high and low for this one.  I have a vbscript that can successfully perform the function if one file is listed.  It does a Wscript.echo on the results and if I run this via command using cscript, I can output to a text file
    that way.  However, I cannot seem to get it to work properly if I want it to search ALL the files in the folder.  At one point, I was able to have it create the output file and appear as if it worked, but it never showed any results when the script
    was executed and folder was scanned.  So I am going back to the drawing board and starting from the beginning.
    I also have a txt file that contains the list of string text entries I would like it to search for.  Just for testing, I placed 4 lines of sample text and one single matching text in various target files and nothing comes back.  The current script
    I use for each file has been executed with a few hundred string text lines I want it to search against to well over one thousand.  It might take awhile, but it works every time. The purpose is to let this run against various log files in a folder and
    let it search.  There is no deleting, moving, changing of either the target folder/files to run against, nor of the file that contains the strings to search for.  It is a search (read) only function, going thru the entire contents of the folder and
    when done, performs the loop function and onto the next file to repeat the process until all files are searched.  When completed, instead of running a cscript to execute the script and outputting the results to text, I am trying to create that as part
    of the overall script.  Saving yet another step for me to do.
    My current script is set to append to the same results file and will echo [name of file I am searching]:  No errors found.  Otherwise, the
    output shows the filename and the string text that matched.  Because the results append to it, I can only run the script against each file separately or create individual output names.  I would rather not do that if I could include it all in one.
     This would also free me from babysitting it and running each file script separately upon the other's completion.  I can continue with my job and come back later and view the completed report all in one.  So
    if I could perform this on an entire folder, then I would want the entries to include the filename, the line number that the match occurred on in that file and the string text that was matched (each occurrence).  I don't want the entire line to be listed
    where the error was, just the match itself.
    Example:  (In the event this doesn't display correctly below, each match, it's corresponding filename and line number all go together on the same line.  It somehow posted the example jumbled when I listed it) 
    File1.txt Line 54 
    Job terminated unexpectedly
     File1.txt Line 58 Process not completed
    File1.txt
    Line 101 User input not provided
    File1.txt
    Line 105  Process not completed
    File2.txt
    No errors found
    File3.txt
    Line 35 No tape media found
    File3.txt
    Line 156 Bad surface media
    File3.txt Line 188
    Process terminated
    Those are just random fake examples for this post.
    This allows me to perform analysis on a set of files for various projects I am doing.  Later on, when the entire search is completed, I can go back to the results file and look and see what files had items I wish to follow up on.  Therefore, the
    line number that each match was found on will allow me to see the big picture of what was going on when the entry was logged.
    I actually import the results file into a spreadsheet, where further information is stored regarding each individual text string I am using.  Very useful.
    If you know how I can successfully achieve this in one script, please share.  I have seen plenty of posts out there where people have requested all different aspects of it, but I have yet to see it all put together in one and work successfully.
    Thanks for helping.

    I'm sorry.  I was so consumed in locating the issue that I completely overlooked posting what exactly I was needing  help with.   I did have one created, but I came across one that seemed more organized than what I originally created.  Later
    on I would learn that I had an error in log location on my original script and therefore thought it wasn't working properly.  Now that I am thinking that I am pretty close to achieving what I want with this one, I am just going to stick with it.
    However, I could still use help on it.  I am not sure what I did not set correctly or perhaps overlooking as a typing error that my very last line of this throws an "Expected Statement" error.  If I end with End, then it still gives same
    results.
    So to give credit where I located this:
    http://vbscriptwmi.uw.hu/ch12lev1sec7.html
    I then adjusted it for what I was doing.
    What this does does is it searches thru log files in a directory you specify when prompted.  It looks for words that are contained in another file; objFile2, and outputs the results of all matching words in each of those log files to another file:  errors.log
    Once all files are scanned to the end, the objects are closed and then a message is echoed letting you know (whether there errors found or not), so you know the script has been completed.
    What I had hoped to achieve was an output to the errors.log (when matches were found) the file name, the line number that match was located on in that file and what was the actual string text (not the whole line) that matched.  That way, I can go directly
    to each instance for particular events if further analysis is needed later on.
    So I could use help on what statement should I be closing this with.  What event, events or error did I overlook that I keep getting prompted for that.  Any help would be appreciated.
    Option Explicit
    'Prompt user for the log file they want to search
    Dim varLogPath
    varLogPath = InputBox("Enter the complete path of the logs folder.")
    'Create filesystem object
    Dim oFSO
    Set oFSO = WScript.CreateObject("Scripting.FileSystemObject")
    'Creates the output file that will contain errors found during search
    Dim oTSOut
    Set oTSOut = oFSO.CreateTextFile("c:\Scripts\errors.log")
    'Loop through each file in the folder
    Dim oFile, varFoundNone
    VarFoundNone = True
    For Each oFile In oFSO.GetFolder(varLogPath).Files
        'Verifies files scanned are log files
        If LCase(Right(oFile.Name,3)) = "log" Then
            'Open the log file
            Dim oTS
            oTS = oFSO.OpenTextFile(oFile.Path)
            'Sets the file log that contains error list to look for
            Dim oFile2
            Set oFile2 = oFSO.OpenTextFile("c:\Scripts\livescan\lserrors.txt", ForReading)
            'Begin reading each line of the textstream
            Dim varLine
            Do Until oTS.AtEndOfStream
                varLine = oTS.ReadLine
                Set objRegEx = CreateObject("VBScript.RegExp")
                objRegEx.Global = True  
                Dim colMatches, strName, strText
                Do Until oErrors.AtEndOfStream
                    strName = oFile2.ReadLine
                    objRegEx.Pattern = ".{0,}" & strName & ".{0,}\n"
                    Set colMatches = objRegEx.Execute(varLine)  
                    If colMatches.Count > 0 Then
                        For Each strMatch in colMatches 
                            strText = strText & strMatch.Value
                            WScript.Echo "Errors found."
                            oTSOut.WriteLine oFile.Name, varLine.Line, varLine
                            VarFoundNone = False
                        Next
                    End If
                Loop
                oTS.Close
                oFile2.Close
                oTSOut.Close
                Exit Do
                If VarFoundNone = True Then
                    WScript.Echo "No errors found."
                Else
                    WScript.Echo "Errors found.  Check logfile for more info."
                End If
        End if

  • How to use a bluetooth cellphone for audio input and output

    Hello, I was wondering how to set-up my Mac Book so that I can use my bluetooth cellphone for audio in and audio out. Ideally, I would like to use my handset for talking on iChat and Skype. Has anyone had any luck doing this? When I bond my cellphone these optiosn do not appear. I know that this is easy to do on a Windows machine but I am not sure about how to do it on my Mac Book.
    Thanks!

    Yes it should do what you want.
    Go to "Audio Midi Setup", and go to the Audio menu and click "Open Aggregate Device Editor". The interface is pretty simple but if you do get stuck, just use the help function in Audio Midi Setup, as it has a step by step guide.
    Then when you return to logic, go to the Preferences>Audio>Drivers section and select Aggregate Device as the new driver rather than either the built in sound or the tascam. Then the inputs and outputs will apply to BOTH devices.

  • How do I create an xControl with multiple inputs and outputs?

    Hello,
    i am trying to write a new Xcontrol Element. In the data model I can create data types using the cluster to create compound types, eg an int and an int array. But how do I create an xcontrol which has multiple data inputs and outputs?
    Kind Regards

    Limping_Twerp wrote:
    Alright: I see: An xcontrol is either an input OR an output. How do I achieve an output? Secondly: So you are saying the only Elements that can have multiple inputs and outputs are VIs?
    Can you take a few steps back and explain what you are actually trying to do. SubVIs and Xcontrols have nothing in common and it is not clear why you even try to compare them side by side (e.g. in terms of the number of connectors).
    Your questions about input or output tell us that you seems to have some misconceptions about xcontrols. Xcontrols are like regular controls, except they have some built-in intelligence that you can program. Most front panel object can be either controls or indicators and the same is true for Xcontrol. You create an Xcontrol, and after placing it on the front panel you can decide if it should be a control (where the code reads the value) or an indicator (were the code writes values to it). When you define the xcontrol facade, you also need to program how the visuals change if it is changed from control to indicator or vice versa.
    As a first step, you should opend the example finder and look at some xcontrol examples.
    Again, what are you actually trying to do? 
    LabVIEW Champion . Do more with less code and in less time .

  • How can I input read a line from a file and output it into the screen?

    How can I input read a line from a file and output it into the screen?
    If I have a file contains html code and I only want the URL, for example, www24.brinkster.com how can I read that into the buffer and write the output into the screen that using Java?
    Any help will be appreciate!
    ======START FILE default.html ========
    <html>
    <body>
    <br><br>
    <center>
    <font size=4 face=arial color=#336699>
    <b>Welcome to a DerekTran's Website!</b><br>
    Underconstructions.... <br>
    </font> </center>
    <font size=3 face=arial color=black> <br>
    Hello,<br>
    <br>
    I've been using the PWS to run the website on NT workstation 4.0. It was working
    fine. <br>
    The URL should be as below: <br>
    http://127.0.0.1/index.htm or http://localhost/index.htm
    <p>And suddently, it stops working, it can't find the connection. I tried to figure
    out what's going on, but still <font color="#FF0000">NO CLUES</font>. Does anyone
    know what's going on? Please see the link for more.... I believe that I setup
    everything correctly and the bugs still flying in the server.... <br>
    Thank you for your help.</P>
    </font>
    <p><font size=3 face=arial color=black>PeerWebServer.doc
    <br>
    <p><font size=3 face=arial color=black>CannotFindServer.doc
    <br>
    <p><font size=3 face=arial color=black>HOSTS file is not found
    <br>
    <p><font size=3 face=arial color=black>LMHOSTS file
    <br>
    <p><font size=3 face=arial color=black>How to Setup PWS on NT
    <BR>
    <p><font size=3 face=arial color=black>Issdmin doc</BR>
    Please be patient while the document is download....</font>
    <font size=3 face=arial color=black><br>If you have any ideas please drop me a
    few words at [email protected] </font><br>
    <br>
    <br>
    </p>
    <p><!--#include file="Hits.asp"--> </p>
    </body>
    </html>
    ========= END OF FILE ===============

    Hi!
    This is a possible solution to your problem.
    import java.io.*;
    class AddressExtractor {
         public static void main(String args[]) throws IOException{
              //retrieve the commandline parameters
              String fileName = "default.html";
              if (args.length != 0)      fileName =args[0];
               else {
                   System.out.println("Usage : java AddressExtractor <htmlfile>");
                   System.exit(0);
              BufferedReader in = new BufferedReader(new FileReader(new File(fileName)));
              StreamTokenizer st = new StreamTokenizer(in);
              st.lowerCaseMode(true);
              st.wordChars('/','/'); //include '/' chars as part of token
              st.wordChars(':',':'); //include ':' chars as part of token
              st.quoteChar('\"'); //set the " quote char
              int i;
              while (st.ttype != StreamTokenizer.TT_EOF) {
                   i = st.nextToken();
                   if (st.ttype == StreamTokenizer.TT_WORD) {          
                        if (st.sval.equals("href")) {               
                             i = st.nextToken(); //the next token (assumed) is the  '=' sign
                             i = st.nextToken(); //then after it is the href value.               
                             getURL(st.sval); //retrieve address
              in.close();
         static void getURL(String s) {     
              //Check string if it has http:// and truncate if it does
              if (s.indexOf("http://") >  -1) {
                   s = s.substring(s.indexOf("http://") + 7, s.length());
              //check if not mailto: do not print otherwise
              if (s.indexOf("mailto:") != -1) return;
              //printout anything after http:// and the next '/'
              //if no '/' then print all
                   if (s.indexOf('/') > -1) {
                        System.out.println(s.substring(0, s.indexOf('/')));
                   } else System.out.println(s);
    }Hope this helps. I used static methods instead of encapsulating everyting into a class.

  • How to load a text file int JEditorPane and highlight some words (Urgent !)

    I want to load a text file into a JEditorPane and then highlights some keywords such as while,if and else.I am using an EditorKit in order to style the JEditorPane. I have no difficulty while giving the input through the keyboard but lots of exceptions are thrown if i try to load the string from a file.

    Hi,
    I think the setCharacterAttributes(int offset, int length, AttributeSet s, boolean replace) will solve the problem.
    You can create your own Styled Document and set it to the Editor Pane.

Maybe you are looking for

  • HT4946 Missing Pages Documents

    Hi, yesterday, i did a back up on my iPad.  Today, all of the documents i had on Pages on my iPad are gone.  how do i get those back on my iPad

  • Quick Question re number of Contact

    Is there a limit to the number of contact names a bus Partner has; I am looking to use the activities function for contacts to track events for customers. i.e TRacking Laptops eg Customer has many laptops associated with its staff,and I need to track

  • Removing "Browse in Bridge" from File menu?

    I've accidentally clicked this countless times. I never use it and it takes forever to start up. Thanks!

  • Trying to password protect an individual section of my site.

    I'm serving my site off my home computer (not .mac). It seems like the password feature in iWeb only works if you use .mac so I decided to add a .htaccess file in one of the subfolders and I added to appropriate .htpasswd file in the Webserver direct

  • Geometry-Dimensions- Why can't I change these

    I'm Converting SD-IMX* video to MPEG**. The video always comes out as 640x480. I need the video to output as 720X480. In the Geometry pane the dimension settings are always locked-out. Program Stream is what I would like to use use, but I have tried