C#在Windows XP下访问Startmenu [英] C# Access the Startmenu under Windows XP

查看:165
本文介绍了C#在Windows XP下访问Startmenu的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,

我正在编写自定义设置并将快捷方式添加到Windows startmenu.
它在Windows 7和Windows 7下都能正常工作.
但是在Windows XP下,不会显示startmenu文件夹.

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"



问候
Ingo



Regards
Ingo

推荐答案

没有适当的权限(admin),您无法在系统文件夹中创建/更改文件.
You can''t create/change files in system folders without the appropriate permissions (admin).


SendTo文件夹的旧版"路径为%USERPROFILE%\ SendTo".

我认为XP盒子上没有%APPDATA%\ Microsoft \ Windows \ SendTo"文件夹.
The "Legacy" path for the SendTo folder is "%USERPROFILE%\SendTo".

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


这篇关于C#在Windows XP下访问Startmenu的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆