GetCity GetCountry
Publicado: 27 Jul 2014, 18:00
msgbox(0,"",GetCity() & "-" & GetCountry())
Func GetCountry()
Local $sCountry=""
$sCountry = RegRead("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\TimeZoneInformation", "TimeZoneKeyName")
Return StringRegExpReplace($sCountry," Standard Time","")
EndFunc
Func GetCity()
Local $sCity=""
$sCity= RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\" & GetCountry() & " Standard Time", "Display")
Return StringMid($sCity,StringInStr($sCity," ")+1)
EndFunc
Saludos