I will like to open a text file using notepad or wordpad or
whatever text editor that the target machine has using shell
Is there a way to determine what text editor application that
the target machine has?
Also, how can I open a text file using that editor in read-only
mode without changing the attribute of that text file?

Hian Chew