determing the full name to My Music on the start menu
-
On Windows when you press the start button (lower left corner) one of the entries that comes up is "my music." Part of this folders name includes the user name. For example in the following path "C:/Documents and Settings/john smith/My Documents/My Music" john smith is the user name. Since this part of the name will vary from user to user how can I open this folder on different computers with the same program? Jason
-
On Windows when you press the start button (lower left corner) one of the entries that comes up is "my music." Part of this folders name includes the user name. For example in the following path "C:/Documents and Settings/john smith/My Documents/My Music" john smith is the user name. Since this part of the name will vary from user to user how can I open this folder on different computers with the same program? Jason
-
On Windows when you press the start button (lower left corner) one of the entries that comes up is "my music." Part of this folders name includes the user name. For example in the following path "C:/Documents and Settings/john smith/My Documents/My Music" john smith is the user name. Since this part of the name will vary from user to user how can I open this folder on different computers with the same program? Jason
You're going to be treading in "murky" waters because on Vista the whole naming convention has changed. For example "My Documents" is now called "Documents" and is located:
"C:\Users\USERNAME\Documents" rather than "C:\Documents and Settings\USERNAME\My Documents"
The Desktop:
"C:\Users\USERNAME\Desktop" rather than "C:\Documents and Settings\USERNAME\Desktop"
-
On Windows when you press the start button (lower left corner) one of the entries that comes up is "my music." Part of this folders name includes the user name. For example in the following path "C:/Documents and Settings/john smith/My Documents/My Music" john smith is the user name. Since this part of the name will vary from user to user how can I open this folder on different computers with the same program? Jason
Environment.GetFolderPath(Environment.SpecialFolder.MyMusic);
will return a string with the full path of the current user's My Music folderDave
BTW, in software, hope and pray is not a viable strategy. (Luc Pattyn) -
On Windows when you press the start button (lower left corner) one of the entries that comes up is "my music." Part of this folders name includes the user name. For example in the following path "C:/Documents and Settings/john smith/My Documents/My Music" john smith is the user name. Since this part of the name will vary from user to user how can I open this folder on different computers with the same program? Jason
Dave is right, For all those special folders you may be interested in, use Environment.GetFolderPath() and Environment.SpecialFolder enumeration They keep moving these things around from one Windows version to the next, so it really is the only way to make it portable. :)
Luc Pattyn [Forum Guidelines] [My Articles]
Voting for dummies? No thanks. X|