Click here to Skip to main content
15,887,175 members
Please Sign up or sign in to vote.
3.33/5 (3 votes)
See more:
Hello,

i am writing a custom setup and adding shortcuts to the windows startmenu.
Its working well und windows 7.
but under Windows XP the startmenu folder does not appear.

string allusersprograms = System.IO.Path.Combine(Environment.GetEnvironmentVariable("ALLUSERSPROFILE"), @"Start Menu\Programs\Programmname");
                System.IO.Directory.CreateDirectory(allusersprograms);


where is the failure?

same problem with send to items

Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + @"\Microsoft\Windows\SendTo\Link.lnk"


Regards
Ingo
Posted
Comments
dan!sh 1-Apr-11 9:15am    
Does that folder path exists in the computer you are trying to run your application on?

You can't create/change files in system folders without the appropriate permissions (admin).
 
Share this answer
 
The "Legacy" path for the SendTo folder is "%USERPROFILE%\SendTo".

I think there is no "%APPDATA%\Microsoft\Windows\SendTo" folder on an XP box.
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900