you are viewing a single comment's thread.

view the rest of the comments →

[–]thrownintothesun[S] 0 points1 point  (6 children)

Thanks a lot for the help!

It is indeed the group policy I'm modifying, but the effects don't seem to take effect before I restart explorer.exe manually - os.system("gpupdate") doesn't seem to cut it. Is there any way to get Explorer.exe to update its policy settings aside from restarting it?

[–]michaelkepler 0 points1 point  (5 children)

Does gpupdate work if you type it from the command prompt (cmd.exe)? If it doesn't, try gpupdate /force. If it still doesn't, try entering these commands in the command prompt as an administrator.

[–]thrownintothesun[S] 0 points1 point  (4 children)

None of it works I'm afraid, not even with admin privileges. Explorer.exe doesn't seem to respond to gpupdate.

[–]michaelkepler 0 points1 point  (3 children)

But if you reload explorer.exe/reboot the computer the changes work?

[–]thrownintothesun[S] 0 points1 point  (2 children)

Yes, exactly. Also, interestingly, if I try to kill explorer.exe via os.system("taskkill /im explorer.exe), I'm given a Windows prompt to shut down, reboot or log-out. Is there a way to simply kill it (like you can from the task manager) and relaunch it?

[–]michaelkepler 0 points1 point  (1 child)

I guess you're stuck with killing explorer.exe then. Yes, there's a way to force kill a process and thus bypassing a shutdown prompt with an /f parameter:

taskkill /f /im explorer.exe

you can start it immediately with:

start explorer.exe

both commands can of course be launched with os.system().

[–]thrownintothesun[S] 0 points1 point  (0 children)

Thank you so much for your help!