Hi,
Yesterday i blogged about changing Desktop background colour using Powershell.
Today we are going to change the Desktop Wallpaper Position using Powershell. Like the previous post this is again a registry tweak.
Windows Desktop wallpaper has 5 types of Picture Position.
- Center
- Fill
- Fit
- Stretch
- Tile
The registry key which retains these settings is HKey_Current_User\Control Panel\Desktop and the registry key name is “WallpaperStyle”
Setting | “WallpaperStyle” reg key value |
Center | 0 |
Fit | 6 |
Fill | 10 |
Stretch | 2 |
Tile | 0 |
Lets try it :)
I have centrally positioned wallpaper of my daughter “Manya” and lets changed the position to FIT one.
Set-ItemProperty 'HKCU:\Control Panel\Desktop' -Name "WallpaperStyle" -Value 6
now log off and log-in again.
and here you go , the “Picture Position” is set to “Fit.”
Now lets set the wallpaper position to “Fill”
Here is our code, run it,
Set-ItemProperty 'HKCU:\Control Panel\Desktop' -Name "WallpaperStyle" -Value 10
log-off and re login again. and our “Picture Position is set to fill :)
Now, lets set it to the “Stretch”
run the code
Set-ItemProperty 'HKCU:\Control Panel\Desktop' -Name "WallpaperStyle" -Value 2
log-off and re-login again , and the wallpaper is set to “Stretch” now.
if you want to set wallpaper as TILE then we have to tweak two keys. the WallpaperStyle" and “TileWallpaper"
To tile the wallpaper, we need to set “TileWallpaper" to 1
run the script code.
Set-ItemProperty 'HKCU:\Control Panel\Desktop' -Name "WallpaperStyle" -Value 0
Set-ItemProperty 'HKCU:\Control Panel\Desktop' -Name "TileWallpaper" -Value 1
Log-off and log-in again.
and i can see my cute bunny’s picture all over the monitor.. :) . It successfully positioned as tile.
Okies. now lets set every thing back to normal.
I am setting wallpaper as “cantered” positioned and tile key to off.
Set-ItemProperty 'HKCU:\Control Panel\Desktop' -Name "WallpaperStyle" -Value 0
Set-ItemProperty 'HKCU:\Control Panel\Desktop' -Name "TileWallpaper" -Value 0
log-off and log-in again.
and you can see, there is no tile and wallpaper is centrally positioned.
I hope that you will find it handy and helpful.
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.