473,796 Members | 2,632 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

get path to all user's documents folder

How do I programmaticall y get the path for the windows shared documents
folder which is also the all user's document folder.

Thanks,

Dennis

Mar 14 '07 #1
4 8746
VJ
Environment.Get FolderPath(Envi ronment.Special Folder.<Oneofth eOptions>)

Is it not avaiable in the option?...

VJ

"Dennis C. Drumm" <dc******@commu nity.nospamwrot e in message
news:2A******** *************** ***********@mic rosoft.com...
How do I programmaticall y get the path for the windows shared documents
folder which is also the all user's document folder.

Thanks,

Dennis

Mar 14 '07 #2
That is where i started, but there is not a SecialFolder for the all-user's
documents folder. Any other suggestions???

Dennis
"VJ" <no***********@ yahoo.comwrote in message
news:u1******** ******@TK2MSFTN GP06.phx.gbl...
Environment.Get FolderPath(Envi ronment.Special Folder.<Oneofth eOptions>)

Is it not avaiable in the option?...

VJ

"Dennis C. Drumm" <dc******@commu nity.nospamwrot e in message
news:2A******** *************** ***********@mic rosoft.com...
>How do I programmaticall y get the path for the windows shared documents
folder which is also the all user's document folder.

Thanks,

Dennis

Mar 14 '07 #3
VJ
Then the way to go is native API. I am not sure of the exact command, but
the below site may help.

http://www.pinvoke.net/

There is one more Environment.Get EnvironmentVari able("") <-- but I doubt it
might be there...

VJ

"Dennis C. Drumm" <dc******@commu nity.nospamwrot e in message
news:3E******** *************** ***********@mic rosoft.com...
That is where i started, but there is not a SecialFolder for the
all-user's documents folder. Any other suggestions???

Dennis
"VJ" <no***********@ yahoo.comwrote in message
news:u1******** ******@TK2MSFTN GP06.phx.gbl...
>Environment.Ge tFolderPath(Env ironment.Specia lFolder.<Oneoft heOptions>)

Is it not avaiable in the option?...

VJ

"Dennis C. Drumm" <dc******@commu nity.nospamwrot e in message
news:2A******* *************** ************@mi crosoft.com...
>>How do I programmaticall y get the path for the windows shared documents
folder which is also the all user's document folder.

Thanks,

Dennis


Mar 14 '07 #4
Thanks,

As you suspected, I couldn't find the proper string for using
GetEnvironmentV ariable, so i had to use a pinvoke command.

Dennis
"VJ" <no***********@ yahoo.comwrote in message
news:uN******** ******@TK2MSFTN GP04.phx.gbl...
Then the way to go is native API. I am not sure of the exact command, but
the below site may help.

http://www.pinvoke.net/

There is one more Environment.Get EnvironmentVari able("") <-- but I doubt
it might be there...

VJ

"Dennis C. Drumm" <dc******@commu nity.nospamwrot e in message
news:3E******** *************** ***********@mic rosoft.com...
>That is where i started, but there is not a SecialFolder for the
all-user's documents folder. Any other suggestions???

Dennis
"VJ" <no***********@ yahoo.comwrote in message
news:u1******* *******@TK2MSFT NGP06.phx.gbl.. .
>>Environment.G etFolderPath(En vironment.Speci alFolder.<Oneof theOptions>)

Is it not avaiable in the option?...

VJ

"Dennis C. Drumm" <dc******@commu nity.nospamwrot e in message
news:2A****** *************** *************@m icrosoft.com...
How do I programmaticall y get the path for the windows shared documents
folder which is also the all user's document folder.

Thanks,

Dennis


Mar 15 '07 #5

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

Similar topics

8
17499
by: Glenn A. Harlan | last post by:
Why am I receiving the below error when calling - Path.GetTempFileName() The directory name is invalid. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.IO.IOException: The directory name is invalid.
0
1850
by: DotNetJunkies User | last post by:
I am using the BrowseFolderDialog control in a Winform app to get a user selected path. Under Network Places, there are Folder Shortcuts to network resources. If a user selects one of these Folder Shortcuts, the returned SelectedPath property is set to "C:\Documents and Settings\<username.domainname>\NetHood\<shortcut name>. The targets for these Folder Shortcuts are actual UNC paths. How can I access this target information within .Net. Thanks....
0
2490
by: Grant_S | last post by:
I need to identify the path to a users "My Document" folder where the user has a roaming profile and their "My Documents" folder is mapped to a network share as the H drive (specifically H:\\ - where the "My Received Files" folder path then is H:\\My Refeceived Files. The double \\ is not an escape character as subfolders only have sinvle "\" when I am doing some investigation of paths in code). It appears that the code, below, that I...
1
1311
by: Dathon | last post by:
I am trying to recursively enumerate the contents of my Documents and Settings folder. While doing this, I cam across the following: C:\Documents and Settings\All Users\Application Data\Symantec\hpc\ This directory contains an empty file named " " (a single space) The weird thing is that when I call Directory.Exists on this path (C:\Documents and Settings\All Users\Application Data\Symantec\hpc\ ), it returns true! This is clearly...
5
40001
by: Yosh | last post by:
What is the best method to obtain the actual folder path to My Documents for the current logged in user in C#? Thanks, Yosh
13
1005
by: Adam | last post by:
Trying to get an asp.net 2.0 app running and am receiving this error. I see a bunch of people with this error on the net, but no solution: Works fine on my local machine, deployed to a server it yields this message. Failed to map the path '/App_GlobalResources/' Stack trace: at System.Web.Hosting.HostingEnvironment.MapPathActual(VirtualPath virtualPath, Boolean permitNull)
2
2086
by: Just Me | last post by:
If I use the shell32q.NameSpace(k) and the Parent property I can develop, for example, the path to My Music. Actually it ends with Desktop but Desktop can also be traced by using Parent to the drive. This desktop is referred as DESKTOPDIRECTORY However, if I try to develop a path to Shared Music I get to Desktop/My Computer.
7
12922
by: siggi | last post by:
Hi all, when I do >>>sys.path in IDLE (winXP), i get a horrendously long list of paths, paths I may have used during a lot of trials and errors. How can I clean up sys.path? I mean, trim it of unnecessary paths? So far, I know only the command >>>sys.path.append(r'c:....etc...'), but how to delete or insert at the beginning of the list, I know not. Thanks,
4
1150
by: bobdydd | last post by:
Hi Everybody Is there any way to avoid a Visual Studio 2005 Folder from continually reappearing in "My Documents" folder after I have changed the project/ soloution paths to a different folder on a different drive? Regards Bob
0
9685
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9533
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10461
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10239
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10190
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10019
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9057
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5447
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5579
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.