473,401 Members | 2,068 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,401 software developers and data experts.

Is there builtin to get C:\Document&Settings\Username\startmenu..P

Hello,

Does VS2005 have anything buildin to retrieve the Directory path for

C:\Documents and Settings\UserName\Start Menu\Programs...

Like an application has Application.StartupPath

Or do I have to hardcode:

Dim strUserID As String = System.Environment.UserName
Dim path As String = "C:\Documents and Settings\strUserID\Start Menu...
Mar 2 '07 #1
2 1519
"Rich" <Ri**@discussions.microsoft.comwrote:
Does VS2005 have anything buildin to retrieve the Directory path for
C:\Documents and Settings\UserName\Start Menu\Programs...
It's in the Environment Namespace:

DirectoryInfo di =
new
DirectoryInfo(Environment.GetFolderPath(Environmen t.SpecialFolder.Favorites));

MessageBox.Show(di.FullName);

--
Chris Mullins, MCSD.NET, MCPD:Enterprise, Microsoft C# MVP
http://www.coversant.com/blogs/cmullins

Mar 2 '07 #2
On Fri, 2 Mar 2007 15:16:17 -0800, Rich wrote:
Hello,

Does VS2005 have anything buildin to retrieve the Directory path for

C:\Documents and Settings\UserName\Start Menu\Programs...

Like an application has Application.StartupPath

Or do I have to hardcode:

Dim strUserID As String = System.Environment.UserName
Dim path As String = "C:\Documents and Settings\strUserID\Start Menu...
If it for the current user, the follwing expression will get you their
start menu

Environment.GetFolderPath(Environment.SpecialFolde r.StartMenu)

For a named user think you might be forced to build it yourself, but by
first getting the system drive. After that you need a bunch of switch
statement because different Windows Versions store these folders in
different locations e.g. Windows NT and 2000 I think stores user folders in
the winnt folder
--
Bits.Bytes
http://bytes.thinkersroom.com
Mar 3 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Blair Hall | last post by:
Can anyone please tell me how to correctly use a built in function when there is a function of the same name in local scope? Here is an example. Suppose the following is in myApply.py: def...
0
by: Joachim Dahl | last post by:
I would like to inherit the builtin array class and write som extension methods in C. Other people have suggested that I use numarray for that, but all I want is a simple continuous C array of...
2
by: BJörn Lindqvist | last post by:
A problem I have occured recently is that I want to subclass builtin types. Especially subclassing list is very troublesome to me. But I can't find the right syntax to use. Take for example this...
1
by: Stephen Ferg | last post by:
Python has a builtin class for staticmethod. Seems to me that Python should also have a builtin class for abstractmethod. Something like this... ####################################### #...
11
by: rmm | last post by:
If I replace the open builtin eg import main __main__.__builtins__.open=None Is there any way, from here on, to access the original open function?? Extending this slightly, lets say I put a...
10
by: Shayne Wissler | last post by:
I've overloaded the global new operator, so that I can, detect when I've run out of memory: extern void* operator new(size_t s) { void *r = malloc(s); if (!r && s) { fprintf(stderr, "Error: No...
2
by: Casey Hawthorne | last post by:
Is there a way to determine -- when parsing -- if a word contains a builtin name or other imported system module name? Like "iskeyword" determines if a word is a keyword! -- Regards, Casey
1
by: barnesc | last post by:
Hi again, Since my linear algebra library appears not to serve any practical need (I found cgkit, and that works better for me), I've gotten bored and went back to one of my other projects:...
6
by: Anders K. Olsen | last post by:
Hello group I'm trying to list the users and groups who has read access to a file. I use .NET 2.0 and FileInfo.GetAccessControl().GetAccessRules(...) and then loop through the...
0
by: nejucomo | last post by:
Hi folks, Quick Synopsis: A test script demonstrates a memory leak when I use pythonic extensions of my builtin types, but if I use the builtin types themselves there is no memory leak. ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.