Feb 14, 2024 B4X: Private Sub IsRunningAsAdmin As Boolean Try Dim f As String = GetEnvironmentVariable("SYSTEMDRIVE", "") & "\isadmin.txt" File.WriteString(f, "", "test") File.Delete(f, "") Return True Catch Return False End Try End Sub A bit hacky but should work. Windows only. Click to expand...
B4X: Private Sub IsRunningAsAdmin As Boolean Try Dim f As String = GetEnvironmentVariable("SYSTEMDRIVE", "") & "\isadmin.txt" File.WriteString(f, "", "test") File.Delete(f, "") Return True Catch Return False End Try End Sub A bit hacky but should work. Windows only.