Programmatically access All Users Start Menu

fre0n picture fre0n · Feb 24, 2010 · Viewed 15.9k times · Source

Does anyone know how to programmatically access the "All Users" Startup Menu?

In XP, located here:

C:\Documents and Settings\All Users\Start Menu\Programs\Startup

And in Windows 7, located here:

C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup

Specifically, I've got a Setup and Deployment project, and I'd like to put a shortcut to the application in the Startup menu for all users so that the application is start whenever anyone logs in.

EDIT: I'm pretty sure this is where Brian got his answer from.

Answer

Mike Zboray picture Mike Zboray · Mar 30, 2012

In .NET 4 CommonStartMenu was added to the Environment.SpecialFolder enum, so you can use:

Environment.GetFolderPath(Environment.SpecialFolder.CommonStartMenu)