This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Re: Setting files and folder destination to a custom/own path variable
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jan 26, 2018
01:32 AM
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
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
(4) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jan 27, 2018
04:23 AM
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
Just follow the "system search" wizard in InstallShield.
regards
Markus
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jan 28, 2018
11:25 PM
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
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
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jan 29, 2018
05:05 AM
So next time, try to use forum earlier 😉
regards
Markus
regards
Markus
![](/skins/images/D60DF682EA37BF37032955CE10F3F0BB/responsive_peak/images/icon_anonymous_message.png)
Not applicable
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Mar 02, 2018
12:24 PM
Try adding a "New Set Directory" custom action:
Directory Name = MYALLUSERSDOC
Directory Value = [REGISTRY_ENTRY_MYALLUSERSDOC]
schedule it after CostFinalize
Directory Name = MYALLUSERSDOC
Directory Value = [REGISTRY_ENTRY_MYALLUSERSDOC]
schedule it after CostFinalize
![](/skins/images/D60DF682EA37BF37032955CE10F3F0BB/responsive_peak/images/icon_anonymous_message.png)