Advertisement
Guest User

Untitled

a guest
Nov 12th, 2018
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. @echo OFF
  2.  
  3. setlocal ENABLEEXTENSIONS
  4. set KEY_NAME="HKCU\Software\Microsoft\Internet Explorer\Desktop\General"
  5. set VALUE_NAME=WallpaperSource
  6.  
  7. FOR /F "usebackq skip=2 tokens=2*" %%A IN (`REG QUERY %KEY_NAME% /v %VALUE_NAME% 2^>nul`) DO (
  8. set ImgPath=%%B
  9. )
  10.  
  11. if defined ImgPath (
  12. Recycle.exe "%ImgPath%"
  13. ) else (
  14. @echo %KEY_NAME%\%VALUE_NAME% not found.
  15. )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement