How can I check if a script is running with root-privileges?
I am using the following code, but it uses linux commands to get the user id so it would not work on m$ win. Is there an platform independent approach to handle this problem ?
if { [exec id -u] eq 0 } {
//nice, let us destroy something!
} else {
//sorry. you are not root
}