I want to make some changes on active desktop wallpaper like adding watermark.
For that I need to get the path of active wallpaper path. adding watermark I can do.
This can be done using JNA library, but i can't able to access the file path.
I want to make some changes on active desktop wallpaper like adding watermark.
For that I need to get the path of active wallpaper path. adding watermark I can do.
This can be done using JNA library, but i can't able to access the file path.
The way to obtain the current desktop wallpaper could different based on the operating system, for windows 7 it can be obtained from following registry path,
HKEY_CURRENT_USER\Control Panel\Desktop\Wallpaper
to read the registry path you can use the method described in following question
As Low Flying Pelican and ee said,
HKEY_CURRENT_USER\Control Panel\Desktop
contains the key Wallpaper which has a pointer to the wallpaper. For the command prompt, you can use
reg query "HKEY_CURRENT_USER\Control Panel\Desktop" /v Wallpaper
to get the location, or using this for native java support:
Runtime.getRuntime().exec('reg query "HKEY_CURRENT_USER\Control Panel\Desktop" /v Wallpaper');