Jump to content

Change desktop background via client task


chaoticz

Recommended Posts

I'm trying to change the desktop background on clients through a client task - executing a command (I don't have AD). I have already tried both CMD and adding to the registry, and through POWERSHELL and nothing comes out, despite the fact that if you do all this locally on a PC, then everything works, but it doesn’t work through the client task :( Maybe someone did something like that .. Help Please

Link to comment
Share on other sites

  • Administrators

A Run command task is executed in the system account which is probably the reason why it doesn't work.

Link to comment
Share on other sites

1 hour ago, Marcos said:

A Run command task is executed in the system account which is probably the reason why it doesn't work.

The task does not require administrator rights, but I already tried elevating privileges like (powershell.exe "C:\temp\wall.ps1 " -Verb runAs) and so (powershell Get-Content c:\temp\wall.ps1 | PowerShell.exe - noprofile -executionpolicy bypass) , files and script are loaded but not executed.

Link to comment
Share on other sites

2 minutes ago, Marcos said:

You can test it locally using psexec (psexec /s powershell ...).

yes, I immediately checked it, locally everything works as intended, but it does not work through the task to the end.

Link to comment
Share on other sites

  • 2 weeks later...

Marcon explained in his first answer, but you didn't understand it. Whatever you run using "Run command task" it is executed using "SYSTEM" account, so if you specify there in reg command to edit HKEY_CURRENT_USER\Control Panel\Desktop\Wallpaper, then it is acually changing "HKEY_USERS\S-1-5-18\Control Panel\Desktop\Wallpaper". A proper way to change it is using Group Policy in Active Directory (your windows computers need to have Pro edition and connected to that active directory)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...