开发者

Get the wallpaper file name for the currently displayed wallpaper in a theme in Windows 7?

开发者 https://www.devze.com 2023-04-09 04:05 出处:网络
I am using JNA to call system libraries on Windows 7 and need a way to get the current wallpaper file name that is being displayed from a theme where it randomly changes the wallpaper at a set interva

I am using JNA to call system libraries on Windows 7 and need a way to get the current wallpaper file name that is being displayed from a theme where it randomly changes the wallpaper at a set interval.

I have used the SPI_GETDESKWALLPAPER system call in user32 using SystemParametersInfo but it returns the following path for each and every wallpaper no matter which is selected:

C:\Users\<user name>\AppData\Roaming\Microsoft\Windows\Themes\TranscodedWallpaper.jpg

but the original wallpaper are in say C:\wallpapers

Is there any way to get the original w开发者_C百科allpaper file name? This transcoded wallpaper file name is useless for me.

Thanks


There's a short script available here which does what you want it to do.

The file name of the source for the current wallpaper is stored in a registry variable.

0

精彩评论

暂无评论...
验证码 换一张
取 消