Page 1 of 2
DOS command names on non-English Windows
Posted: Wed Oct 26, 2011 12:35 pm
by MachineCode
One of my apps calls the "ping" DOS command at the user's request, and I was wondering what happens if a non-English Windows PC tried to call it? Is it still called "ping" on a French install of Windows, and so on? Thanks.
Re: DOS command names on non-English Windows
Posted: Wed Oct 26, 2011 12:40 pm
by c4s
"ping" is "pong" on Chinese Windows systems!
Just a joke.

It has the same names on other installations as it's just the filename of the executable (see System32 folder)...
Re: DOS command names on non-English Windows
Posted: Wed Oct 26, 2011 12:53 pm
by MachineCode
Thanks for confirming... I wasn't sure if different installs of Windows had different filenames in System32.
Re: DOS command names on non-English Windows
Posted: Sat Oct 29, 2011 1:37 pm
by blueznl
...but note that replies MAY differ from version to version and locale to locale.
Re: DOS command names on non-English Windows
Posted: Sat Oct 29, 2011 2:00 pm
by MachineCode
Yeah, I always ensure that I don't use any English words from the output. On that subject, I assume "ms" (for milliseconds) is the same in every language? Like, "ping" would say "#ms" in its output on any language PC?
Re: DOS command names on non-English Windows
Posted: Sat Oct 29, 2011 6:20 pm
by Zach
Measures should be reported the same I would think?
International standards and all.
Kind of like how a plus sign + means the same thing in math no matter what language you speak
Re: DOS command names on non-English Windows
Posted: Mon Oct 31, 2011 1:12 am
by em_uk
Why not use COMatePLUS and do the the ping almost internally?
Code: Select all
IncludePath "C:\Program Files (x86)\PureBasic\"
XIncludeFile "COMatePLUS.pbi"
Procedure.s Ping_Status_Code(pingcode.i)
Select pingcode
Case 0
Ping_Stat$ = "Success"
Case 11001
Ping_Stat$ = "Buffer Too Small"
Case 11002
Ping_Stat$ = "Destination Net Unreachable"
Case 11003
Ping_Stat$ = "Destination Host Unreachable"
Case 11004
Ping_Stat$ = "Destination Protocol Unreachable"
Case 11005
Ping_Stat$ = "Destination Port Unreachable"
Case 11006
Ping_Stat$ = "No Resources"
Case 11007
Ping_Stat$ = "Bad Option"
Case 11008
Ping_Stat$ = "Hardware Error"
Case 11009
Ping_Stat$ = "Packet Too Big"
Case 11010
Ping_Stat$ = "Request Timed Out"
Case 11011
Ping_Stat$ = "Bad Request"
Case 11012
Ping_Stat$ = "Bad Route"
Case 11013
Ping_Stat$ = "TimeToLive Expired Transit"
Case 11014
Ping_Stat$ = "TimeToLive Expired Reassembly"
Case 11015
Ping_Stat$ = "Parameter Problem"
Case 11016
Ping_Stat$ = "Source Quench"
Case 11017
Ping_Stat$ = "Option Too Big"
Case 11018
Ping_Stat$ = "Bad Destination"
Case 11032
Ping_Stat$ = "Negotiating IPSEC"
Case 11050
Ping_Stat$ = "General Failure"
Default
Ping_Stat$ = "Unknown"
EndSelect
ProcedureReturn Ping_Stat$
EndProcedure
Procedure.s PING_Info(ping_address.s)
Define.COMateObject objWMIService, PINGInfo
sysPINGInfo.COMateEnumObject
strComputer.s = "."
strTarget$ = ping_address
objWMIService = COMate_GetObject("winmgmts:{impersonationLevel=impersonate}!\\" + strComputer + "\root\cimv2")
If objWMIService
sysPINGInfo = objWMIService\CreateEnumeration("ExecQuery('Select * from Win32_PingStatus Where Address= $0027" + strTarget$ +"$0027')")
If sysPINGInfo
PINGInfo = sysPINGInfo\GetNextObject()
While PINGInfo
PING_StatusCode$ = Ping_Status_Code(PINGInfo\GetIntegerProperty("StatusCode"))
PING_ProtocolAddress$ = PINGInfo\GetStringProperty("ProtocolAddress")
PING_ResponseTime$ = Str(PINGInfo\GetIntegerProperty("ResponseTime"))
PING_ResponseTimeToLive$ = Str(PINGInfo\GetIntegerProperty("ResponseTimeToLive"))
PING_Get_Info$ = "Ping Status: " + PING_StatusCode$ + " Protocol Address: " + PING_ProtocolAddress$ + " Response Time (ms): " + PING_ResponseTime$ + " Response Time To Live (ms): " + PING_ResponseTimeToLive$
PINGInfo\Release()
PINGInfo = sysPINGInfo\GetNextObject()
Wend
sysPINGInfo\Release()
EndIf
objWMIService\Release()
Else
MessageRequester("Error", "PINGInfoInfo")
EndIf
ProcedureReturn PING_Get_Info$
EndProcedure
Debug PING_Info("www.google.com")
Re: DOS command names on non-English Windows
Posted: Mon Oct 31, 2011 10:54 am
by Shardik
em_uk,
it would be nice if you would have given credit to the original poster
of your code by mentioning his name and posting the link:
SFSxOI
http://purebasic.fr/english/viewtopic.php?t=36390
Re: DOS command names on non-English Windows
Posted: Tue Nov 08, 2011 8:21 am
by blueznl
No, replies CAN differ depending on locale and version. But, frankly, come to think of it, I dunno' if that still holds true. It was true 'in the old days' (but then again I started out with a slab of stone and a chisel, and a [backspace] was hard work and [del] was still an infernal concept)...
Re: DOS command names on non-English Windows
Posted: Tue Nov 08, 2011 11:09 am
by MachineCode
em_uk wrote:Why not use COMatePLUS and do the the ping almost internally?
I could, but it adds bloat to my app just to do a "ping" (it adds 53 KB to my exe size; no thanks!). Besides, I wasn't really being specific to "ping", but more about the subject of this thread in general.
Re: DOS command names on non-English Windows
Posted: Sun Nov 13, 2011 5:12 pm
by Thorium
Zach wrote:
International standards and all.
Kind of like how a plus sign + means the same thing in math no matter what language you speak
Not every country has the same standards, not even for math. One example is how to express floating point numbers. In US you use the point "." to separate the integer part and the fraction part. In germany we use comma and we even call it Fließkommanummer, which is translated: floating comma number.
Re: DOS command names on non-English Windows
Posted: Sun Nov 13, 2011 5:58 pm
by c4s
Thorium wrote:In germany we use comma and we even call it Fließkommanummer, which is translated: floating comma number.
Fließkomma
zahl.
There is also the metric vs. non-metric system and whatnot.
Re: DOS command names on non-English Windows
Posted: Sun Nov 13, 2011 6:06 pm
by Danilo
c4s wrote:There is also the metric vs. non-metric system and whatnot.
Yeah. Why did this outsiders that left Europe 500 years ago for going to the "new land"
not take European measure units with them?
Re: DOS command names on non-English Windows
Posted: Sun Nov 13, 2011 6:22 pm
by Zach
The Metric system was not devised until 1790, and not officially established until 1800. It is only 211 years old, not even as old as the United States.
Britain didn't adopt Metric until 1975, but you can still find old measurements still in use.
We actually do use the metric system a fair deal in the USA, but the problem with switching outright is all the math involved, and having to convert back and forth. This would be a problem for any large society.
Plus the manufacturer base is starting to skip Metric, and adopt the Decimal Inch because it is more accurate where high accuracy is needed.
Re: DOS command names on non-English Windows
Posted: Sun Nov 13, 2011 6:34 pm
by Danilo
Zach wrote:The Metric system was not devised until 1790, and not officially established until 1800. It is only 211 years old, not even as old as the United States.
Ahh, OK, thx. I just wondered because i had seen a documentary that showed first
human relatives to be 7.5 million years old and the first humans in Europe like 6 million years old
and i just remembered that the humans that left Europe 500 years ago were mostly crazy sect members
that were not wanted in Europe. Our world is so confusing...
btw: i live in Ingolstadt/Germany, the town where
Adam Weishaupt (a.k.a. George Washington, the 1st president of the U.S.of America)
founded the Illuminati order.
