Author: DHeinzSubject: SCCM Deployment - BgInfo
Posted: 13 January 2017 at 3:19pm
I have successfully deployed BgInfo and its corresponding configuration file as part of our image. All data is displayed with the exception of the custom items that I created using a VBS script. The following files are copied over to the computer as part of the image;
- BgInfo.exe
- wstat.bgi
- OnlyIPV4Address.vbs
- OSArchitecture.vbs
- OSInfo.vbs
I have used the following vbs script to install using a command line;
On Error Resume Next
'Create the c:\IT\BgInfo folder
If not objFSO.FolderExists("C:\IT\BgInfo") Then
objFSO.CreateFolder("C:\IT\BgInfo")
End If
'Copy the bginfo files
intErrorCode = intErrorCode + objFSO.CopyFile(objShell.CurrentDirectory & "\Bginfo.exe", "C:\IT\BgInfo\")
intErrorCode = intErrorCode + objFSO.CopyFile(objShell.CurrentDirectory & "\OnlyIPv4Address.vbs", "C:\IT\BgInfo\")
intErrorCode = intErrorCode + objFSO.CopyFile(objShell.CurrentDirectory & "\OSArchitecture.vbs", "C:\IT\BgInfo\")
intErrorCode = intErrorCode + objFSO.CopyFile(objShell.CurrentDirectory & "\OSInfo.vbs", "C:\IT\BgInfo\")
intErrorCode = intErrorCode + objFSO.CopyFile(objShell.CurrentDirectory & "\wstat.bgi", "C:\IT\BgInfo\")
'Add the bginfo shortcut to the run registry key
intErrorCode = intErrorCode + objshell.RegWrite("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run\BgInfo", "C:\IT\BgInfo\Bginfo.exe /accepteula /ic:\IT\BgInfo\wstat.bgi /timer:0", "REG_SZ")
objShell.Run "C:\IT\BgInfo\Bginfo.exe /accepteula /ic:\IT\BgInfo\wstat.bgi /timer:0"
'Cleanup
Set objShell = Nothing
Set objFSO = Nothing
'return errorcode for install to SCCM
WScript.Quit(intErrorCode)
What am I missing?
Edited by DHeinz - 9 minutes ago at 3:23pm