Re: Reference User Profile

Tech-Archive recommends: Fix windows errors by optimizing your registry



strFolder = "C:\Documents and Settings\" & Environ("userprofile") &
"\Desktop"

Having said that, are you SURE that's what you want? On my machine,
userprofile includes C:\Documents and Settings (plus there's always a chance
someone may have his/her profile in a different location). For a far more
reliable approach, see http://www.mvps.org/access/api/api0054.htm at "The
Access Web"

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)


"tminn" <tminn@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:C8807713-6561-4741-9745-09490050261A@xxxxxxxxxxxxxxxx
I'm trying to reference the current Window's user's desktop with some
code; I
am using the following:

C:\Documents and Settings\%userprofile%\Desktop

When I run the code I get a "Path not Found" message. Just to test, I
took
out "%userprofile%" and inserted the actual user name and the code ran
fine,
so I'm almost positive that that's the problem. Is that not the correct
way
to reference the current user's profle? Any help would be appreciated.



.



Relevant Pages

  • Re: U-Boat Enigma procedure(Long)
    ... > each have to have in order to have a good chance of solving a 3-rotor ... > maximum allowed in the German navy, how many plugs could each version ... the range of settings, rather than focussing on one setting at a time. ... If it reaches a local maximum, it starts again from another random ...
    (sci.crypt)
  • Re: MySpaceIM.exe: Bane of my existence
    ... | %UserProfile% path rule entry in the Additional Rules of Software ... | making it to Documents and Settings at all. ...
    (microsoft.public.windows.group_policy)
  • Desktop Apperance
    ... When I right click on my desktop to chance my settings, ... runndll.32xe bad image, then it procedes to tell me to ... Prev by Date: ...
    (microsoft.public.windowsxp.help_and_support)
  • Re: Renaming documents and settings folder?
    ... %userprofile% is shorter. ... > matter) of my backup folder due to the length of many of the path ... is "documents and settings" 22 char! ...
    (microsoft.public.windowsxp.customize)
  • Re: SuSE 9.1 desktop configuration KDE question
    ... Thanks for clarifying my question. ... I've just played around in KDE Control Center (assuming you're using KDE ... Is there a chance you set this on several programs in their ... settings to see if anything helps. ...
    (alt.os.linux.suse)