I have a weird problem with the OSOT-Tool and I try to solve the problem now with DEM.
Background of my problem is that users are not able to set their wallpaper. The reason for this is a interfering registry value called "Wallpaper". I need to delete this value.
The key is here in "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\System" and I try to delete this with an elevated task.
Elevation itself works. I can proof it by running a cmd with admin-rights.
This is my configuration:
And this the Debug-Log:
[INFO ] Successfully launched elevated task 'Delete Registry-Key'.
The problem is, that the Key doesn't get deleted. I don't know why because I don't see an error. Executing the complete string manually to delete key works but not by DEM.
I also tried setting any key with the help of this nice demo (https://www.vjal.nl/dynamic-environment-manager/using-the-new-elevated-task-feature-in-dem-to-manage...). This does not work either, although I do not see any error.
I assume that the Task doesn't get executed because I have set in "Global Configuration" that a Message has to appear for the test-user. But this message does not appear.
The message only appears when I try to start the CMD (as path-based elevation process) manually.
Hi @TomH201110141,
I can't tell from your screenshot, so: in the definition of the Elevated Task, do you have Also elevate child processes checked? That would be required, as otherwise only that CMD.exe will be elevated; its child process REG.exe won't be...
BTW, as REG.exe is a standalone executable, you don't even need to launch it via CMD.exe. I just tested it with the following settings:
I created a logon task to launch it, and that worked correctly. I'd previously created that policy setting and verified that that registry value existed, and it was gone after logon.
Yes, Also elevate child processes is checked.
And yes you are right I can only use reg.exe as standalone process for this task - my fault. But that does not work either. Like I said, normally I should see a confirmation dialogue but this doesn't appear.
Hi @TomH201110141,
Elevated tasks don't display the optional Ask user to elevate confirmation message, so that's OK.
If you launch the elevated task manually in the session (FlexEngine.exe -LaunchTask "name of your elevated task"), does it work? If not, could you collect a ProcMon trace to see what seems to be going on?
I did a manually run of the demo (setting a reg-key). But it did not work.
How can I send you the trace (I don't want to pase it here)?
Hi @TomH201110141,
Maybe you can send me a private message with a DropBox/OneDrive/etc link?
You got a link. I hope the trace was correct in this way.
Thank you!
