Subscribe to How-To Geek

Welcome to the How-To Geek Forums

We encourage you to register on our forums and post any questions you might have. The How-To Geeks monitor this forum and will respond to your question quickly.

How-To Geek Forums » Windows Vista

%username% issue

(4 posts)
  • Started 10 months ago by Smashpmk712
  • Latest reply from jd2066
  • Topic Viewed 360 times


Smashpmk712
Smashpmk712
Posts: 313

In vista I had two users. A local user named Dan and a domain user Dan. If I am logged in as the domain user the profile is under c:\users\dan.domainnamehere. I am writing a batch file (does that surprise any of you?)And when I copy something into the c:\users\%username% folder it goes to the local profile which is c:\users\dan. Does the %username% wildcard not know that I am logged into the domain? Also I have also tried deleting the local profile from the users folder and it still does not work.... It just creates a new directory for the local user.

Posted 10 months ago #
 
jd2066
Posts: 3331

What you want is the %USERPROFILE% variable.
It stores the full path that account is using which as you can see is not always C:\Users\%USERNAME%.

Posted 10 months ago #
 
Smashpmk712
Smashpmk712
Posts: 313

You are awsome..... this worked perfectly. infact I don't need to make seperate batch files for xp and vista. thanks so much!

Posted 10 months ago #
 
jd2066
Posts: 3331

You're Welcome.

Posted 10 months ago #
 

RSS feed for this topic

Reply

You must log in to post.

Sponsored Links
Getting Started
About How-To Geek
What Is That Process?
svchost.exe
jusched.exe
dwm.exe
ctfmon.exe
wmpnetwk.exe
wmpnscfg.exe
rundll32.exe
wfcrun32.exe
Ipoint.exe
Itype.exe
Wfica32.exe
Mobsync.exe
Cmd.exe
Dpupdchk.exe Adobe_Updater.exe

Copyright © 2006-2008 HowToGeek.com. All Rights Reserved.