Advertisement

06.26.2007 at 04:19AM PDT, ID: 22657930
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

8.4

Input Past End of File (Please Help) Thank you

Asked by ymilan in VB Script

Tags: , , ,

Well, I thought I found the solution to my problem, but my code is not working as well as expected.  Wondering if someone could shed some light on this:  I'm getting Input Past End of file error when I'm trying to read the only line of text I have in a text file.  By the way, I've tried While at EOF code with a loop but am still getting a "blank" variable.  When I check the text file, I see the line of text in there, so it is not blank.  I have a couple of tests in there (basically message boxes, and I'm outputting to test1 and test2 files...would really like to output to a file which is named by the remote computer's hostname and another file which is named by the remote computer's IP address.  Here's a code snippet from a sub I created.....

Sub PS()

Const ForWriting = 2
Dim FSO
Dim FTO
Dim folderPath
Dim hostCommand
Dim IPconfigCommand
Dim hostNm
Dim objFile
Dim objReadFile
Dim objShell
Dim file1
Dim file2
Dim check
Dim check2
Dim readObject

folderPath = "C:\TOOLSQUERY"
      Set FSO = CreateObject("Scripting.FileSystemObject")
      If Not FSO.FolderExists(folderPath) Then
      Set FTO = FSO.CreateFolder(folderPath)
End If


      Set objShell = CreateObject("WScript.Shell")
      
      Set FTO = FSO.CreateTextFile("C:\TOOLSQUERY\" & IPVALUE & ".txt", ForWriting)
      file1 = "C:\TOOLSQUERY\" & IPVALUE & ".txt"      
      hostCommand = "%comspec% /c psexec.exe \\" & IPValue & " " &"-accepteula hostname > C:\TOOLSQUERY\test1.txt"
      check = objShell.Run(hostCommand,0,True)
      IF check = 0 Then      
      Set objReadFile = FSO.OpenTextFile(file1, 1)
      hostNm = objReadFile.ReadLine
      readObject = Split(hostNm , " ")
      Msgbox readObject(0)
      Else
      Msgbox "Error"
      Wscript.Quit
End IF

      Set FTO = FSO.CreateTextFile("C:\TOOLSQUERY\" & readObject(0) & ".txt", ForWriting)
      file2 = "C:\TOOLSQUERY\" & readObject(0) & ".txt"
      IPconfigCommand = "%comspec% /c psexec.exe \\" & IPValue & " " &"-accepteula ipconfig /all > C:\TOOLSQUERY.test2.txt"
      check2 = objShell.Run(IPconfigCommand,0,True)
      IF check2 = 0 Then
      Call IPCounter
      Else
      MsgBox "Error"      
      Wscript.Quit
End IF
End Sub
Start Free Trial
[+][-]06.26.2007 at 04:36AM PDT, ID: 19362645

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.26.2007 at 07:02AM PDT, ID: 19363727

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.26.2007 at 07:41AM PDT, ID: 19364108

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.26.2007 at 11:02AM PDT, ID: 19366225

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.26.2007 at 02:26PM PDT, ID: 19367978

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.26.2007 at 02:28PM PDT, ID: 19367990

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.26.2007 at 07:11PM PDT, ID: 19369305

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.26.2007 at 07:29PM PDT, ID: 19369360

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: VB Script
Tags: end, past, file, input
Sign Up Now!
Solution Provided By: RobSampson
Participating Experts: 2
Solution Grade: A
 
 
[+][-]06.27.2007 at 02:13AM PDT, ID: 19370673

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.27.2007 at 04:39AM PDT, ID: 19371302

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32