Community Forums
Results 1 to 5 of 5

Thread: Setting files and folder destination to a custom/own path variable

  1. #1
    Join Date
    Jul 2017
    Location
    Mainz, Germany
    Posts
    7

    Angry Setting files and folder destination to a custom/own path variable

    Hello to everyone,

    after days and days I'm frustrated in creating a custom destination for my "files and folders".

    The point is, that I want to install some files in C:\users\public\documents\... because they need to be accessable and writable for all users. First I used the predefinied folder [ALLUSERSPROFILE] but this solution doesn't work solid. Under Win 7/8 it works perfectly, but under Win 10 the return path is C:\ProgramData\ and not C:\users\public\....

    So I've created a own "path variable" called "MYALLUSERSDOC" from type registry where i read the "allusersdocuments" from HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders\Common Documents. Now I want to use this path variable in my "files and folder" destinations but i don't know how :-( I tried to create a new folder, in the properties I set the target to "[MYALLUSERSDOC]" but the result is a new folder named "MYALLUSERSDOC", not "C:\users\public\...".

    What is my mistake? How can I use a own path variable for folder destination?

    Thank you very much for help! I'm getting more and more frustrated...

    Robert

  2. #2
    Join Date
    Dec 2001
    Location
    Bellheim, Rheinland-Pfalz, Germany
    Posts
    119
    If I assume that your project is basic msi, then define a "system search" for "Folder path, as specified by a registry entry", use your registry path and key and store in i.e. in MYALLUSERSDOC and use for your component.

    Just follow the "system search" wizard in InstallShield.

    regards

    Markus

  3. #3
    Join Date
    Jul 2017
    Location
    Mainz, Germany
    Posts
    7

    [solved]

    Good Morning Markus,

    sorry, I forgot to mention it, yes it is a basic msi project

    Your solution works perfectly, I didn't think it would be so easy. Thank you very much!

    Best regards,

    Robert

  4. #4
    Join Date
    Dec 2001
    Location
    Bellheim, Rheinland-Pfalz, Germany
    Posts
    119
    So next time, try to use forum earlier ;-)

    regards

    Markus

  5. #5
    Join Date
    Nov 2016
    Posts
    15
    Try adding a "New Set Directory" custom action:

    Directory Name = MYALLUSERSDOC
    Directory Value = [REGISTRY_ENTRY_MYALLUSERSDOC]

    schedule it after CostFinalize

Posting Permissions

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