![]() |
C++ program that checks if....
Hello.
I use Linux, and I have no experience in windows. I have to write a C++ program that checks if Java is installed. I have no idea how to check that (there is no directory such /usr/bin ). I need this for my Java app and I want check utility. Can you give me a example how to check if something is installed in windows. Thanks in advance, Jan Birsa |
You'll just have to check for the appropriate file or files in the appropriate directory(s). Just accomodate the fact that they have different names. You'll have to know, of course, where the Java might be installed, or search in several likely places. Refer to your documentation for the various file utility functions.
|
Any easyer way?
Is there any file which contains list of programs? |
Many programs are installed into the Program Files directory, though it isn't a requirement. DLLs may or may not be put elsewhere. Entries may or may not be made in the registry. I would suggest that if you are going to program for Windows, you learn how to work with Windows. Just a silly thought.
|
Quote:
|
Jan: you told us you wanted to use Windows...
|
Quote:
Quote:
|
I think what he meant was...get yourself used to windows and its thingimizgys. It might help you when you program for it. For example...if you know common sense windows stuff like...the registry and what its used for in windows...you would not have had to make this thread.
And well, if you are gona check if java works or not, why not simply if you can run a java program =) Like dawei said, it may or many not be in the registry. But if its to be used, its gota be in $PATH right? Unless its somewhere hidden...in which case you'd have to ask the user anyway. |
| All times are GMT -5. The time now is 1:54 AM. |
Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC