Capture Serial Number

This is what I use:

  #if TargetMacOS then
    Dim sh as new Shell
    dim request as String = "system_profiler SPHardwareDataType | grep -i ""Serial Number (system):"" | awk '{print $4}'"
    // If there is an error
    if sh.ErrorCode <> 0 then
      // Handle your exception here, raising an Exception
    end if

Thanks to everyone who helped me in this task.

I am grateful to all for your help, thank you !

Hi Dave,

This line truncates the result to 11 characters but it should be on my system 12 characters. Don’t know what the standard is but i had to replace the number 11 with 12 in that statement to get the whole address.