Link to home
Start Free TrialLog in
Avatar of nbruns
nbruns

asked on

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
Avatar of Vadim Rapp
Vadim Rapp
Flag of United States of America image

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.
Avatar of nbruns
nbruns

ASKER

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).
ASKER CERTIFIED SOLUTION
Avatar of Vadim Rapp
Vadim Rapp
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of nbruns

ASKER

I actually am using a custom dll for another task. I'll use that instead. Thanks!