I’m creating a new shorcut within and update of my program on the Start Menu
I worked getting the Special Environment variable ALLUSERSPROFILE and it worked for me under XP, it returns the right path, when using it under vista ir returns c:\ProgramData which is useless. Reading the Environment variable StartMenu is also pointless it returns empty string. ( On vista it lies under Windows\Start Menu, in english ,and if the install folder Windows has the default name)
Does anyone has an Idea how to get the startmenu directory for the ‘All Users”.
and would it be a generic solution that works under XP and Vista?
I’m creating a new shorcut within and update of my program on the Start
Share
You want
CSIDL_COMMON_STARTMENU. This doesn’t appear to be defined in theEnvironment.SpecialFoldersenumeration, but you can use the Win32 API via P/Invoke: