Registry setting value using dynamic path during install

I have a Visual Studio 2008 setup project that is updating a registry setting. I need to get the actual Windows\Start Menu\Programs folder name for the value of the registry key. I was hoping that [ProgramMenuFolder] would work, but it doesn't. Is it possible to set this value correctly using the Registry editor of the Setup project. Here is the registry key I ultimately want, but since this will have international installations, Start Menu\Programs will not always be correct.
Key         Value
App4      \Windows\Start Menu\Programs\KnownValue.lnk
nbrunsAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Vadim RappCommented:
If I remember correctly, per-machine start menu was in that folder in Windows 98 (or 95?), while in XP  it was already under %systemvolume%\Documents and Settings\All Users\Start Menu\Programs, and in Windows 7+ under  %systemvolume%\ProgramData\Microsoft\Windows\Start Menu . Are you sure you want \Windows\Start Menu\Programs ?

Anyways, in Windows the path to machine-wide start menu can be found in Registry at HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders\Common Programs. Note that the found value most likely will contain environment variable that the application that will be using it will have to expand.
0
nbrunsAuthor Commented:
Thanks for your reply. I can get the value of the correct folder at run time,  but I need a way to set it during install using a Setup project in Visual Studio. Currently I am using the Registry portion of the Setup project (which is built into a cab file for setup on a Windows Mobile device).
0
Vadim RappCommented:
Ah, so it's Windows Mobile, that explains the path.

In desktop MSI setup there are two ways to find out the right value in the registry: one is so called System Search, another is to create a custom action. Both are available in Setup And Deployment project from menu View/Editor (the former is under Launch Conditions).  There is a way to do it in compact installation as well, by using setup dll - see https://msdn.microsoft.com/en-us/library/aa924308.aspx for details, but as you can see it's more involved.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
nbrunsAuthor Commented:
I actually am using a custom dll for another task. I'll use that instead. Thanks!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
.NET Programming

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.