I need a very fast way to see if the user has another program installed.. It will be an EXE file but could possibly be anywhere on the system.. The program I need to detect is acrobat.exe (the full version of Acrobat).
Any tips on a fast way to detect it?
Thanks!
Detecting installed software
Detecting installed software
-Mitchell
Check out kBilling for all your billing software needs!
http://www.k-billing.com
Code Signing / Authenticode Certificates (Get rid of those Unknown Publisher warnings!)
http://codesigning.ksoftware.net
Check out kBilling for all your billing software needs!
http://www.k-billing.com
Code Signing / Authenticode Certificates (Get rid of those Unknown Publisher warnings!)
http://codesigning.ksoftware.net
detect
One easy PG (Pretty Good) method is:
ExamineDirectory (C:\Program Files\Adobe\Acrobat*)
Using the * as the wild card after Acrobat because some folders will say Acrobat 4.0 or Acrobat 5.0, etc...
From PB Help:
Start to examine the specified directory for future listing with commands NextDirectoryEntry()and DirectoryEntryName(). If #PB_Any is used as '#Directory' parameter, the new directory identifier will be returned as 'Result'. The Pattern$ specify which files must be listed. #Directory is the numerical ID and can be used by UseDirectory() to change directory. For example: "*.*" or "" will list all the file in the directory. "*.exe" will list only .exe files. If the result is 0, the directory can't be examined.
If the Adobe\Acrobat* folder exists, there is a PG (pretty good) chance that adobe acrobat is on their computer.
You can also do variations of this method to see if specific files in the Adobe* folder exist, certain universal files (dlls or .exes) that are used in all versions of Adobe Acrobat, or only in the full version of Adobe Acrobat. (AcroRd32.exe = Adobe Acrobat Reader (free Reader only) versus acrobat.exe = Adobe Acrobat Full commercial version)
ExamineDirectory (C:\Program Files\Adobe\Acrobat*)
Using the * as the wild card after Acrobat because some folders will say Acrobat 4.0 or Acrobat 5.0, etc...
From PB Help:
Start to examine the specified directory for future listing with commands NextDirectoryEntry()and DirectoryEntryName(). If #PB_Any is used as '#Directory' parameter, the new directory identifier will be returned as 'Result'. The Pattern$ specify which files must be listed. #Directory is the numerical ID and can be used by UseDirectory() to change directory. For example: "*.*" or "" will list all the file in the directory. "*.exe" will list only .exe files. If the result is 0, the directory can't be examined.
If the Adobe\Acrobat* folder exists, there is a PG (pretty good) chance that adobe acrobat is on their computer.
You can also do variations of this method to see if specific files in the Adobe* folder exist, certain universal files (dlls or .exes) that are used in all versions of Adobe Acrobat, or only in the full version of Adobe Acrobat. (AcroRd32.exe = Adobe Acrobat Reader (free Reader only) versus acrobat.exe = Adobe Acrobat Full commercial version)
Re: Detecting installed software
Why not check the registry (photoshop will get registered and you can see the complete installed program path.
HKEY_CLASSES_ROOT\Applications\Photoshp.exe\shell\open\command
if you find the path you only have to check if the exe still exist or not. hope this way may help you.
HKEY_CLASSES_ROOT\Applications\Photoshp.exe\shell\open\command
if you find the path you only have to check if the exe still exist or not. hope this way may help you.
-
dell_jockey
- Enthusiast

- Posts: 767
- Joined: Sat Jan 24, 2004 6:56 pm
Mitch,
- check the registry whether HKEY_CLASSES_ROOT has an entry for the *.PDF file name extension. If there's no such file name extension registered, quit searching any further.
- then, check the HKEY_CLASSES_ROOT\AcroExch.Document\Protocol\StdFileEditing\Server entry. This entry contains the full path to the executable.
- then use that executables' path to verify that that file actually exists.
- check the registry whether HKEY_CLASSES_ROOT has an entry for the *.PDF file name extension. If there's no such file name extension registered, quit searching any further.
- then, check the HKEY_CLASSES_ROOT\AcroExch.Document\Protocol\StdFileEditing\Server entry. This entry contains the full path to the executable.
- then use that executables' path to verify that that file actually exists.
Nice! Thanks guys!
-Mitchell
Check out kBilling for all your billing software needs!
http://www.k-billing.com
Code Signing / Authenticode Certificates (Get rid of those Unknown Publisher warnings!)
http://codesigning.ksoftware.net
Check out kBilling for all your billing software needs!
http://www.k-billing.com
Code Signing / Authenticode Certificates (Get rid of those Unknown Publisher warnings!)
http://codesigning.ksoftware.net
another way:
Code: Select all
file.s="test.pdf"
file_dir.s="c:\"
exe_path.s=Space(256)
CreateFile(0,file_dir+file)
FindExecutable_(file,file_dir,@exe_path)
CloseFile(0)
DeleteFile(file_dir+file)
Debug exe_path

