I am getting an access denied error when I try to run a vbs script that uses WMI to do some stuff to IIS on Windows 7. Is there some sort of tool that can tell me what's causing the access denied?
2 Answers
Not 100% sure if it will work, but you could always try one of my favorite SysInternals tools called procmon (Process Monitor)
Usually in strange permissions issues, I would run procmon, then launch/run whatever app is having issues. There are a lot of cool filtering techinques within ProcMon that should help you go through all of the results. Look in the "Results" column for things like Access Denied, etc...
You can try these steps they may work getting your issue resolved
To Run a Script In Elevated Mode 1) Open a Command Prompt window by right-clicking Command Prompt in the Start menu and then clicking Run as administrator. 2) Schedule the script to run elevated using Task Scheduler. 3)Run the script using the built-in Administrator account.
This is taken from the official Microsoft website so credit to them Let me know if it works