As per subject, is there a command or may be even a sample VBScript that I can use to calculate/read effective permission of a file in Windows XP and Windows Server 2003 OS? All I want is to be able to get same information as I see in "effective permission" tab of Security->Advanced option of a NTFS file.
Commands like calcs, icacls etc don't provide effective permission- they can list inherited permission but they don't calculate effective permission.
EDIT- Based upon below answer, it isn't really possible by means of using VB Script. I'll write a piece of code and then call it from VBScript