Click here to Skip to main content
16,014,940 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: VB6 Console APP Pin
Dave Kreskowiak7-May-04 9:52
mveDave Kreskowiak7-May-04 9:52 
GeneralRe: VB6 Console APP Pin
gasma19757-May-04 12:47
gasma19757-May-04 12:47 
QuestionNeed Help!! Ping search for computer names...Can anyone set up an yes or no to continue on this? Pin
Bri4hire5-May-04 10:04
Bri4hire5-May-04 10:04 
AnswerRe: Need Help!! Ping search for computer names...Can anyone set up an yes or no to continue on this? Pin
Dave Kreskowiak5-May-04 12:55
mveDave Kreskowiak5-May-04 12:55 
GeneralRe: Need Help!! Ping search for computer names...Can anyone set up an yes or no to continue on this? Pin
Bri4hire5-May-04 14:31
Bri4hire5-May-04 14:31 
GeneralRe: Need Help!! Ping search for computer names...Can anyone set up an yes or no to continue on this? Pin
Dave Kreskowiak5-May-04 15:09
mveDave Kreskowiak5-May-04 15:09 
GeneralRe: Need Help!! Ping search for computer names...Can anyone set up an yes or no to continue on this? Pin
Bri4hire6-May-04 3:55
Bri4hire6-May-04 3:55 
GeneralRe: Need Help!! Ping search for computer names...Can anyone set up an yes or no to continue on this? Pin
Dave Kreskowiak6-May-04 4:45
mveDave Kreskowiak6-May-04 4:45 
Well, you could put up a message box for every machine that comes back , but you would probably be better off just outputting a line for each result that comes back. That way, you can just walk away, let it do it's thing, and come back and look at the result:
Dim WshShell, PingResult, Target, PCName
Set WshShell = Wscript.CreateObject("Wscript.Shell")
 
PCName = InputBox ("User I Number","Users I number","Btest")
drivelist = "A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z"
DriveArray=Split(drivelist,",")
For I = 0 To UBound(DriveArray)
    Target = PCName & DriveArray(I)
    PingResult = WshShell.Run ("cmd /c ping -n 1 " & Target , 6, True)
    Select Case PingResult
        Case 0:
            WScript.Echo "SUCCESS - " & Target
        Case 1:
            WScript.Echo "FAILURE - " & Target & "<<<"
    End Select
Next

Run this using CSCRIPT from a CMD prompt. If you run this using WSCRIPT, the normal default, you'll get a dialog box on every ping, success or fail. But, this also makes it harder to terminate the script. You'll have to go into TaskManager to do it. Running it under CSCRIPT is just WAY more convenient:
C:\Documents and Settings\[userid]\Desktop>CSCRIPT PINGTEST.VBS



RageInTheMachine9532
GeneralRe: Need Help!! Ping search for computer names...Can anyone set up an yes or no to continue on this? Pin
6-May-04 8:54
suss6-May-04 8:54 
GeneralRe: Need Help!! Ping search for computer names...Can anyone set up an yes or no to continue on this? Pin
Dave Kreskowiak6-May-04 9:02
mveDave Kreskowiak6-May-04 9:02 
GeneralEvent Pre IIS capture for TCP/IP packet Pin
incoming715-May-04 8:24
incoming715-May-04 8:24 
GeneralRe: Event Pre IIS capture for TCP/IP packet Pin
Dave Kreskowiak5-May-04 12:50
mveDave Kreskowiak5-May-04 12:50 
Generalcodedisplaying colors in a list box Pin
Member 4169605-May-04 6:29
Member 4169605-May-04 6:29 
GeneralRe: codedisplaying colors in a list box Pin
Jarek G5-May-04 9:54
Jarek G5-May-04 9:54 
Generalcreating controls dynamically Pin
Member 4169605-May-04 6:21
Member 4169605-May-04 6:21 
GeneralC# to VB.net converter Pin
fuel2run5-May-04 4:57
fuel2run5-May-04 4:57 
GeneralRe: C# to VB.net converter Pin
Dave Kreskowiak5-May-04 5:03
mveDave Kreskowiak5-May-04 5:03 
GeneralRe: C# to VB.net converter Pin
fuel2run5-May-04 6:55
fuel2run5-May-04 6:55 
Questionrun dos commands thru VB? Pin
Jarek G5-May-04 4:08
Jarek G5-May-04 4:08 
AnswerRe: run dos commands thru VB? Pin
Dave Kreskowiak5-May-04 5:01
mveDave Kreskowiak5-May-04 5:01 
GeneralRe: run dos commands thru VB? Pin
Jarek G5-May-04 10:01
Jarek G5-May-04 10:01 
GeneralRe: run dos commands thru VB? Pin
Dave Kreskowiak5-May-04 12:47
mveDave Kreskowiak5-May-04 12:47 
GeneralRe: run dos commands thru VB? Pin
Jarek G5-May-04 13:49
Jarek G5-May-04 13:49 
GeneralRe: run dos commands thru VB? Pin
Dave Kreskowiak5-May-04 14:59
mveDave Kreskowiak5-May-04 14:59 
Generalconverting VB6 to VB.Net Pin
GaryKoh5-May-04 3:26
GaryKoh5-May-04 3:26 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.