Olliedawg Posted May 15, 2024 Posted May 15, 2024 (edited) Hi all, I'm having trouble getting a VBS script to run with the GPO policy enabled " Run only specified Windows Applications ". If i disable this policy, the VBS script runs perfectly fine. Does anyone know what I need to add to the "allow" list get the script to run? This is what I have in the GPO currently - examwritepad.exe - readandwrite.exe - wscript.exe I've tried running procmon but can't see anything obvious.. This is the error I get with the policy enabled Edited May 15, 2024 by Olliedawg
pablo007 Posted May 15, 2024 Posted May 15, 2024 Are you using a command script as a wrapper for the vbs script, i'm not sure windows 10 will now directly allow .vbs scripts to run from group policy. 1
Olliedawg Posted May 15, 2024 Author Posted May 15, 2024 Are you using a command script as a wrapper for the vbs script, i'm not sure windows 10 will now directly allow .vbs scripts to run from group policy. I’m running the VBS via a scheduled task (GPO). the VBS calls a .bat which runs robocopy silently. Without the vbs I get a CMD window when the bat runs on the exam user accounts. it does work with the run specified applications GPO disabled, however I need this due to exam restrictions. If I manually trigger the scheduled task (with the GPO disabled), it works
ThomL Posted May 15, 2024 Posted May 15, 2024 Are you explicitly using wscript.exe in the task to run the vbs or just pointing to the vbs? Could it be trying to use cscript or something like that to run the vbs from the task? 1
pablo007 Posted May 15, 2024 Posted May 15, 2024 I’m running the VBS via a scheduled task (GPO). the VBS calls a .bat which runs robocopy silently. Without the vbs I get a CMD window when the bat runs on the exam user accounts. it does work with the run specified applications GPO disabled, however I need this due to exam restrictions. If I manually trigger the scheduled task (with the GPO disabled), it works try using this command when calling 1
Olliedawg Posted May 15, 2024 Author Posted May 15, 2024 Thanks all i will try these suggestions & report back
ThomL Posted May 15, 2024 Posted May 15, 2024 or use the wscript.exe command that you've already added to the GPO, or add cscript.exe to the GPO
Olliedawg Posted May 15, 2024 Author Posted May 15, 2024 It is definitely using Wscript.exe I can see that in procmon (even without specifying this explicitly). On the exam account If i navigate to "windir%\system32\wscript.exe" it opens no issue I'm wondering if im looking in the wrong place & the issue lies with the .bat
Olliedawg Posted May 15, 2024 Author Posted May 15, 2024 Hi all, solved it. issue was the .bat all along!! added the .bat to the allowed apps GPO and the script now works as expected spent the past hour troubleshooting this & wasn't even looking at the right thing! Thanks all
DavonPotter Posted June 18, 2024 Posted June 18, 2024 It sounds like you're dealing with a bit of a headache with the GPO policy. From what you've listed, it seems like you've already added wscript.exe, which should be the executable for running VBS scripts. If it's still not working, maybe try adding cscript.exe as well, since VBS scripts can run with both wscript and cscript. That might do the trick!
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now