|
Joined: Dec 2002
Posts: 1,245
Hoopy frood
|
OP
Hoopy frood
Joined: Dec 2002
Posts: 1,245 |
I had gotten off of these boards a little alias that could ping via command.com in win98
wping {
run command.com /c ping $1 > c:\mirc\trace\ping.txt
.timer4p 1 20 loadbuf -s c:\mirc\trace\ping.txt
} Any way to do the same thing in XP?
|
|
|
|
schaefer31
|
schaefer31
|
Just change command.com to cmd.exe and it should work.
Edit: It seems to work fine even without the change.
|
|
|
|
Joined: Dec 2002
Posts: 1,245
Hoopy frood
|
OP
Hoopy frood
Joined: Dec 2002
Posts: 1,245 |
Hmm, if I use the alias I get a help file on setting variables the start is
C:\mirc61>echo off Displays, sets, or removes cmd.exe environment variables. yet if I input the same line via start-run it works right. this is the same for either command.com or cmd.exe (though command.com comes back with much less text)
|
|
|
|
schaefer31
|
schaefer31
|
Well, I couldn't get it to work completely using the original code you posted. I changed it to this, and it worked fine. alias wping {
run command.com /c ping $1 > ping.txt
.timer4p 1 5 loadbuf -s ping.txt
}
|
|
|
|
Joined: Dec 2002
Posts: 1,245
Hoopy frood
|
OP
Hoopy frood
Joined: Dec 2002
Posts: 1,245 |
I have no idea why, but neither version, or any of the things I have tried have worked, so its my system thats buggy some how. Thanks anyway.
|
|
|
|
schaefer31
|
schaefer31
|
By the way, it doesn't seem to make a difference whether I use command.com or cmd.exe. It displays the same amount of text either way.
|
|
|
|
Joined: Aug 2004
Posts: 7,168
Hoopy frood
|
Hoopy frood
Joined: Aug 2004
Posts: 7,168 |
The only time you would notice a difference between using command.com and cmd.exe, is if you were using a system running Windows 98SE (or lower)
cmd.exe was added to the Windows opearating system as of Windows ME (I believe. I don't have a copy of ME running to test that)
Usage of command.com was maintained for compatability purposes.
|
|
|
|
DaveC
|
DaveC
|
Actually cmd.exe is the NT command line interpreter, a program that functions under the NT OS, it existed before ME (which isnt NT anyway) and I would assume if ME has it its a cludge program to make ME appear/function like an upgrade of 2000 (which it wasnt).
|
|
|
|
Joined: Feb 2004
Posts: 2,013
Hoopy frood
|
Hoopy frood
Joined: Feb 2004
Posts: 2,013 |
Try Online's Extension to /run //xrun -wh $+(%,comspec%) /c ping www.google.com> $mircdirgoogle.txt | loadbuf -s google.txt %comspec% is an environment variable that will evaluate to the path of the command executable, therefore it doesn't matter which OS someone is using. The h flag keeps the program hidden, using the w flag makes the code wait with executing the following command until the program is done. This snippet takes advantage of the Windows Script Host (WSH) Run method
|
|
|
|
Joined: Feb 2004
Posts: 2,013
Hoopy frood
|
Hoopy frood
Joined: Feb 2004
Posts: 2,013 |
By the way you don't need the cmd.exe in order to use ping.
Running ping.exe will be fine.
|
|
|
|
Joined: Dec 2002
Posts: 1,245
Hoopy frood
|
OP
Hoopy frood
Joined: Dec 2002
Posts: 1,245 |
since nothing I tried worked, I dug deaper, at some point I tried writing a bat file "ping.bat" when running the script then it did not go to ping.exe in windows, rather ping.bat in mIRC's folder. I kept seeing that it had the mirc path in the "dos" window and it finally clicked to look for bat files. after renaming the bat file the alias works but any IP other than 127.0.0.1 times out (pulling hair). Yes I turned off all firewalls.
|
|
|
|
Joined: Dec 2002
Posts: 1,245
Hoopy frood
|
OP
Hoopy frood
Joined: Dec 2002
Posts: 1,245 |
Try Online's Extension to /run //xrun -wh $+(%,comspec%) /c ping www.google.com> $mircdirgoogle.txt | loadbuf -s google.txt I downloaded that and the original alias and the one you have here all "time out" from packet loss (dialup) * Dns resolving forums.mirc.com - forums.mirc.com resolved to 130.89.175.22 130.89.175.22 resolved to forums.mirc.com is on No channels I am on - * Dns resolved forums.mirc.com to 130.89.175.22 - Pinging 130.89.175.22 with 32 bytes of data: Request timed out. Request timed out. Request timed out. Request timed out. Ping statistics for 130.89.175.22: Packets: Sent = 4, Received = 0, Lost = 4 (100% loss),
|
|
|
|
Joined: Feb 2004
Posts: 2,013
Hoopy frood
|
Hoopy frood
Joined: Feb 2004
Posts: 2,013 |
I can't really help you further anymore, sounds like something is happening with your ping.exe, not related to mIRC.
|
|
|
|
Joined: Dec 2002
Posts: 1,245
Hoopy frood
|
OP
Hoopy frood
Joined: Dec 2002
Posts: 1,245 |
Thanks FiberOPtics I think its related to my ISP to be honest as I have tested on a laptop that is new running xp home and a PC running XP pro and I have 100% packet loss to _most_ IPs, yet I can ping on mIRC just fine. (I do understand mIRC (IRC) pings are over the server and are not the same)
|
|
|
|
DaveC
|
DaveC
|
your router is likely blocking the ping replies
|
|
|
|
|