PoshCode Archive  Artifact [70f883d561]

Artifact 70f883d56116f4d273cca7385a59e327f293fec36e8a688b4d4780da04d30b4e:

  • File Install-Bginfo.ps1 — part of check-in [1bca9bc6fa] at 2018-06-10 13:15:31 on branch trunk — Install and run BGInfo at startup using registry method (user: Chad Miller size: 1132)

# encoding: ascii
# api: powershell
# title: Install-Bginfo.ps1
# description: Install and run BGInfo at startup using registry method
# version: 0.1
# author: Chad Miller
# license: CC0
# x-poshcode-id: 2766
# x-archived: 2016-08-16T11:21:19
# x-published: 2011-07-04T18:25:00
#
#
#Install and run BGInfo at startup using registry method as described here:
#http://forum.sysinternals.com/bginfo-at-startup_topic2081.html
#Setup 
#1. Download BgInfo http://technet.microsoft.com/en-us/sysinternals/bb897557
#2. Create a bginfo folder and copy bginfo.exe
#3. Create a bginfo.bgi file by running bginfo.exe and saving a bginfo.bgi file and placing in same directory as bginfo

if (Test-Path "C:\WINDOWS\system32\bginfo")
{ remove-item -path "C:\WINDOWS\system32\bginfo" -Recurse }

#Change \\Z001\d$\sw\bginfo to your SW distrib share
copy-item \\Z001\d$\sw\bginfo -Destination C:\Windows\system32 -Recurse

Set-ItemProperty -path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Run" -name "BgInfo" -value  "C:\WINDOWS\system32\bginfo\Bginfo.exe C:\WINDOWS\system32\bginfo\bginfo.bgi /TIMER:0 /NOLICPROMPT"