Status bar

Posted on 2005-05-17
Last Modified: 2010-04-17
I have the following script that reports on a specific file version.  I would like to add a status bar that shows the progress as it adds the output to a txt file.  How might I go about doing that?

WScript.Echo "Server name" & vbTab & "File Version"

Const ForReading = 1
Const ForWriting = 2

Set objDictionary = CreateObject("Scripting.Dictionary")
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objTextFile = objFSO.OpenTextFile("C:\servers.txt", ForReading)
Set objReportFile = objFSO.OpenTextFile("C:\report.txt", ForWriting)

i = 0
Do Until objTextFile.AtEndOfStream
   strNextLine = objTextFile.Readline
   objDictionary.Add i, strNextLine
   i = i + 1
For Each objItem in objDictionary
   Set objFSO = CreateObject("Scripting.FileSystemObject")
   objReportFile.WriteLine objDictionary.Item(objItem) & vbTab & objFSO.GetFileVersion _
("\\"& objDictionary.Item(objItem) & "\C$\Program Files\application\file.exe")                  


Question by:mchristo63
    LVL 23

    Accepted Solution

    LVL 2

    Expert Comment

    by:Mohammad Aamir Qureshi
    what about Progress bar if u use progress bar i will help u

    Author Comment


    Author Comment

    How can i insert that script into my script?

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    Purpose To explain how to place a textual stamp on a PDF document.  This is commonly referred to as an annotation, or possibly a watermark, but a watermark is generally different in that it is somewhat translucent.  Watermark’s may be text or graph…
    Entering a date in Microsoft Access can be tricky. A typo can cause month and day to be shuffled, entering the day only causes an error, as does entering, say, day 31 in June. This article shows how an inputmask supported by code can help the user a…
    In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…
    In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

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

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

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now