Change Powershell Script to VB Script
Hello, I am completely new to VB scripting. I have a powershell script that needs to work in VB. Here is the powershell version:
$version = Get-FileVersionInfo C:\ProgramData\folder*\filename.exe
if ($version.FileVersion -like '10.5.8*')
{return $version.FileVersion}
else
{}
Summary of script: There is an executable (filename.exe) that lives in c:\ProgramData\foldername. The full path to the .exe is different on every installation, so it could be in c:\programdata\foldername1234\filename.exe, or c:\programdata\foldername2345\filename.exe, etc.
I need to check the file version of the .exe, see if its like a certain version, if so, return the version number, if not, return null.
Any help would be FANTASTIC!!!
http://www.activexperts.com/network-monitor/windowsmanagement/adminscripts/ - 786_ak 10 years ago
Dim file1
Dim version
FILE1 = "C:\ProgramData\folder*\filename.exe"
version = ("10.5.8*")
Set objFSO = CreateObject("Scripting.FileSystemObject")
If objFSO.GetFileVersion(FILE1) - like version Then
WshShell.run(path To executable)
end if - hvasudeva 9 years ago