I am using code given in this link to get UNC path of a file.

It works only if a user has admin Admin Privileges. Otherwise it gives access denied error. What is the reason for it? Is there any alternative or solutions?