473,406 Members | 2,293 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Find the right version of a software

Hi Guys

I am working in making Access VBA code which needs another software, so first I need to check if this software is installed in the PC or not before I implement my codes.

I found one way to do this with searching for the directory, but then I figure out that I may have a different version, and also this directory may change based on the users, as you know when you install something it ask u if u want to change the default location, and sometimes the users do this, so I would like to avoid this!!! I want my code to be very perfect and consider all scenario.

My Question now, can I just search for the file without knowing the file location (the file path)... Normally the EXE file is the same for all version, so I want to search for this EXE file without knowing the path, just normal search.

This is the function that I have used for now and it works very fine...

Expand|Select|Wrap|Line Numbers
  1. Public Function File_Exists(ByVal sPathName As String, Optional Directory As Boolean) As Boolean
  2.     'Returns True if the passed sPathName exist
  3.     'Otherwise returns False
  4.     On Error Resume Next
  5.     If sPathName <> "" Then
  6.         If IsMissing(Directory) Or Directory = False Then
  7.             File_Exists = (Dir$(sPathName) <> "")
  8.         Else
  9.             File_Exists = (Dir$(sPathName, vbDirectory) <> "")
  10.         End If
  11.     End If
  12. End Function
  13.  
Thank you in advance for your help.

Regards
Mar 3 '13 #1
1 1308
zmbd
5,501 Expert Mod 4TB
I think you're goint to have to use something along the lines of: 4.Windows Management Instrumentation (WMI) Tutorial

This link shows the basics of usage and then you will need to follow the link given therein to find the correct call to locate your installed software.

Similar information can be found by Going to the bottom of this page, click in the Microsoft Access/ VBA Insights Sitemap link.
Mar 3 '13 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Billy Masopust | last post by:
I am trying to develop a beta version of some software in Visual C#. The software needs to expire and basically self-destruct in 15 days. How do I get the program to do this? The program needs...
3
by: hrishy | last post by:
Hi Folks and fellow IBMers I received a toolbox CD from IBM with DB2 version 8.1 when i installed it on linux and was trying ton create a instance it always failed saying that the instance...
1
by: Raquel | last post by:
Ours is the following configuration: Applications get triggered on Webserver; these applications connect to the DB2 connect gateway server (with DB2 Connect EE V 8.1 installed) and finally get...
19
by: Ken | last post by:
Hi, I need to modify an existing application that's written in C, C++ and Visual C++ so the application can be released as a time limited trial version, also the modifications must prevent the...
0
by: Nima | last post by:
Any idea? I'd like to know what software or library you use in order to do so. Many thanks.
0
by: methmonster | last post by:
There is a movie called FILECOPY.AVI which is included with Visual Studio 2005, but it is the 16 bit (Windows 95) version. There are a few other videos in the same directory that look like the 32...
6
by: joerozario | last post by:
i have created windows application in .net 2005. after a day when i clicked the exe the error si thrown as "Unable to find a version of the runtime to un this application" i know you to got...
4
by: =?Utf-8?B?UnVpIE9saXZlaXJh?= | last post by:
Where can I find XP version of FILECOPY.AVI, to use in a dialog? There is a movie called FILECOPY.AVI which is included with Visual Studio 2005, but it is the 16 bit (Windows 95) version. There...
1
by: vadlapatlahari | last post by:
Hi, Can any one please suggest me how to find the version of Expat i am on? Thanks in advance.
0
by: Mitchel Carlsen | last post by:
Please excuse my newbie question, but I'm trying to install pywin32 using Python26 on Windows 7 64-bit machine. When I run the "python setup.py -q install" command I get the following error: ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.