We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

redmaze
Posts: 5
Joined: Sat Oct 29, 2005 8:51 pm

finding existing jre directory

I am trying to detect if java 3d is installed because my software requries it. However, I am having a hard time finding the current jre directory so I can check in the JRE/bin/ directory for the existance of J3D.dll. I tried checking the registry of an entry for java 3d, but I could not find one.

Any help would be extremely appreciated.
Mike
Posts: 292
Joined: Wed Jun 01, 2005 10:50 am
Location: Craiova, Romania
Contact: Website

Hi,

You could conduct a search for the J3D.dll file. The result of the property will be the complete path to the file. After that, you can use a custom action to extract from that value the path that you require.

Regards,
Mihai
Mihai Bobaru
Advanced Installer Team
http://www.advancedinstaller.com
redmaze
Posts: 5
Joined: Sat Oct 29, 2005 8:51 pm

What are the chances you have an example? I tried searching for the J3D.dll, but I could never find it (with the installer that is... it does live on my system ;) ). Maybe I did not setup the search correctly, or maybe I did not do the action correctly. Anyhow, any chance you can post what I should do to make this happen? It would be greatly appreciated....
Mike
Posts: 292
Joined: Wed Jun 01, 2005 10:50 am
Location: Craiova, Romania
Contact: Website

Hi,

To conduct a search for a file go to the "Search" page:

- use the "New File Search" toolbar button. Change the name from YourFile.exe to the name of the file you are searching for.
- right-click the new search appeared in the tree and select Add Location -> Folder. Select the folder in which you expect to find the file. You could use, for example, [ProgramFilesFolder], if your file should be located in this folder.

Hope this helps.

Regards,
Mihai
Mihai Bobaru
Advanced Installer Team
http://www.advancedinstaller.com
redmaze
Posts: 5
Joined: Sat Oct 29, 2005 8:51 pm

Ok... I got the search. Does the depth matter in the Directory Properties page? Now how do I use this in a prerequisite? Specifically in the Search Type? If this file is not there, I want to force the installation of java 3d.

I named the search J3D.

I try to use [J3D] in the File To Search field of the Search Type in the Prequisite panel. However, it always prompts me to install j3d which tells me it could not find J3D.dll.

Is there a way to print out the value of J3D?
Mike
Posts: 292
Joined: Wed Jun 01, 2005 10:50 am
Location: Craiova, Romania
Contact: Website

Hi,

If you want to use that file as a prerequisite condition, you don't need to setup any search as Advanced Installer will do this automatically for you. All you need to do is enter the probable location of the file and it's name.

In your case this could be [ProgramFilesFolder]J3D.dll, if the file should be located in the Program Files folder. The search depth means how many levels the search should go in depth in the folder structure. A larger value means more chances to find the file, but larger search time.

The condition when you choose the file to search is that it should be a versioned file. This way AI can compare it's version to the one you supply as required.

Regards,
Mihai
Mihai Bobaru
Advanced Installer Team
http://www.advancedinstaller.com
redmaze
Posts: 5
Joined: Sat Oct 29, 2005 8:51 pm

Great! This really helps. I just have one more question. Not sure if you have ever noticed, but on windows sometimes there are multiple jre installed. What happens to the search if there are multiple J3D.dll? Does it stop after it finds the first one? Is there a way to see if the J3D.dll is in the "preferred" jre?
Mike
Posts: 292
Joined: Wed Jun 01, 2005 10:50 am
Location: Craiova, Romania
Contact: Website

Hi,

The search will stop, of course, after the file is found. There will be no search for any additional copies. I'm afraid that there is no way to tell if it is in the preffered JRE.

Regards,
Mihai
Mihai Bobaru
Advanced Installer Team
http://www.advancedinstaller.com

Return to “Common Problems”