Rundll32.exe user32.dll updateperusersystemparameters windows 7




















The existing GPO was modified accordingly. After some time, the GPO would be automatically applied to the target users or machines. We have run the resultant Set of Policy rsop.

The new GPO was in place. We had to come up with some options or workarounds in order to meet the customer requirement i. After some research on internet, we have found that it was possible to use a command line that would theoretically refresh the desktop wallpaper.

More specifically, the command was working inconsistently which make it unusable in this really specific scenario…. Again, searching through internet and gathering information about this specific topic, we discovered that it would be possible to use some specific windows dll that could be loaded into a Powershell script. After gathering information from multiple Internet sources, we came up with the following short Powershell Script.

Executing the above script was basically updating the user settings in the loaded session and the wallpaper was changed accordingly…. Now, the next challenge we have been asked to solve was to find a way to trigger the script when the GPO would be modified….

Probably multiple options would exists and we will present some of them hereafter. So, the first option would be to push a immediate schedule tasks through the network using Group Policies preferences so the new desktop wallpaper would be visible to the user quite quickly after you have modified the GPO.

Obvioulsy, you will have to follow the following steps. Right-click anywhere on the right pane and select the option Immediate Tasks at least Windows 7. In the new Immediate tasks dialog box, Provide a name for the task and leave default for the other settings. Move to the action tab. In the common tab , leave the default. If this option is selected, the GPO will not run and will throw an error in event viewer.

Now, another option would be to modify again the script in order to have it running on a specific interval in an infinite loop and distributed to the target machines. You can use a login script that would execute the script indefinitely. When a new Desktop wallpaper is deployed and when the gpo is refreshed, the script will kick in and update the wallpaper within the user session.

You can also copy shortcuts, batch file in the startup folder on the target machine. The script would have been modified accordingly to have it running on a infinite loop. DllImport "Shell Zero, IntPtr. LastWriteTime -lt [datetime]::Now. ToString '0. Explorer]::Refresh or ie4uinit. Ahmed Ashour 2, 2 2 gold badges 13 13 silver badges 21 21 bronze badges. This look nice, but why all the drive stuff in there? WarTurtle WarTurtle 1. Stijn Bousard Stijn Bousard 51 1 1 silver badge 3 3 bronze badges.

Sign up or log in Sign up using Google. Sign up using Facebook. Sign up using Email and Password. Post as a guest Name. Email Required, but never shown. The Overflow Blog. Podcast Helping communities build their own LTE networks.

Podcast Making Agile work for data science. Featured on Meta. New post summary designs on greatest hits now, everywhere else eventually. Linked 0. Create a free Team What is Teams? Collectives on Stack Overflow. Learn more. Asked 2 years, 7 months ago. Active 2 years, 7 months ago. Viewed 3k times. Improve this question. Roxiun Roxiun 2 2 silver badges 9 9 bronze badges. It is not meant for this.

See support. Noodles Then is there anyway to force desktop refresh? Add a comment. Active Oldest Votes.



0コメント

  • 1000 / 1000