Jump to content


 


Register a free account to unlock additional features at BleepingComputer.com
Welcome to BleepingComputer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.


Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.

Photo

Ampersand in User Folder Causing Errors in Command Prompt


  • Please log in to reply
8 replies to this topic

#1 Kirbyofdeath

Kirbyofdeath

  • Members
  • 459 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Somewhere on Earth
  • Local time:05:12 AM

Posted 18 November 2015 - 11:40 AM

My user folder is named "Mike&Michelle" but because of the ampersand, anything that uses command prompt to access the folder path gives an error unless the path is quoted.



BC AdBot (Login to Remove)

 


#2 Aura

Aura

    Bleepin' Special Ops


  • Malware Response Team
  • 19,603 posts
  • OFFLINE
  •  
  • Gender:Male
  • Local time:06:12 AM

Posted 18 November 2015 - 11:53 AM

What you want to do here, is to change your userprofile folder name, is that right? To what? If you change it to "Mike and Michelle", you'll have the same issue.

unite_blue.png
Security Administrator | Sysnative Windows Update Senior Analyst | Malware Hunter | @SecurityAura
My timezone UTC-05:00 (East. Coast). If I didn't reply to you within 48 hours, please send me a PM.


#3 britechguy

britechguy

    Been there, done that, got the T-shirt


  • Moderator
  • 7,522 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Staunton, VA
  • Local time:06:12 AM

Posted 18 November 2015 - 11:55 AM

Yes, and?   This is standard operating behavior when special characters that mean something to the command processor are used as part of a file name or folder name.  You are using one of the conventional methods around this.  Another is what is known as escaping the special characters.  See:

 

Escape Characters

 

If you're writing batch scripts that need to include double quotes as part of the command being constructed, you need to escape those, too.  See this page.


Brian AKA Bri the Tech Guy (website in my user profile) - Windows 10 Home, 64-Bit, Version 1803, Build 17134 

 

     In a modern society where everyone thinks their opinion deserves to be heard nothing annoys me more than individuals who mistake their personal preferences for fact.

         ~ Commenter TheCruyffGurn on the The Guardian website, 8/13/2014

 

              

 


#4 Kirbyofdeath

Kirbyofdeath
  • Topic Starter

  • Members
  • 459 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Somewhere on Earth
  • Local time:05:12 AM

Posted 18 November 2015 - 12:04 PM

I was a little confusing in my last post. What I was trying to say is there any way to change the name of my user folder without screwing up the computer? Having some install programs not work is frustrating for me because I'd have to install it on another user.


Edited by Kirbyofdeath, 18 November 2015 - 12:07 PM.


#5 Aura

Aura

    Bleepin' Special Ops


  • Malware Response Team
  • 19,603 posts
  • OFFLINE
  •  
  • Gender:Male
  • Local time:06:12 AM

Posted 18 November 2015 - 12:05 PM

It's possible to change your userprofile folder name, but there's also a chance that you'll "screw up" your computer. Personally, I never do that. I create a new account with the name I want, copy/paste the files I want to keep of the old profile from the new one, and delete the old user and userprofile (via Windows).

unite_blue.png
Security Administrator | Sysnative Windows Update Senior Analyst | Malware Hunter | @SecurityAura
My timezone UTC-05:00 (East. Coast). If I didn't reply to you within 48 hours, please send me a PM.


#6 Kirbyofdeath

Kirbyofdeath
  • Topic Starter

  • Members
  • 459 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Somewhere on Earth
  • Local time:05:12 AM

Posted 18 November 2015 - 12:09 PM

Sounds good. I would only do that suggestion as a last resort.



#7 Aura

Aura

    Bleepin' Special Ops


  • Malware Response Team
  • 19,603 posts
  • OFFLINE
  •  
  • Gender:Male
  • Local time:06:12 AM

Posted 18 November 2015 - 12:10 PM

If you still want to give it a try, there's a good tutorial on SevenForums.

http://www.sevenforums.com/tutorials/147545-user-profile-folder-change-user-account-folder-name.html

I suggest you to back-up your personal files and create a Restore Point prior to attempting this however.

unite_blue.png
Security Administrator | Sysnative Windows Update Senior Analyst | Malware Hunter | @SecurityAura
My timezone UTC-05:00 (East. Coast). If I didn't reply to you within 48 hours, please send me a PM.


#8 RolandJS

RolandJS

  • Members
  • 4,512 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Austin TX metro area
  • Local time:05:12 AM

Posted 18 November 2015 - 12:59 PM

Aura's absolutely correct; his way to eventually solve the problem is the best way.

While one can "surface-wise" change a user name, the account's created, original, name is written in stone.

There are a few account migration programs, I have not yet used them.


Edited by RolandJS, 18 November 2015 - 01:01 PM.

"Take care of thy backups and thy restores shall take care of thee."  -- Ben Franklin revisited.

http://collegecafe.fr.yuku.com/forums/45/Computer-Technologies/

Backup, backup, backup! -- Lady Fitzgerald (w7forums)

Clone or Image often! Backup... -- RockE (WSL)


#9 Willy22

Willy22

  • Members
  • 945 posts
  • OFFLINE
  •  
  • Gender:Not Telling
  • Location:Planet Earth
  • Local time:11:12 AM

Posted 19 November 2015 - 11:19 AM

- Yes. CMD.exe simply Always has a problem with the ampersand. I have written some programs using MSDOS commands and everytime it came across that ampersand it generated a non fatal error. I fear there's nothing but to re-install all programs for a different user. And don't use a space in that user name as well. spaces in Windows often require special treatment.






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users