CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Apr 2003
    Posts
    1

    Determine path of installation

    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?

  2. #2
    Join Date
    May 2000
    Location
    KY, USA
    Posts
    18,652
    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, assuming that you are Windows...

  3. #3
    Join Date
    Aug 2008
    Posts
    25

    Re: Determine path of installation

    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
    Last edited by L.Tony; September 19th, 2008 at 12:21 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured