Add script to remove Windows wallpaper
This commit is contained in:
parent
85323be9b9
commit
de6c36f321
1 changed files with 15 additions and 0 deletions
15
roles/home-gui/files/Remove-Wallpaper.ps1
Normal file
15
roles/home-gui/files/Remove-Wallpaper.ps1
Normal file
|
@ -0,0 +1,15 @@
|
|||
$W32Wallpaper = @'
|
||||
using System.Runtime.InteropServices;
|
||||
namespace Win32{
|
||||
public class Wallpaper{
|
||||
[DllImport("user32.dll", CharSet=CharSet.Auto)]
|
||||
static extern int SystemParametersInfo (int uAction , int uParam , string lpvParam , int fuWinIni);
|
||||
public static void SetWallpaper(string thePath){
|
||||
SystemParametersInfo(20,0,thePath,3);
|
||||
}
|
||||
}
|
||||
}
|
||||
'@
|
||||
Add-Type $W32Wallpaper
|
||||
|
||||
[Win32.Wallpaper]::SetWallpaper([string]::Empty)
|
Loading…
Reference in a new issue