I am developing an HTA to gather diagnostic system information for us so that we can run a series of standard checks on systems running our software and detect a number of common configuraton problems.
One of the things I would like to do is for the HTA to be able to examine a series of files and folders and based on the identity of the user who has run the HTA, check
- does the user have permission to view the folder/file?
- does the user have permission to open the file for reading?
- does the user have permission to write to the file (or create files in the folder)?
Can anyone point me at some boilerplate code that covers this type of operation? I'm not familiar with WMI and have been building the HTA on a cut and paste basis, so I'm looking for some fairly straightforward stuff I can modify if necessary.
Thanks in advance