Page 1 of 1

get Path of user home directory

Posted: Fri Jul 02, 2010 3:56 am
by samer
Hello,

i am still evaluating Installaware and have find, that it fulfills most of our requirements. The only problem i am facing, is to get the path of "my" home directory. With "Get Folder Location" you only can get the path of "my-My Documents, my->my music, ...". I have tried to get the path of "my-My Documents" and then get the parent directory of it with the help of "Extract Path". but it doesn't work. E.g in my Win XP there isn't a "my->my documents" directory; in this case "Get Folder Location" returns the common directory. But that isn't what i need.

Does anyone have a hint, to get the path of "my" home directory.

Thanks

Re: get Path of user home directory

Posted: Fri Jul 02, 2010 4:25 am
by MichaelNesmith
What is the WinAPI CSIDL of the folder you want to obtain?

Re: get Path of user home directory

Posted: Fri Jul 02, 2010 6:30 am
by samer
MichaelNesmith wrote:What is the WinAPI CSIDL of the folder you want to obtain?
I think it's ::{450d8fba-ad25-11d0-98a8-0800361b1103}. But when choosing "My-My Documents" in the "Get Folder Location" command, the installer always returns the path of the document-folder of "common files". I use Win XP.

Re: get Path of user home directory

Posted: Fri Jul 02, 2010 6:38 am
by MichaelNesmith
Works for me just fine here. Did you actually un-check the "for all users" check-box?

Re: get Path of user home directory / Check for an exisiting

Posted: Fri Jul 02, 2010 7:01 am
by samer
MichaelNesmith wrote:Works for me just fine here. Did you actually un-check the "for all users" check-box?
Thanks for your quick reply.
This is embarassing. I have overlooked it completely. By the way, i would be glad, if you can help me with following problem: When using "elevate administrators only" and a restricted user wants to install the product, is there any possiblity to let the installer check if there is a existing installation by an administrator. I know, that a restricted user can't install the product, if an administrator already has. But if the user wants to update his existing user-installation, and meanwhile an administrator has install a admin-installation, the installer will deinstall the previous version when the restricted user trys to update his version, but don't install a new instance (because there is a admin-installation).

So when a restricted user want to update his version, i want to check at the update-process if there is alread a admin-installation and warn the user, if there is one.

I hope i have described the use case understandable. That will be the last point for finishing the installer.

thanks for any help

Re: get Path of user home directory

Posted: Fri Jul 02, 2010 6:37 pm
by MichaelNesmith
Use Read Registry / Is MSI Setup Installed / other similar commands...

Re: get Path of user home directory

Posted: Mon Jul 05, 2010 3:39 am
by samer
MichaelNesmith wrote:Use Read Registry / Is MSI Setup Installed / other similar commands...
That is not exactly what i am looking for. I don't want to check if an installation exists, but if an installation by an admin exists. The problem with the Registry is, that after uninstallation there still are certain entries from the installation left. Which Key do i have to check for an admin-installation? And is the key valid for all Windows distributions (XP, Vista, 7)?

Thanks for any help

Re: get Path of user home directory

Posted: Mon Jul 05, 2010 4:32 am
by MichaelNesmith
For that you'll need to consult the documentation of your own software kit.

Re: get Path of user home directory

Posted: Mon Jul 05, 2010 5:16 am
by samer
MichaelNesmith wrote:For that you'll need to consult the documentation of your own software kit.
Maybe i didn't make myself clear enough: I want to check, if an existing installation is installed by an admin or an restricted user. the documentation of my own software kit can't help me in that case.

maybe i can check who installed a existing installation via the registry. Where does Installaware store its registry-keys? I think as an admin it will be in a folder under "hkey_local_machine" and for an restricted user under "hkey_current_user". But the main question is: which registry keys, stored by the installer, can i use, that are valid for alle Windows distributions and are deleted with uninstallation.

Thanks

Re: get Path of user home directory

Posted: Tue Jul 06, 2010 12:05 am
by MichaelNesmith
It depends entirely on the software installer used by your software, so that's why I suggested you check with them, actually.

Re: get Path of user home directory

Posted: Tue Jul 06, 2010 1:14 am
by samer
MichaelNesmith wrote:It depends entirely on the software installer used by your software, so that's why I suggested you check with them, actually.
isn't that installAware?

Re: get Path of user home directory

Posted: Tue Jul 06, 2010 2:21 am
by MichaelNesmith
You are asking about where InstallAware setups themselves record this information?

Re: get Path of user home directory

Posted: Tue Jul 06, 2010 3:39 am
by samer
MichaelNesmith wrote:You are asking about where InstallAware setups themselves record this information?
right

Re: get Path of user home directory

Posted: Tue Jul 06, 2010 12:22 pm
by MichaelNesmith
You said earlier:
But the main question is: which registry keys, stored by the installer, can i use, that are valid for alle Windows distributions and are deleted with uninstallation.
So that was certainly misleading.

If you actually control the InstallAware setup(s) in question, you can write to and read from where-ever you want. Otherwise, I think the answer in this thread might help out: www.installaware.com/forum/viewtopic.php?f=2&t=5763

Re: get Path of user home directory

Posted: Wed Jul 07, 2010 1:00 am
by samer
If you actually control the InstallAware setup(s) in question, you can write to and read from where-ever you want. Otherwise, I think the answer in this thread might help out: http://www.installaware.com/forum/viewt ... f=2&t=5763[/quote]

Thanks