This message was deleted.
# _general
s
This message was deleted.
m
Haven't done it in maybe 12 years, but there is a compatibility shim in Windows that allows you to prevent message boxes with specific text to show up
n
using the "Image File Execution Options" debugger registry options? i.e tell wscript.exe to run svhost as a debugger? Think @Guy Leech had a post somewhere
๐Ÿ‘ 1
g
There is this but it will stop the exe you create the IFEO key for from running for everyone all the time. https://twitter.com/guyrleech/status/1115256470587752448?s=20
n
Not if you use FSLogix redirection rules ๐Ÿ˜‰
j
So let me figure this - create those Registry keys and I would essentially block wscript.exe from running, and if I used FSLogix Redirection it would only affect certain users, yes? If I have that right, that would stop logon scripts from running, but I'd still have hobbled the windows scripting functionality in-session for those users......or were you thinking a different way of using redirection?
n
Sorry @James Rankin re-reading your requirement. Yes it would block wscript.exe for the whole time they are in that session. Going back to what you were thinking, you could use FSLogix to block wscript.exe for the gpscript.exe process (that's the exe called when windows processes login scripts) - though this will block it for all users!!
j
That would be an excellent idea - if these were GP logon scripts ๐Ÿ˜ž They're defined on the user object....do we know if they are called in the same way?
n
I've using FSLogix to block vbs scripts in the login process without any issues.
j
Let me give it a whirl....
n
I don't think they are, can't you just use AppLocker to block vbs from the SYSVOL locations i.e. path rule? Back in the day I used Software Restriction Policies to stop those stupid login scripts in Netlogon
j
It's AppLocker that is blocking it. But with VBS files during logon, it throws an error. This must be a bug - no other VBS blocks bring up an error into the user interface, they're all silent.
n
I tried my best ๐Ÿ˜ฃ
๐Ÿ‘ 1
j
Worst case scenario we just unblock the damn thing and let it run. I just hate logon scripts so much, especially when they are not needed. If they were GPO I could have filtered them, but they're on the damn user object which is even more annoying
d
If they are on the user object, you could also just run a script to clear that config on every user object in AD isnโ€™t it?
n
That's true, assuming they don't access some legacy systems you have no control over and they are needed, or you are building a new platform and want to block those things, but they still login to the the old environment where it is still used.
d
True
t
If you can edit the logon script(s), and if your hosts have a common naming scheme, we put a section at the top to check hostname, and if it equaled part of the name of the servers from our Citrix environment, we exit the script.
Then we could migrate off the scripts from the user objects as we put that functionality in other places (group policy, WEM, etc.)
j
We can't change the AD objects - not allowed. The logon scripts actually have an "if ICA exit" function, but the problem is that when this runs, it throws the error because of the AppLocker bug.
m
DeviceTrust be an option to identify the certain devices and donโ€™t run logon scripts for that ?
j
Expenditure is not an option, the usual issue
c
I had this same issue, could not figure it out ended up allowing login scripts. Please share if you get it.
j
I am leaning down the avenue of allowing the logon scripts to execute unfortunately. Definitely looks like a bug, as you probably know, all execution blocking is silent EXCEPT for VB logon scripts
m
Too long discussion, but why try what I've recommended and block that message box for host?
j
It looked too complicated ๐Ÿ™‚ might give it a look now that all else is failing tho ๐Ÿ˜‰
d
Just a brainfart, but if all users have the same vbscript and a PS1 block doesnโ€™t get a message box. You could replace all users script entry by a PS1 that triggers wscript to start the VBS. Now because PS1 gets silently blocked, the wscript will also not start for your selected users.
j
Yep, could do that......after about six weeks of change review and testing to make a change to the logon script ๐Ÿ˜ž
n
Give up @James Rankin and allow it or block w/cscript.exe with FSLogix and except any consequences!! If they want it blocked, best they raise a change to modify the login script, wipe out the AD property or raise a bug with MS - you know which one will be quicker!!
j
Yeah think I am pretty much resigned to not getting my way here ๐Ÿ™‚
t
Anything in the Applocker under Application Control Policies appear with an error message when users get the error in their event viewer?
j
It's a standard applocker deny, just a vbs logon script seems to generate a hard stop in the interface
t
Event ID 8004 is denied
ok
j
8007 I think, not sure
t
what if you run procmon capture and see where the script actions take place in the registry then deny that part of the registry using applocker, include a Path filter for saver, though as you mentioned the script runs during logon so would mean setting up procmon to capture the login.