Summary
This article provides information on how to target the ?Users\Public? as your INSTALLDIR regardless of the volume label, i.e. C:\ D:\ etc.Synopsis
This article provides information on how to target the ?Users\Public? as your INSTALLDIR regardless of the volume label, i.e. C:\ D:\ etc.Discussion
Starting with Windows Vista Microsoft added a new directory that is by default C:\Users\Public. This directory is not one of the predefined directories in InstallShield and is not specified in the Microsoft Directory Table. You could simply point to C:\Users\Public as your INSTALLDIR, but you will face problems if Windows is not installed to C:\.Here are two different methods to accomplish this. The first is a very simple method of using an environment variable. The second is more complicated, but this can be used as a guideline to resolve to other paths where there location is stored in a registry value.
Method 1:
1: In your Basic MSI project you could set INSTALLDIR to [%Public] using a custom action. This value is not exclusive to INSTALLDIR and can be used with other properties as well.
Method 2:
1: In your Basic MSI project leave the INSTALLDIR set to the default value.
2: In the Installation Designer view go to Behavior and Logic, and select System Search.
3: Right click under system search, and choose Add, and choose Folder path, as specified by a registry entry.
4: Set the Registry Root to HKEY_LOCAL_MACHINE, set the Registry Key to SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList, and for Registry Value, set this to Public. Doing this will allow the installer to resolve where the Public Directory is located on the system.
5: In the next view choose Just store the value in the property, and name the Property whatever you would like, for example I used MYINSTALLDIR, and make note of this.
6: under Behavior and Logic, select Custom Actions and Sequences.
7: Right click on Custom Actions, and choose New Set Property.
8: Select your new Custom Action and under the Common tab set the Property Name to INSTALLDIR, and set the Property Value to the name of Property you stored the System Search to, in my case MYINSTALLDIR, and I have this set as the First Action, in the Install UI Sequence. Please note if you plan on running this installer silently you will need to move this to the Install Exec Sequence.
9: Your installer will now target the ?Users\Public? as your INSTALLDIR.
10: If you do not want to use INSTALLDIR you can use another property of your choosing.
Method 3:
?
1. Set the Destination of your Component to [WindowsVolume]Users\Public
Additional Information
For more information see Microsoft article KNOWNFOLDERID. In this article you will find out about the KNOWNFOLDERID constant FOLDERID_Public related to this matter.Reference: FOLDERID_Public
Was this helpful?
Related Articles
Specifying the Required Execution Level for Your Setup Launcher on Windows Vista and Later 3Number of Views Reactivation Process for InstallShield 2014 & Later 35Number of Views Windows Installer 4.5 Prerequisite Installation Issue on Windows Vista Systems 3Number of Views Custom Action Can Fail on Windows Vista If ALLUSERS Is Not Set 3Number of Views Some files won't register on Windows Vista and Windows 7 4Number of Views
Revenera Assistant
Online
Hi, I am Reva - Ask me anything.
Updates
No new updates
Chat
Home
Updates
/**/
Thanks for the feedback!
Your feedback has been saved.Rate this response:
1
2
3
4
5
Add Additional feedback ( Optional )
0/240
English
English
Language changed successfully
Something went wrong
Email sent successfully
Something went wrong
Case create successfully
Are you sure you want to cancel
the case creation?
Please select a product to submit the case.
Please select a product version to submit the case.
0/255
Upload Attachment
File Upload
Maximum file
size allowed is 3 MB.
File type
not supported.
Supported file types:
Documents (.txt, .doc, .docx, .pdf), Images (.jpg, .png), Comma Separated Files
(.csv) Speadsheets (.xlsx, .xls)
Are you sure you want to cancel the case creation?
Case closed successfully
File Upload
Maximum file size allowed is 3 MB.
File type not supported.
Supported file types:
Documents (.txt, .doc, .docx, .pdf), Images (.jpg, .png), Comma Separated Files
(.csv) Speadsheets (.xlsx, .xls)
Are you sure you want to close this case
| Products | Region | Phone Numbers |
|---|---|---|
| FlexNet Operations FlexNet Embedded FlexNet Publisher FlexNet Connect FlexNet Code Insight InstallAnywhere InstallShield |
North America * |
+1 630-332-2513 (toll) +1 877-279-2853 (toll-free in North America) |
| Europe * |
+44 1925 944367 (toll) +44 800 047 8642 (toll-free in Europe) |
|
| Japan * | +81 3-4540-5335 (select option 2) | |
| Australia * |
+61 3 9895 2177 +61 1800 560 603 (toll-free in Australia) |
|
|
Usage Intelligence (formerly
Revulytics) Compliance Intelligence |
Please use the Case Portal to submit your support ticket or reach out to your Revenera contact. | |
File Upload
Maximum file
size allowed is 3 MB.
File type
not supported.
Supported file types:
Documents (.txt, .doc, .docx, .pdf), Images (.jpg, .png), Comma Separated Files
(.csv) Speadsheets (.xlsx, .xls)
© 2026 Flexera Software. All Rights Reserved.
Case id: 00001065
Activity: Status change: 2 hours ago