Solved

Get Current User's My Document's My Pictures Folder

Posted on 2007-12-06
3
436 Views
Last Modified: 2010-04-21
Is it possible to get the current user's My pictures Folder?
C:\Documents and Settings\@CurrentUser@\My Documents\My Pictures

This is for a windows service to copy files from this directory to a network share.  The service is setup to run on LocalSystem, would this also need to be changed?

I am trying to be able to install this windows service without having to hardcode the user's my pictures path.
0
Comment
Question by:JRockFL
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 19

Expert Comment

by:Delphineous Silverwing
ID: 20424942
Look at Microsoft Knowledge Base article 274443 about using Group Policies for redirecting these folders.
http://support.microsoft.com/kb/274443/en-us
0
 
LVL 3

Accepted Solution

by:
SLFuqua earned 500 total points
ID: 20425022
I don't have VB on this machine, but you can create a variable (e.g., myPath) and assign it "= my." and when you type the dot a whole list of possibilities open up.

I can get the exact code in the morning when I get to work if you need.

Best,
sl
0
 
LVL 8

Author Closing Comment

by:JRockFL
ID: 31413319
Thank you!
My.Computer.FileSystem.SpecialDirectories.MyPictures
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Since .Net 2.0, Visual Basic has made it easy to create a splash screen and set it via the "Splash Screen" drop down in the Project Properties.  A splash screen set in this manner is automatically created, displayed and closed by the framework itsel…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

756 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question