This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallAnywhere
- :
- InstallAnywhere Forum
- :
- determine "My Documents" location on Windows
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 23, 2009
06:19 AM
determine "My Documents" location on Windows
Hello there,
Is it possible to determine "My Documents" location on Windows using IA or I should be writing custom code using DLL from java, for example?
Thanks in advance for your help!
Is it possible to determine "My Documents" location on Windows using IA or I should be writing custom code using DLL from java, for example?
Thanks in advance for your help!
(7) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 23, 2009
06:24 AM
Quoting from the manual:
While I cannot test now for sure, but I think that on Windows that resolves to:
so the My Documents if it exists should be $USER_HOME$$/$My Documents
Home Directory $USER_HOME$
The home directory of the end user running the installer. For users who have already included the variable $UNIX_USER_HOME$, this variable will continue to function with the same definition as $USER_HOME$.
While I cannot test now for sure, but I think that on Windows that resolves to:
C:\Documents and Settings\Username
so the My Documents if it exists should be $USER_HOME$$/$My Documents
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 23, 2009
06:44 AM
pv7721 wrote:
Quoting from the manual:
While I cannot test now for sure, but I think that on Windows that resolves to:C:\Documents and Settings\Username
so the My Documents if it exists should be $USER_HOME$$/$My Documents
Thank you for your reply!
Well, I thought about this, but My Documents folder can be moved to any location or you are sure that is always under $USER_HOME$?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 23, 2009
07:19 AM
Well, I guess you're right, so you've got at least in the GUI install mode a panel that is called search for files / folder so you can look for it. But then again it can be renamed. Maybe you should prompt the user: where do you want your documents to be saved?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 23, 2009
07:54 AM
pv7721 wrote:
Well, I guess you're right, so you've got at least in the GUI install mode a panel that is called search for files / folder so you can look for it. But then again it can be renamed. Maybe you should prompt the user: where do you want your documents to be saved?
That might be a solution. However, I think it might be the case that for back compatibility issues I need to know the folder without asking, because previous installer was created using InstallAnywhere and all the data was written to a subfolder in My Documents without promting, so it would be nice to do the same. Probably I will have to go for DLL and JNI-like solution.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 23, 2009
08:18 AM
You don't think you can do it in pure Java? (you might want to look at their API that would allow custom code) (all you need to do is to silently find the folder... or you might have this information in the registry and there definitely are some built-in methods to get information from the Windows registry).
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 23, 2009
08:35 AM
pv7721 wrote:
You don't think you can do it in pure Java? (you might want to look at their API that would allow custom code) (all you need to do is to silently find the folder... or you might have this information in the registry and there definitely are some built-in methods to get information from the Windows registry).
Yes, searching through registry is another option, actually. Need to find out where it is stored. 🙂
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 24, 2009
12:50 AM
in IS you can achieve this by using PersonalFolder.
