Click to See Complete Forum and Search --> : Determine path of installation
niazjkhan
April 8th, 2003, 10:44 PM
How do i get the path specified by the user during the installation of the solution?
I believe the path information is stored in Windows installer directory database under TARGETDIR. Now how do i access this TARGETDIR property?
Is there any APIs for access?
Andreas Masur
April 9th, 2003, 02:47 AM
Well...where do you need this path? From inside your application? In this case you can just get the application path itself by using 'GetModuleFileName()' as described in this FAQ (http://www.codeguru.com/forum/showthread.php?s=&threadid=231171), assuming that you are Windows...
L.Tony
September 19th, 2008, 12:19 AM
hey
where you want to get that property???inside any DLL???
then you can use the function:
UINT variable = MsiGetProperty (MSIHANDLE, TEXT("CustomActionData"), your buffer, DWORD cchValueBuf);
dont forget to add [TARGETDIR] in the setup program's corresponding DLL's ->properties->CustomActionData
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.