bhomass
asked on
find the installation directory set by user
I am creating a c# app installation program using the VS .Net setup wizzard. The installation program allows the user to customize the installation directory as is usually done. is there a way I can capture the installation directory chosen during the installation process to store in the registry for later retrieval?
Thanks
Bruce
Thanks
Bruce
ASKER
Hi mnasman
same answer as in my other thread. it is because I need this for an Excel add-in dll. the two calles you suggested will return path for Excel.exe, not my add-in.
Bruce
same answer as in my other thread. it is because I need this for an Excel add-in dll. the two calles you suggested will return path for Excel.exe, not my add-in.
Bruce
then use
MessageBox.Show(Applicatio n.Executab lePath.ToS tring());
MessageBox.Show(Applicatio
ASKER
I have already determined that System.Reflection.Assembly .GetExecut ingAssembl y().Locati on.ToStrin g() is the one that can give me the right path at run time.
I am leaving this question open to see if anyone can tell me how to find the user designated installation directory from the setup wizzard. I believe this can be done because there are many apps on my system which records the installation directory as a registry entry under HKEY_currentuser/software.
Bruce
I am leaving this question open to see if anyone can tell me how to find the user designated installation directory from the setup wizzard. I believe this can be done because there are many apps on my system which records the installation directory as a registry entry under HKEY_currentuser/software.
Bruce
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
For more detailed instructions, please specify where help is needed...
ASKER
wonderful. Thanks
Why you don't return the directory of your application when it's run?, this will work even if the user copy your exe to another place
use
MessageBox.Show(Applicatio
MessageBox.Show(System.App
to return the path of your running application, you can get it then store it wherever
HTH
Regards,