get Path of user home directory

Got a problem you cannot solve? Try here.
Post Reply
samer
Posts: 11
Joined: Mon May 10, 2010 3:21 am

get Path of user home directory

Post 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
Medical University of Vienna
Department of information management
Spitalgasse 23
1090 Vienna

+431404006692
MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Re: get Path of user home directory

Post by MichaelNesmith »

What is the WinAPI CSIDL of the folder you want to obtain?
Michael Nesmith
Install[b]Aware[/b]
[i]Home of The Next Generation MSI Installer[/i]
Get your free copy today - http://www.installaware.com/
samer
Posts: 11
Joined: Mon May 10, 2010 3:21 am

Re: get Path of user home directory

Post 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.
Medical University of Vienna
Department of information management
Spitalgasse 23
1090 Vienna

+431404006692
MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Re: get Path of user home directory

Post by MichaelNesmith »

Works for me just fine here. Did you actually un-check the "for all users" check-box?
Michael Nesmith
Install[b]Aware[/b]
[i]Home of The Next Generation MSI Installer[/i]
Get your free copy today - http://www.installaware.com/
samer
Posts: 11
Joined: Mon May 10, 2010 3:21 am

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

Post 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
Medical University of Vienna
Department of information management
Spitalgasse 23
1090 Vienna

+431404006692
MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Re: get Path of user home directory

Post by MichaelNesmith »

Use Read Registry / Is MSI Setup Installed / other similar commands...
Michael Nesmith
Install[b]Aware[/b]
[i]Home of The Next Generation MSI Installer[/i]
Get your free copy today - http://www.installaware.com/
samer
Posts: 11
Joined: Mon May 10, 2010 3:21 am

Re: get Path of user home directory

Post 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
Medical University of Vienna
Department of information management
Spitalgasse 23
1090 Vienna

+431404006692
MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Re: get Path of user home directory

Post by MichaelNesmith »

For that you'll need to consult the documentation of your own software kit.
Michael Nesmith
Install[b]Aware[/b]
[i]Home of The Next Generation MSI Installer[/i]
Get your free copy today - http://www.installaware.com/
samer
Posts: 11
Joined: Mon May 10, 2010 3:21 am

Re: get Path of user home directory

Post 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
Medical University of Vienna
Department of information management
Spitalgasse 23
1090 Vienna

+431404006692
MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Re: get Path of user home directory

Post by MichaelNesmith »

It depends entirely on the software installer used by your software, so that's why I suggested you check with them, actually.
Michael Nesmith
Install[b]Aware[/b]
[i]Home of The Next Generation MSI Installer[/i]
Get your free copy today - http://www.installaware.com/
samer
Posts: 11
Joined: Mon May 10, 2010 3:21 am

Re: get Path of user home directory

Post 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?
Medical University of Vienna
Department of information management
Spitalgasse 23
1090 Vienna

+431404006692
MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Re: get Path of user home directory

Post by MichaelNesmith »

You are asking about where InstallAware setups themselves record this information?
Michael Nesmith
Install[b]Aware[/b]
[i]Home of The Next Generation MSI Installer[/i]
Get your free copy today - http://www.installaware.com/
samer
Posts: 11
Joined: Mon May 10, 2010 3:21 am

Re: get Path of user home directory

Post by samer »

MichaelNesmith wrote:You are asking about where InstallAware setups themselves record this information?
right
Medical University of Vienna
Department of information management
Spitalgasse 23
1090 Vienna

+431404006692
MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Re: get Path of user home directory

Post 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
Michael Nesmith
Install[b]Aware[/b]
[i]Home of The Next Generation MSI Installer[/i]
Get your free copy today - http://www.installaware.com/
samer
Posts: 11
Joined: Mon May 10, 2010 3:21 am

Re: get Path of user home directory

Post 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
Medical University of Vienna
Department of information management
Spitalgasse 23
1090 Vienna

+431404006692
Post Reply