Worklet: Install BGinfo on Windows

  • 22 October 2019
  • 0 replies
  • 158 views

Userlevel 7

This worklet will install BGinfo on Windows endpoints and run it at startup.


Instructions:



  1. You’ll need to get the installer file from here:

    https://docs.microsoft.com/en-us/sysinternals/downloads/bginfo

  2. Open up the zip file and grab the Bginfo64.exe file. This is what you’ll use as the Installation File

  3. The exe doesn’t technically install, it’s just an executable that you run to set the background image

  4. This worklet copies the Bginfo64.exe file to the root c:\ folder. If you want it somewhere else, just change the path in the Evaluation and Remediation code blocks

  5. Finally the worklet creates a shortcut in the Startup folder. This shortcut includes the /timer=0 flag so that the exe doesn’t pop up the interactive windows for BGinfo.


Evaluation code:


if (Test-Path -Path "C:\Bginfo64.exe") {
exit 0
} else { Exit 1 }

Remediation code:


Copy-Item Bginfo64.exe -Destination "c:\Bginfo64.exe"

$WshShell = New-Object -comObject WScript.Shell
$Shortcut = $WshShell.CreateShortcut("c:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup\Bginfo64.lnk")
$Shortcut.TargetPath = "c:\Bginfo64.exe"
$Shortcut.Arguments = "/timer=0"
$Shortcut.Save()

Don’t forget to upload the Bginfo64.exe file in the Installation File section!


0 replies

Be the first to reply!

Reply