<p>I'm troubleshooting a problem with creating Vista shortcuts.</p>

<p>I want to make sure that our Installer is reading the Programs folder from the right registry key.</p>

<p>It's reading it from:</p>

<pre><code>HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders\Programs
</code></pre>

<p>And it's showing this directory for Programs:</p>

<pre><code>C:\Users\NonAdmin2 UAC OFF\AppData\Roaming\Microsoft\Windows\Start Menu\Programs
</code></pre>

<p>From what I've read, this seems correct, but I wanted to double check.</p>

[{'answer_id': 57866, 'author': 'GEOCHET', 'author_id': 5640, 'author_profile': 'https://Stackoverflow.com/users/5640', 'pm_score': 0, 'selected': False, 'text': '<p>Sounds correct to me.</p>\n'}, {'answer_id': 57869, 'author': 'Tadmas', 'author_id': 3750, 'author_profile': 'https://Stackoverflow.com/users/3750', 'pm_score': 2, 'selected': False, 'text': '<p>Don\'t use the registry to read this.  Use <a href="http://msdn.microsoft.com/en-us/library/bb762181(VS.85).aspx" rel="nofollow noreferrer">SHGetFolderPath</a> with CSIDL_PROGRAMS.</p>\n\n<p>For a reason why, see Raymond Chen\'s comments on the "Shell Folders" key:</p>\n\n<p><a href="http://blogs.msdn.com/oldnewthing/archive/2003/11/03/55532.aspx" rel="nofollow noreferrer">http://blogs.msdn.com/oldnewthing/archive/2003/11/03/55532.aspx</a></p>\n'}, {'answer_id': 57871, 'author': 'Darren Kopp', 'author_id': 77, 'author_profile': 'https://Stackoverflow.com/users/77', 'pm_score': 2, 'selected': True, 'text': '<p>use windows installer properties. will probably be easier.</p>\n\n<p><a href="http://msdn.microsoft.com/en-us/library/aa370905(VS.85).aspx#system_folder_properties" rel="nofollow noreferrer">http://msdn.microsoft.com/en-us/library/aa370905(VS.85).aspx#system_folder_properties</a></p>\n'}, {'answer_id': 57873, 'author': 'Factor Mystic', 'author_id': 1569, 'author_profile': 'https://Stackoverflow.com/users/1569', 'pm_score': 1, 'selected': False, 'text': '<p>You should probably use API for this, such as <a href="http://msdn.microsoft.com/en-us/library/bb762181(VS.85).aspx" rel="nofollow noreferrer">SHGetFolderPath</a></p>\n'}, {'answer_id': 58068, 'author': 'Clay Nichols', 'author_id': 4906, 'author_profile': 'https://Stackoverflow.com/users/4906', 'pm_score': 0, 'selected': False, 'text': '<p>Example of the SHGetFolderPath in VB\n<a href="http://support.microsoft.com/kb/252652" rel="nofollow noreferrer">http://support.microsoft.com/kb/252652</a></p>\n'}, {'answer_id': 58261, 'author': 'Clay Nichols', 'author_id': 4906, 'author_profile': 'https://Stackoverflow.com/users/4906', 'pm_score': 0, 'selected': False, 'text': '<p>Helpful code snippet:</p>\n\n<pre><code>public class Utilities\n{\n\n    public enum FolderPaths\n    {\n        CSIDL_DESKTOP                   = 0x0000,        // &lt;desktop&gt;\n        CSIDL_INTERNET                  = 0x0001,        // Internet Explorer (icon on desktop)\n        CSIDL_PROGRAMS                  = 0x0002,        // Start Menu\\Programs\n        CSIDL_CONTROLS                  = 0x0003,        // My Computer\\Control Panel\n        CSIDL_PRINTERS                  = 0x0004,        // My Computer\\Printers\n        CSIDL_PERSONAL                  = 0x0005,        // My Documents\n        CSIDL_FAVORITES                 = 0x0006,        // &lt;user name&gt;\\Favorites\n        CSIDL_STARTUP                   = 0x0007,        // Start Menu\\Programs\\Startup\n        CSIDL_RECENT                    = 0x0008,        // &lt;user name&gt;\\Recent\n        CSIDL_SENDTO                    = 0x0009,        // &lt;user name&gt;\\SendTo\n        CSIDL_BITBUCKET                 = 0x000a,        // &lt;desktop&gt;\\Recycle Bin\n        CSIDL_STARTMENU                 = 0x000b,        // &lt;user name&gt;\\Start Menu\n        CSIDL_MYDOCUMENTS               = CSIDL_PERSONAL, //  Personal was just a silly name for My Documents\n        CSIDL_MYMUSIC                   = 0x000d,        // "My Music" folder\n        CSIDL_MYVIDEO                   = 0x000e,        // "My Videos" folder\n        CSIDL_DESKTOPDIRECTORY          = 0x0010,        // &lt;user name&gt;\\Desktop\n        CSIDL_DRIVES                    = 0x0011,        // My Computer\n        CSIDL_NETWORK                   = 0x0012,        // Network Neighborhood (My Network Places)\n        CSIDL_NETHOOD                   = 0x0013,        // &lt;user name&gt;\\nethood\n        CSIDL_FONTS                     = 0x0014,        // windows\\fonts\n        CSIDL_TEMPLATES                 = 0x0015,\n        CSIDL_COMMON_STARTMENU          = 0x0016,        // All Users\\Start Menu\n        CSIDL_COMMON_PROGRAMS           = 0X0017,        // All Users\\Start Menu\\Programs\n        CSIDL_COMMON_STARTUP            = 0x0018,        // All Users\\Startup\n        CSIDL_COMMON_DESKTOPDIRECTORY   = 0x0019,        // All Users\\Desktop\n        CSIDL_APPDATA                   = 0x001a,        // &lt;user name&gt;\\Application Data\n        CSIDL_PRINTHOOD                 = 0x001b,        // &lt;user name&gt;\\PrintHood\n        CSIDL_LOCAL_APPDATA             = 0x001c        // &lt;user name&gt;\\Local Settings\\Applicaiton Data (non roaming)\n    }\n\n\n    [DllImport("shfolder.dll", CharSet = CharSet.Unicode)]\n    public static extern int SHGetFolderPath(IntPtr owner, int folder, IntPtr token, int flags, StringBuilder path);\n}\n\nvoid MyFunction()\n{\n    StringBuilder path = new StringBuilder(260);\n\n    String folderPath = "";\n    if (0 == Utilities.SHGetFolderPath(IntPtr.Zero, (int) Utilities.FolderPaths.CSIDL_MYVIDEO, IntPtr.Zero, 0, path))\n    {\n        folderPath = path.ToString();\n    }\n\n}\n</code></pre>\n'}]
['https://Stackoverflow.com/questions/57855', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/4906/']