Jump to content

Recommended Posts

Posted (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

Screenshot 2024-05-15 123013.png

Edited by Olliedawg
Posted
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.
  • Thanks 1
Posted
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

Posted
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?
  • Thanks 1
Posted
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

 

5.PNG

try using this command when calling

  • Thanks 1
Posted

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

Posted

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!:rolleyes:

 

Thanks all

  • 1 month later...
Posted
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!

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 account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...