Batch file to change wallpaper windows 10

I have actually looked for a lot of codes, all of which only led to my background picture to become babsence instead of transforming to the picture I want. However, I thought of one more code for this. Please tell me whether this code will certainly work-related or not and what is the difference, in terms of the result, in between this code and the other code that requires the regisattempt and rundll32. In this code, I am attempting to change my background to a photo in my desktop computer dubbed "Eye.jpg". This code "often" functions, however when I restart, my background returns as it is. And I really suppose "often" bereason at other times it does not job-related at all.

You watching: Batch file to change wallpaper windows 10


echo offxcopy /s/y "C:Users\%username%DesktopEye.jpg" "C:Users\%username%AppDataRoamingMicrosoftWindowsThemes"del C:Users\%username%AppDataRoamingMicrosoftWindowsThemesTranscodedWallpaperrename "C:Users\%username%AppDataRoamingMicrosoftWindowsThemesEye.jpg" "TranscodedWallpaper"xcopy /s/y "C:Users\%username%DesktopEye.jpg" "C:Users\%username%AppDataRoamingMicrosoftWindowsThemesCachedFiles"del C:Users\%username%AppDataRoamingMicrosoftWindowsThemesCachedFilesCachedImage_1366_768_POS4.jpgrename "C:Users\%username%AppDataRoamingMicrosoftWindowsThemesCachedFilesEye.jpg" "CachedImage_1366_768_POS4.jpg"taskkill /f /im explorer.exestart traveler.exepauseThis was one of the various other codes that didn"t occupational out with me.


echo offcontact :quiet>nul 2>&1goto :EOF:quietreg include "HKCUControl PanelDesktop" /v Wallpaper /f /t REG_SZ /d %windir%:Desktopwallpaper.bmpreg add "HKCUControl PanelDesktop" /v WallpaperFormat /f /t REG_SZ /d 10:: %SystemRoot%System32RUNDLL32.EXE user32.dll, UpdatePerUserSystemParameters

*

The regisattempt method does not job-related all the moment particularly if the photo isn"t in bmp format so you deserve to attempt my approach. It sindicate open up the picture you desire utilizing home windows photo viewer and also usage a keyboard shortreduced to set the image as your desktop wallpaper.

Dim wShellcollection wCovering = createobject("Wmanuscript.shell")wShell.Run "cmd /c begin " & Your photo path right here,0,Truecarry out wscript.sleep 100loop till wCovering.appactivate("Windows Photograph Viewer") = truewCovering.Sendsecrets ("+F10")WScript.Sleep 100wCovering.Sendtricks "k"wCovering.Exec "taskkill /im dllorganize.exe"This is a vbs script but you have the right to usage the very same approach using cmd


*

Both methods will job-related, yet in both cases, you made an error and its not functioning for that reason. I"ll describe the error and just how to settle it.


echo off xcopy /s/y "C:Users\%username%DesktopEye.jpg" "C:Users\%username%AppDataRoamingMicrosoftWindowsThemes" del C:Users\%username%AppDataRoamingMicrosoftWindowsThemesTranscodedWallpaper rename "C:Users\%username%AppDataRoamingMicrosoftWindowsThemesEye.jpg" "TranscodedWallpaper" xcopy /s/y "C:Users\%username%DesktopEye.jpg" "C:Users\%username%AppDataRoamingMicrosoftWindowsThemesCachedFiles" del C:Users\%username%AppDataRoamingMicrosoftWindowsThemesCachedFilesCachedImage_1366_768_POS4.jpg rename "C:Users\%username%AppDataRoamingMicrosoftWindowsThemesCachedFilesEye.jpg" "CachedImage_1366_768_POS4.jpg" taskkill /f /im traveler.exe start traveler.exe pause

The above will certainly adjust the background at the place windows stores backgrounds when a brand-new background is collection. The thing is, Windows will always convert the background to a .bmp photo prior to establishing it. You basically try to replace an image in .jpeg layout one that needs .bmp layout and also assume it works, but a jpg picture just is not a bmp picture, and therefor home windows can not load the picture and also does a failearlier to a black solid color.

See more: How To Update To Windows 10 “Threshold 2”, Windows 10 Fall Update Threshold 2 Now Available

To resolve it, open your Eye.jpg file via a paint routine, save it with the BMP (Bitmap) layout and also extension to Eye.bmp, then usage the new file in your script and it will certainly job-related.


echo off contact :quiet>nul 2>&1 goto :EOF :quiet reg include "HKCUControl PanelDesktop" /v Wallpaper /f /t REG_SZ /d %windir%:Desktopwallpaper.bmp reg add "HKCUControl PanelDesktop" /v WallpaperStyle /f /t REG_SZ /d 10 :: %SystemRoot%System32RUNDLL32.EXE user32.dll, UpdatePerUserSystemParameters

The over will certainly collection a photo and make windows perform its magic to convert the photo to bmp and store it at the correct location.

The thing is, it is looking for %windir%Desktopwallpaper.bmp and not %userprofile%Desktopeye.jpg and therefor it does not occupational.

See more: Ga-970A-D3P Manual _Ga

Either place a bmp variation at %windir%Deskpeak via the name wallpaper.bmp or adjust that course. Do note, if you readjust the course, it is feasible that if you move the file elsewhere, your background will certainly turn black on next reboot.