How to check if a program is installed (or find it's path) 
Author Message
 How to check if a program is installed (or find it's path)

I need to run an installation that installs into the same directory as
an existing program - how do I do it ?

Do I have to run through the registry or do I have to search the hard drive
looking for a particular file and then pull the directory from that
(infact any tips on how to do both would be good as this is for bith 16 & 32
bit systems.

Cheers
Nick



Mon, 05 Feb 2001 03:00:00 GMT  
 How to check if a program is installed (or find it's path)
If the existing program was mine, I would use the registry to keep track of
the install location and then read the path from the registry.  Using the
GetSetting and SaveSetting function is a quick and easy way to do this.

If I were trying to install to a third party software location, and I knew
that the existing software had registry entries that included the path, I
might try to do the registry thing as well.

If I had no clue as to what or where I was installing - for example, my app
just needs to be in the same folder with "foobar.dll" then I would do a
search of the hard drive to locate the file and use that information.

But that's just me . . . And it sounds like you were thinking the same
thing?

Hope that helps.

-- Charles H. Davidson

Quote:

>I need to run an installation that installs into the same directory as
>an existing program - how do I do it ?

>Do I have to run through the registry or do I have to search the hard drive
>looking for a particular file and then pull the directory from that
>(infact any tips on how to do both would be good as this is for bith 16 &
32
>bit systems.

>Cheers
>Nick



Mon, 05 Feb 2001 03:00:00 GMT  
 How to check if a program is installed (or find it's path)
Charles,

Thanks for that...atleast I know I'm going down the rigth path...queation is
how do I search for a file and then pull the diretory that the file is in ??

Any ideas ??



Tue, 06 Feb 2001 03:00:00 GMT  
 How to check if a program is installed (or find it's path)
Nick -

There is an excellent example at the Planet Source Code web site.  I think
the name of the routine is FindFile or something similar.  The code is
pretty complex and uses recursion, so it's best to check it out and then ask
questions if you don't understand.

http://www.planet-source-code.com/vb/

Good Luck

-- Charles H. Davidson

Quote:

>Charles,

>Thanks for that...atleast I know I'm going down the rigth path...queation
is
>how do I search for a file and then pull the diretory that the file is in
??

>Any ideas ??



Tue, 06 Feb 2001 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. getting a program to check for a font and installing it if not found

2. Find Program's Path

3. RegQueryValueEx - Finding program's path

4. How do I find User's Doc Directory for Install program

5. install the deployed program and couldn't find mdb file

6. Install the deployed program but couldn't find mbd file

7. I am trying to extract a program path from desktop icon

8. I am trying to extract a program path from desktop icon

9. I am trying to extract a program path from a desktop icon

10. creating an install program (which doesn't need to be installed itself)

11. How to Find Installed Application Path

12. Check for Installed Programs

 

 
Powered by phpBB® Forum Software