VMware Cloud Community
espi3030
Expert
Expert

BGINFO

Hello all,

Please don't let the subject of this question fool you, because this has proven so far to be a little more complicated than initially thought. What I would like to do is display VMware Tools version on the desktop of VMware VM's only as shown here --> . It would be easy to add this to a AD logon script but we already have too many logon scripts as it is, and I really don't feel like modifying any of them or adding a whole new script just for this. We have enough VM's for this to be useful but not enough to add it to a AD logon script. Finally my question... Does anyone out there know of a way to script this from say the VIC side or from an initial VM deployment? The reason I mentioned before that this needs to be on VMware VM's only is because we have MS Virtual Server VM's as well.

Or if someone is already doing something similar in a whole different way, I would love to hear it. Thank you!

0 Kudos
5 Replies
Troy_Clavell
Immortal
Immortal

We went down this road awhile back but never completed the project because we decided to use another wallpaper image. Couldn't you load this into your default user profile, this way when bginfo kicks in through startup, it will load for everyone?

0 Kudos
espi3030
Expert
Expert

I could but like I said I want to try and avoid pushing this out to all computers in our domain. I would like to try and limit it to VMware VM's.

0 Kudos
Troy_Clavell
Immortal
Immortal

how we handle it in our Server VM's is to just incorporate it into the template. This will help with future deployments, but not now. I'm sure there is a way to script this, possibly creating the specific bginfo specifications you want, then doing some sort of loop script based on host name that copies that the all users startup.

Here's something I did awhile ago that copied a .txt file, it should be same sort of thing

Const ForReading = 1

Const OverwriteExisting = TRUE

Set objFSO = CreateObject("Scripting.FileSystemObject")

Set objFile = objFSO.OpenTextFile("C:\Scripts\Computers.txt")

Do Until objFile.AtEndOfStream

strComputer = objFile.ReadLine

strRemoteFile = "
" & strComputer & "\C$\bannerchkvpcfile.txt"

objFSO.CopyFile "C:\Scripts\bannerchkvpcfile.txt", strRemoteFile, OverwriteExisting

Loop

0 Kudos
espi3030
Expert
Expert

Thank you all for your responces. What I ended up doing is simply adding one line to our existing logon script (I didn't know it would be that easy). That line was to copy a new .vbs script if it did not exist in the BGINFO directory, that script is:

strComputer = "."

Set objWMIService = GetObject _

("winmgmts:
" & strComputer & "\root\cimv2")

Set colFiles = objWMIService.ExecQuery _

("SELECT * FROM CIM_DataFile WHERE Name = 'C:
Program Files
VMware
VMware Tools
VMwareService.exe'")

For Each objFile in colFiles

Wscript.Echo objFile.Version

Next

Please note the "Wscript." in bold must be deleted for BGINFO to execute this properly. After creating this new script and adding the custom filed to the background.bgi file, everything worked well. I must say this was alot easier than I thought.

Thank you.

0 Kudos
Troy_Clavell
Immortal
Immortal

yes, login scripts are great for pushes as well. Glad to see you got it resolved

Please consider awarding points if you feel any answers were useful

0 Kudos