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.
精彩评论