Well the subject pretty much nails it: I have a .vbs script that sends an email and then at the end has this line:
This script works great EXCEPT for when the logged-in user has this program denied in group policy; when that is the case the user gets an error:
And then never gets the standard windows "This program has been denied by policy" window. The program does not start (it shouldn't) but then every-single-user-who-does-this comes and tells me there is an error... :(
I understand that the GPO denial is throwing the vbs error, but is there a way to allow the system error to be displayed instead? or maybe a custom error message from the vbs script? I am not a vbs guy, just making good use of a simple fix...