- Aug
- 2,219
- 101
Code:
e:\utils>whatver
_x64: 1
_admin: 1
_elevated: 1
TCC 25.00.7 x64 Windows 10 [Version 10.0.18362.175]
I'm testing out the GPS internal variables, but keep getting "Element not found";
Code:
e:\utils>echo %_gpslon
Element not found.
e:\utils>echo %_gpslat
Element not found.
I can access GPS properties via PowerShell;
Code:
PS E:\utils> type .\latlong1.ps1
Add-Type -AssemblyName System.Device
$GPS = New-Object System.Device.Location.GeoCoordinateWatcher
$GPS.Start()
while (($GPS.Status -ne 'Ready') -and ($GPS.Permission -ne 'Denied')) {
Start-Sleep -Milliseconds 100
}
if ($GPS.Permission -eq 'Denied'){
Write-Error 'Access Denied for Location Information'
} else {
$GPS.Position.Location | Select Latitude,Longitude
}
PS E:\utils> .\latlong1.ps1
Latitude Longitude
-------- ---------
42.9562811439727 -81.2781491520377
The help says the _gps* require a GPS that supports the Windows Sensor Location APIs.
If I can access GPS info via PowerShell, why can I not access GPS info via TCC?
Joe