Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  HOME    TRACKER    Visual Basic

Check For Installed Programs?

hello, is there a way to check to see if MS ACCESS or MS WORD is installed on a machine? thanks.


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Check For Installed Programs
i want to know if icq is installed on the computer, if so then check if it's running.
same for kazaa or any other version of kazaa (kazaa lite...) how can i do this?

Checking Installed Programs (Add/Remove Programs Menu). Who Wanted It?
Here it is:

whack it all in a module, and make sure you have list1 on form1

VB Code:
Declare Function RegQueryValueEx Lib "advapi32.dll" Alias "RegQueryValueExA" (ByVal hKey As Long, ByVal lpValueName As String, ByVal lpReserved As Long, lpType As Long, lpData As Any, lpcbData As Long) As LongDeclare Function RegOpenKeyEx Lib "advapi32.dll" Alias "RegOpenKeyExA" (ByVal hKey As Long, ByVal lpSubKey As String, ByVal ulOptions As Long, ByVal samDesired As Long, phkResult As Long) As LongDeclare Function RegCloseKey Lib "advapi32.dll" (ByVal hKey As Long) As LongDeclare Function RegEnumKeyEx Lib "advapi32.dll" Alias "RegEnumKeyExA" (ByVal hKey As Long, ByVal dwIndex As Long, ByVal lpName As String, lpcbName As Long, lpReserved As Long, ByVal lpClass As String, lpcbClass As Long, lpftLastWriteTime As FILETIME) As LongPublic Declare Function RegOpenKey Lib "advapi32.dll" Alias "RegOpenKeyA" (ByVal hKey As Long, ByVal lpSubKey As String, phkResult As Long) As Long Type FILETIME  dwLowDateTime As Long  dwHighDateTime As LongEnd Type Public Const HKEY_CURRENT_CONFIG = &H80000005Public Const HKEY_PERFORMANCE_DATA = &H80000004Public Const KEY_ENUMERATE_SUB_KEYS = &H8Public Const HKEY_CLASSES_ROOT = &H80000000Public Const HKEY_CURRENT_USER = &H80000001Public Const HKEY_LOCAL_MACHINE = &H80000002Public Const HKEY_USERS = &H80000003Public Const HKEY_CURRENT_CONFIG = &H80000005Public Const HKEY_DYN_DATA = &H80000006Public Const REG_SZ = 1 'Unicode nul terminated stringPublic Const REG_BINARY = 3 'Free form binaryPublic Const REG_DWORD = 4 '32-bit numberPublic Const ERROR_SUCCESS = 0&Dim DispName As StringPublic Function GetSettingString(hKey As Long, _strPath As String, strValue As String, Optional _Default As String) As StringDim hCurKey As LongDim lResult As LongDim lValueType As LongDim strBuffer As StringDim lDataBufferSize As LongDim intZeroPos As IntegerDim lRegResult As Long 'Set up default valueIf Not IsEmpty(Default) ThenGetSettingString = DefaultElseGetSettingString = ""End If lRegResult = RegOpenKey(hKey, strPath, hCurKey)lRegResult = RegQueryValueEx(hCurKey, strValue, 0&, _lValueType, ByVal 0&, lDataBufferSize) If lRegResult = ERROR_SUCCESS Then If lValueType = REG_SZ Then strBuffer = String(lDataBufferSize, " ")lResult = RegQueryValueEx(hCurKey, strValue, 0&, 0&, _ByVal strBuffer, lDataBufferSize) intZeroPos = InStr(strBuffer, Chr$(0))If intZeroPos > 0 ThenGetSettingString = Left$(strBuffer, intZeroPos - 1)ElseGetSettingString = strBufferEnd If End If Else'there is a problemEnd If lRegResult = RegCloseKey(hCurKey)End FunctionSub EnumKeys()'Enumerates all software titles, then checks if they're listed in "Add/Remove Programs'Adds them to list1 and writes them to c:progs.txtDim keyname As String  ' receives name of each subkeyDim keylen As Long  ' length of keynameDim classname As String  ' receives class of each subkeyDim classlen As Long  ' length of classnameDim lastwrite As FILETIME ' receives last-write-to time, but we ignore it hereDim hKey As Long  ' handle to the HKEY_LOCAL_MACHINESoftware keyDim index As Long  ' counter variable for indexDim retval As Long  ' function's return valueOpen "c:progs.txt" For Output As #1retval = RegOpenKeyEx(HKEY_LOCAL_MACHINE, "SoftwareMicrosoftWindowsCurrentVersionUninstall", 0, KEY_ENUMERATE_SUB_KEYS, hKey)If retval <> 0 ThenMsgBox "Registry key could not be opened -- aborting."Write #1, "Registry key could not be opened -- aborting."Close #1  End  ' terminate the programEnd Ifindex = 0  ' initial index valueWhile retval = 0  ' while we keep having success (retval equals 0 from the above API call)  keyname = Space(255): classname = Space(255)  ' make room in string buffers  keylen = 255  classlen = 255  ' identify the allocated space  ' Get information about the next subkey, if one exists.  retval = RegEnumKeyEx(hKey, index, keyname, keylen, ByVal 0, classname, classlen, lastwrite)  If retval = 0 Then    ' Extract the useful information from the string buffers.    keyname = Left(keyname, keylen)  ' trim off the excess space    classname = Left(classname, classlen)    ' Display the returned information.        DispName = GetSettingString(HKEY_LOCAL_MACHINE, "SoftwareMicrosoftWindowsCurrentVersionUninstall" & keyname, "DisplayName")        'that checks if it is listed in "Add/Remove Programs"    If DispName <> "" Then        Form1.List1.AddItem DispName 'adds it to the list        Write #1, DispName 'writes them all to a file    End If  End If  index = index + 1  ' increment the index counterWendretval = RegCloseKey(hKey)Close #1 'closes the fileEnd Sub

feel free to comment, and if i helped you, please let me know

Installed Programs

I want to lget the list of installed programs of my computer in vb6...but i don't find any api or something like this.
I need some help


Looking For Installed Programs
Somebody has any experience listing all installed programs using VisualBasic Code


List Installed Programs

Im trying to list all the software intalled in my machine and the only method i know is to read the registry keys under HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionUninstall

I need to put all of this in a listbox.

whats the better way to get this?

Thank you

Test For Installed Programs?
Hi all,

I was wondering if someone could help me out. I have a program which sometimes displays .swf files and therefore needs the computer it is installed onto to have shockwave flash installed on it.

The problem is that some of the computers the program will be installed onto will not have shockwave flash on it. I was just wondering if anyone knew how to test the host computer and see if shockwave (any version) is installed on it. So if the computer does not have it installed, I can cause the program not to display these files and therefore get the program to run.



List Of Installed Programs?
Can anyone tell me how to get a list of installed programs in VB6? The listed programs will later be compared to another list of programs, but this (I hope) will be easier so I can work it out by my self.

I found this, but it's not for VB6

I know this isn't the easiest application to start with as I'm very new to programming, but I really want to make something useful rather than exercises. Thanks for your time


Do Vb Programs Run On Computers Without Vb Installed
or does the computer need to have something installed first? would a program i make on vb work on any computer

Checking If Certain Programs Are Installed
How do I check if the following programs are installed on a PC...?

MDAC 2.8
.NET Framework 1.1
MySQL ODBC 3.51 Drivers

Does anybody have code on how to do this, or an idea if I can check if these programs are installed.

Query For Installed Programs
In vb6, can I query the pc for a list of all installed programs like MS office, MS project, Winzip, etc?

Detecting Installed Programs
I'm trying to write a program that will detect which programs are installed on a computer (we have about 1,500 comps on our netowork), and write the information to the registry for inventory purposes. If someone could help me fill in the pseudo I would much appreciate it:

If(Winzip = Installed)
Print "winzip is installed".

Another (and better) way would be to get the entire list of installed programs (like the list in Add/Remove in the Control Panel) and parse it into the registry, is there a way to do this?

Re; Installed Programs From Registry

Just wondering is the list of programs installed on the $current$ computer always listed here :


And if so, is there a way of enumerating through that list of crap ?

How Can I Search For Installed Programs
how can i let my aplication search for all the installed programs
and if it find a program that it adds to a listbox?

Get Installed Programs List
Hi - Is there an API to get the list of programs in the Add/Remove Programs list.

(Or any other way to determine if a program has been installed under Xp and Vista?).

HKEY_CURRENT_USERSoftware? (Some programs add reg entries when just being run after being unzipped (not installed) - e.g., Audacity)

HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionUninstall? (is this reliable?)

Program Files (could be anywhere)?

I am told that installers such as Wise must be able to access this data. Any ideas?

Thanks - Ron

Environment Variable For Installed Programs?
I'm trying to find out what hotfixes are installed on a machine, and search the values of whatever is called, to find a certain patch or program that's installed. (Find out what's listed when you pull up the Windows Application Wizard.)

I've been using PSinfo.exe (by Sysinternals), and calling it with SHELL. I'm trying to output it to a text file using ">", but it's not working. If you know how to call some sort of environment variable to find out what's installed, straight from VB code, that'd be GREAT. Below is what I've been trying.

Private Sub Form_Load()
Dim Text As String
Dim Text2 As String
Dim Machines As Integer
Dim HotFixes As Integer

Machines = FreeFile
HotFixes = 2

Do Until EOF(Machines)
Line Input #Machines, Text
Shell "\rm2ks15exi658d$ oolspsinfo.exe -h OS \" & Text & " > C:patcheshotfixes.txt", vbNormalFocus
Open "C:patcheshotfixes.txt" For Input As #HotFixes
Text2 = Input(LOF(HotFixes), #HotFixes)
If InStr(Text2, "KB841356") Then
If InStr(Text2, "KB871250") Then
End If
End If

Can I Access All The Installed Programs On Windows?
Is there a way to list all the installed programs on machine thru all the programs listed in the ADD/REMOVE FUNCTION in the control panel?


Retrieving Installed Programs/Versions
How would one retrieve the names and versions of the programs installed on a workstation?

I need to grab the information that is displayed in Control Panel>Add/Remove Program and format the program name and version into a text string(s) to send to another computer.

I know how to do the sending to another computer but I don't know how to retrieve the information into my program.


How Can I Get Currently Installed Programs And Path Of Program?
I read it from "HKEY_LOCAL_MACHINE", "SOFTWAREMicrosoftWindowsCurrentVersionUninstall"
but i want to get path of program too, please help me
(sorry for my english)

Return List Of All Installed Programs
In Start / Settings / Control Panel / Add/Remove Programs there is a list of all the programs currently installed on the computer. How can I output this list to a spreadsheet?


Windows Versions && Installed VB-programs: Crashes?
I'm just new to this thing.... If I have compiled a VB 6.0 program and have made a setup, does the program always work on any version of Windows after installing? Or will it crash?

Can I Find All Programs Installed On A Client's System?
Is there a way I can list out all installed programs on a clients system?


Edited by - o1sowise on 4/21/2004 8:12:24 AM

Check If Dll Is Installed
I'd like to be able to check if uxtheme.dll is installed. It's only for a minor cosmetic thing so I don't want to go overboard with code that tests loads of things. I'm using "IsThemeActive" but on win 2000 the app won't start and gives an error:

"uxtheme.dll missing" or something like that. Someone tested it for me I don't have win 2000.

Is there a simple way just to check if uxtheme.dll is present? Or is there another (short) way that doesn't require lots of declarations and other code?
Many thanks for any help.

Edited by - royalbox on 2/23/2005 12:46:44 PM

How To Check If Tcp/ip Is Installed
what to do if i want to check in my application if tcp/ip and dialup is installed or not?

Check Whether SQL Is Installed
Hi Everyone

here is my problems

1 While installing a program I want to check whether MSSQL 7 or above is installed in the machine.If it is installed the setup must continue or if it is not installed the setup must prompt the user
to install MSSQL and the setup must exit

2 If MSSQL is installed I want to check whether servicemanager is running and if it is not running the user must be prompted to start the service manager.

3 After the Servicemanager is on I want to run the scripts intended for creating the database and tables.

4 When the program starts the user will be prompted for the SQLSERVER name and the value will be written to the registry. In the future if the name is changed I want to make changes to the registry values accordingly

Please help me

Check If Font Is Installed

I have an form which needs to ceck on it's activation if a certain font is installed on the local computer, if not the user should be promped to install the font in order to get the layout of the generated template right. I found that the following code skips trough the Word fonts, but I'm unable to determine if my font is installed:

Dim lFound As Boolean
Let lFound = False
For Each aFont In Application.FontNames
If aFont = "Kix Barcode" Then
Let lFound = True
End If
Next aFont
If lFound = False Then
Call MsgBox("Please install the font kixbrg__.ttf", vbExclamation, "Font not installed")
End If

Anyone knows what I'm doing worng? Or is this not the way I should do this?

Check For Installed Excel
Is the only way to check to see if excel is installed in with the CreateObject function. I would like to place a routine in the Form Load event to check if the computer has excel and then set the enable on a command button. I am also using a template and adding data to this template through VB6. I have to keep the template saved with a certain cell having the focus or the data gets displayed wrongly when VB6 writes the file. Can someone point me to a place where I can set the focused cell through VB6


How To Check If Excel Is Installed?
I'm writing a vb App to send some values to an excel sheet but before that I need to know if Excel is installed and enable or disable a command button accordingly.


Check If Right Library Is Installed

I am writing a dll that uses a lot of other programs on the computer. My problem is that how can I check that the right program/library is installed? The only way I can come up with, is to crate an instance of the program and test if there was an error (see sample code). The problem with this approach is that it takes forever to start up the program. Does any of you have another way to do this check?

Sample code;

Public Sub testVisio()
On Error GoTo ErrHandler
Dim app As Visio.Application
Set app = CreateObject("Visio.Application")
state "installed"
Exit Sub

state "notInstalled"
Err.Raise Err.Number, "test Visio", Err.Description, Err.HelpFile, Err.HelpContext
End Sub


How To Check If Font Is Installed??
In my program I need to see if the user has a certain font installed on their computer. How would I do this in Visual Basic? How possible would it be to get the program to install the font if the user doesn't have it?

Any help is much appreciated.

Check If There Is SQL-Server Installed
Hi there,

I need to check if there is SQL-Server installed in a determined PC, and get the complete path to its DATA folder (for create new database). I was thinking about to check all folders of the harddrives, and look for any specific file of MSSQL, but I guess that should have some easier and quicker way to do that...

Anyone has some clue about that?

PS: I believe that the idea should work with any other application, uh?


Check FONT Installed
Hi people! I need to check if a certain FONT is installed on a computer! I cant find anything about it but i guess there is a way to do it using an API.
Does anyone know how to do it?

Check If MS Access Is Installed
How can i check if a computer has MS Access installed on it?

Check If Realplayer Is Installed?

i hope to launch a link with realplayer from vb6.. but how can i know whether realone is installed?

How can i check a list of installed program like how we right click an unknown file.. ?? it display a list of tools for you to use right??

my case is this:
i got a mp3 path/link....

i hope to launch the realplayer with the mp3 path supplied from vb6.. but before i can do that, i must know where the realplay.exe is located.. what is the fastest way to do it?

Check If MS Office Is Installed
Is there a way, through code, to check if ms office is installed. I don't want to look for EXEs because it's not allways installed in the same folder.

Is it possible to search in the windows 95 registry and show a message if MS office os MS word are installed? (like in add/remove programs, it says microsoft office 2000 proffesional)

thanks a lot!

To Check If The Application Is Already Installed
Is it possible to check if the Application is already installed in a particular computer when I run a setup file through CD......I need to check my program in client machine whether the same Application is installed before, if not then go ahead otherwise show some messeges that the program was already installed.........all this when I am running the setup file through CD.

please help me...

Check If Printer Is Installed
How can I detect in code whether or not a printer is installed?

Tricky Check: Dll/ocx Installed?
Hi all!

I want to use msWinsock-control. No problem! ;)
But I don´t know whether the customer who gets the app distributed has this included component installed (in this case: mswinsck.ocx).
How can I check this before starting the application and raise an ugly windows/vb-error.
Do I really have to read the reg to get the system-folder and then check via fso, whether the file exists? Then it could be that the fso does not exist (Yes - we already had customers with this LITTLE problem )

I am sure you know a beautiful solution and thank you in advance

best regards

Is It Possible To Check Whether Drivers Are Installed Or Not?
    I need a VB Code which will check the system and says whether SQL Server Database Drivers are installed in the machine. If not SQL Server, then for MS Access.
    Is it possible to do it in VB?. Can anyone provide me a sample code for it?
    Thanks in advance.

Brainstorming Guy

Check Is Excel Is Installed
I want to check if excel is installed on a comp...
basically if excel exists my vb code opens excel ( i have figured out the code for that). however if there is no excel...i want a message to be does vb check is excel does not exists on a computer.

How Can I Check If A Program Is Installed?
i need a foolproof way of telling whether a user has MS excel installed. if so, ill generate a spreadsheet. if not ill just create a text file. would i try to create an excel object and assume its NOT installed if theres an error? can anyone help?

Check If MDac Is Installed
Hi Friends,

    How can I check in VB if MDAC is installed on machine? Also If there is not installed then how can I install it with the help of vbscript.

Thanks in advance
Manish Gupta

How To Check MDAC Is Installed In The PC?
How to check MDAC is installed in the PC?

S. Muhilan

How To Check DCOM Is Installed In The PC Or Not ?

Is DCOM necessary installed in th PC for VB 6 Application installtion process?

How to check DCOM is installed in the PC or not ?


Detect/check Vista Is Installed?
Is there a way to detect in my application created VB6 if the user has Vista installed?

Many thanks,


Check If User Has Excel Installed
1. Is this possible in VB ?
(there is no point in giving a user the option to read data from an exel file if Excel is not installed on his system)

2. I have added a reference to Excel 10.0 What if a user has version 9.0 installed ? Will that result in errors ?

Check If Adobe Acrobat Is Installed.
Hello all,
I am putting together a "e-book" in adobe acrobat. On the CD to be released, I wnt to put a small program that autostarts when the CD is insurted. The program must check if the acrobat reader is installed, and then launch the book, otherwise it must bring up a screen to inform the user that acrobat must be installed.

How can I check if acrobat is installed. If I check the registry, will the entries be the same for all PC OS's and versions of acrobat. Or is the another way?

Thanks in advance.

Check If A Service Exists (is Installed)
How can I check from VB6 if a given service is installed. I don't care to know if it is running or stopped, Just if it is installed

Thank You gauys

Check Registry For Installed Printers
Hello, I haven't used Visual Basic in several years, and Im trying to make a program that will read the users registry for the currently installed printers and then pop up a webpage with those printers listed on it. Is this possible? I have found this link :

Apparently it is in Word VBA, but i dont strictly understand all of it. Is word vba syntax the same as visual basic? Does this link describe what I need? If so, could someone maybe explain it to me?

Any help would be greatly appreciated,

Copyright 2005-08, All rights reserved