Bginfo PDF
Bginfo PDF
BGInfo Setup
If you are familiar wit h BGInfo, you can skip t his sect ion. However, if you have never used t his t ool, it t akes just a few minut es t o set up in order t o capt ure t he dat a you are looking for. When you first open BGInfo, a t imer will be count ing down in t he upper right corner. Click t he count down but t on t o keep t he int erface up so we can edit t he set t ings.
Now edit t he informat ion you want t o capt ure from t he available fields on t he right . Since all t he out put will be redirect ed t o a cent ral locat ion, dont worry about configuring t he layout or format t ing.
BGInfo support s t he abilit y t o st ore informat ion in several dat abase format s: SQL Server Dat abase, Access Dat abase, Excel and Text File. To configure t his opt ion, open File > Dat abase.
When using a t ext file, t he only opt ion is t o have BGInfo creat e a new ent ry each t ime t he capt ure process is run which will add a new line t o t he respect ive CSV t ext file.
@SET Password=password SQLCMD -S %Server% -E -Q Creat e Dat abase [%Dat abase%] SQLCMD -S %Server% -E -Q Creat e Login [%UserName%] Wit h Password=N%Password%, DEFAULT_DATABASE=[%Dat abase%], CHECK_EXPIRATION=OFF, CHECK_POLICY=OFF SQLCMD -S %Server% -E -d %Dat abase% -Q Creat e User [%UserName%] For Login [%UserName%] SQLCMD -S %Server% -E -d %Dat abase% -Q EXEC sp_addrolemember Ndb_owner, N%UserName%
Not e t he SQL user account must have db_owner permissions on t he dat abase in order for BGInfo t o work correct ly. This is why you should have a SQL user account specifically for t his dat abase.
Next , configure BGInfo t o connect t o t his dat abase by clicking on t he SQL but t on.
Fill out t he connect ion propert ies according t o your dat abase set t ings.
Select t he opt ion of whet her or not t o only have one ent ry per comput er or keep a hist ory of each syst em.
The dat a will t hen be dropped direct ly int o a t able named BGInfoTable in t he respect ive dat abase.
Now click t he File > Save As menu opt ion and save t he configurat ion as BGInfoCapt ure.bgi.
Of course, you probably want t o schedule t he capt ure process t o run on a schedule. This command creat es a Scheduled Task t o run t he capt ure process at 8 AM every morning and assumes you copied t he required files t o t he root of your C drive: SCHTASKS /Creat e /SC DAILY /ST 08:00 /TN Syst em Info /TR C:BGInfo.exe C:BGInfoCapt ure.bgi /Timer:0 /Silent /NoLicPrompt
Adjust as needed, but t he end result is t he scheduled t ask command should look somet hing like t his:
RECOMMENDED POSTS