0
I've seen that you can use %USERNAME% to get the whole path but I just want to get e.g John Doe for use in mapping a network drive to specific folders named after the user profile names?
e.g NET USE h: \test\Citrixusers\%USERNAME% but of course this gets the username as C:\Users\"Name"
So the end result would be like \test\Citrixusers\John Doe
Thanks in advance all.
I don't understand. You should be using %USERNAME% to get the path then split the string if you just want the username. – Ramhound – 2015-03-05T12:30:07.907
1Hmm.
echo %USERNAME%
just gives my name here on Windows 7 64bit. – DavidPostill – 2015-03-05T12:33:25.973Ok, so I could split the %USERNAME% output then. That would work. I just wondered if there was an easier way to get the Username is all. – Kyle M – 2015-03-05T12:36:50.780
Yeah I noticed that echo %USERNAME% gives JUST the name so I was confused. – Kyle M – 2015-03-05T12:38:52.900