PLEASE READ FIRST!

I've now been blogging here since 2007! ...Wow, has it been that long already?! Over the years, I've covered a wide array of subjects from scripting, troubleshooting, to the occasional hobby project. I have literally heard from thousands of you over the years with questions or even just offering me a bit of thanks!

Recently, I quit my full-time job and started work on an IT business, Rhythm IT Solutions, helping other IT departments manage their IT environments. We're offering consulting & professional services (Office 365 Migrations, Network Discovery, Firewall Management, etc...) as well as Endpoint Management (AV, Patch Management EDR, Managed Backup, etc...)



If there is something (on my blog or not) that you could use some additional help with, I would LOVE to hear from you! Please feel free to reach out to me using the contact links here or the contact form on Rhythm's website.

For those wondering, I do plan on continuing my work on the blog. So don't worry! There are plenty of Greg Strike posts yet to come! 😊 Thanks for stopping by!

PLEASE READ FIRST!




I was working on a batch file last week and I needed to have access to an executable file’s details (specifically, the version). In some situations when a program is installed through Windows Installer you can access a program’s version from the registry, however, in my situation the file simply exists and was not installed.

The information that I needed access to can be found under the “Details” tab when you Right-Click / Properties. Here, I am interested in the VNCViewer’s version.

It took a while to come up with this method as I couldn’t easily find a way to access this from the Command Prompt / DOS. Unable to find anything, I decided to look into using WMI from DOS. That’s when I came up with the following using WMIC.

WMIC Path CIM_DataFile WHERE Name='%ProgramFiles:\=\\%\\UltraVNC\\vncviewer.exe' Get Version

This should work on any file that has the correct meta data embedded into it. To use this command in a batch file so I could compare versions, I did the following.

SET WMICCommand="WMIC Path CIM_DataFile WHERE Name='%ProgramFiles:\=\\%\\UltraVNC\\vncviewer.exe' Get Version"
REM Get the version of VNC viewer.
FOR /F "skip=1" %%X IN ('%WMICCommand%') DO (
	IF %%X == 1.0.9.6 GOTO :CORRECTVERSION
)

Hope this makes some of your searches easier!



PLEASE READ FIRST!

I've now been blogging here since 2007! ...Wow, has it been that long already?! Over the years, I've covered a wide array of subjects from scripting, troubleshooting, to the occasional hobby project. I have literally heard from thousands of you over the years with questions or even just offering me a bit of thanks!

Recently, I quit my full-time job and started work on an IT business, Rhythm IT Solutions, helping other IT departments manage their IT environments. We're offering consulting & professional services (Office 365 Migrations, Network Discovery, Firewall Management, etc...) as well as Endpoint Management (AV, Patch Management EDR, Managed Backup, etc...)



If there is something (on my blog or not) that you could use some additional help with, I would LOVE to hear from you! Please feel free to reach out to me using the contact links here or the contact form on Rhythm's website.

For those wondering, I do plan on continuing my work on the blog. So don't worry! There are plenty of Greg Strike posts yet to come! 😊 Thanks for stopping by!

PLEASE READ FIRST!





Gregory Strike

Husband, father, IT dude & blogger wrapped up into one good looking package.