Cannot Create User Account Named 'Con' Under Windows 7

12

3

I'm unable to create an account named 'con' in Windows 7. I can create the account but each time I login, I see a notification that I'm working under a temporary profile and my files are wiped off after logging off. Any Advice/Suggestions on How to Fix?

This post gave me a hint but is not focused on user accounts but files and folders.

Sharad Gautam

Posted 2015-05-17T06:41:33.323

Reputation: 534

1

Possible duplicate of Unable to rename a folder or a file as 'con', Creating a folder named “CON” in Windows ...

– Karan – 2015-05-17T06:49:13.590

@Karan: Why would restrictions on folder or file names affect user account names? – Peter Mortensen – 2015-05-17T16:54:11.717

@PeterMortensen: Don't user profile folders get created based on account names? – Karan – 2015-05-17T18:53:30.570

It's related, but not quite a duplicate. Not voting to close. – bwDraco – 2015-05-18T02:08:26.463

1This brings me back to Win 9x ... Start -> Run -> "\con\con" -> Enter -> BSOD – Alex – 2015-05-18T10:53:01.763

@Karan not quite exactly like that on Windows 10. Why does Windows 10 truncate the user name?

– phuclv – 2018-09-29T02:23:40.900

Answers

15

Here's the answer to my own question. 'con' is a reserved keyword under Windows. So, when I try to create an account named con, the respective document directories fail to be created and hence when I login, all my data is stored in temp, which is wiped on logging out.

To fix this, I deleted the current account named 'con' and created an account named 'con0'. This successfully made an account named con0 with its respective document directories as con0. Then I changed the Account Name to 'con' which made windows to associate the 'con0' user folder to con User Account.

Sharad Gautam

Posted 2015-05-17T06:41:33.323

Reputation: 534

6Ingenious. A little risky, perhaps - you might run into other problems later on, for the same reason - but ingenious. :-) – Harry Johnston – 2015-05-17T07:13:17.477

6Past experience just shows that using reserved words can have bad consequences. You will find out over time where the issues lie. Either take the advice or not as you choose. – Fiasco Labs – 2015-05-17T18:28:24.000

5for example: any program that may create a folder or file (for settings, for example) named with your username will break. I don't know of any program like this (usually they instead store it underneath your home dir), but they could exist. – Olivier Dulac – 2015-05-18T11:57:02.027

18

CON is a reserved word for Windows as it's the name of a device (console). Use something else.

Karan

Posted 2015-05-17T06:41:33.323

Reputation: 51 857

Can you explain more?? – Sharad Gautam – 2015-05-17T06:47:07.377

3Did you read the linked article? – Karan – 2015-05-17T06:48:20.773

Is there no way I can create an account?? – Sharad Gautam – 2015-05-17T06:50:46.743

The linked article is about files and directories. It does explain my problem a little though. – Sharad Gautam – 2015-05-17T06:51:26.753

14It's obvious really. Whether you attempt to create a folder named CON directly or try and trick Windows into creating one by using it as the user name, the problem remains the same. – Karan – 2015-05-17T07:11:33.200

4You could create a user with some alternate name, like Con01, then rename it to Con. The home folder doesn't typically move, so it should stick (e.g. it will display on the Welcome Screen as Con, but actually be housed in C:\Users\Con01). Still, I'd probably avoid trying to trick out Windows that way. The same rules also apply to COM1-4 and other reserved "device names." – phyrfox – 2015-05-18T01:03:17.560

1@phyrfox: Yes, the OP has apparently used that trick already if you read his answer. I would not recommend it but it's not my PC, so... – Karan – 2015-05-18T01:05:04.800

1@Karan it's not obvious to the OP or they wouldn't ask for clarification. – user64742 – 2018-11-04T00:54:37.747

5

When you create a user, Windows also creates a home folder for that user. Traditionally that home folder is named same as the user. So the process of creating the CON user expected to fail when creating their home folder because that name is not allowed in the file system.

Also note, that Windows' filesystem is case insensitive, so "con" and "Con" have the same issue.

I am not sure if you can create another user name and then rename the user, because there are potentially other places that will conflict with the name. The general advice is to stay away from the reserved words - the benefit is most likely not worth the fight.

Vlad Didenko

Posted 2015-05-17T06:41:33.323

Reputation: 316

1

The file system is actually case *in*sensitive, with certain caveats.

– Karan – 2015-05-17T20:38:01.247

Thanks for the edits. Never again I will answer on the phone - screen too little to notice problems. I have also missed Sharad's self-answer there. – Vlad Didenko – 2015-05-18T00:04:00.433

There have been known security exploits taking advantage of such irregularities in the past, so the OS probably will go to great lengths to keep you from using these names. – rackandboneman – 2015-05-18T00:06:03.290

1

This has been answered, but yes it is a reserved device. When people were weaning themselves off CP/M and picking up DOS, most manuals described creating a file in this way... (close to the front, too).

copy con file.txt
...
...
^Z

(Some people are still doing this, it is like a VMS CREATE).

So that this will work, CON is reserved.

Others are COM1 COM2 COM3 COM4 PRN AUX LPT1

There are numerous KB articles and TechNet information pages concerning this, so it is odd that the question would come here.

mckenzm

Posted 2015-05-17T06:41:33.323

Reputation: 829

I can't think of a better way in DOS 1.0, unless you wanted to use EDLIN (and who ever wanted to use EDLIN?) – hobbs – 2015-05-18T04:47:45.187

1Well not me, but I thought debug was cool and I missed it when it left. But I remember how great it was to have a ring bound manual come with the OS. – mckenzm – 2015-05-18T06:59:11.143