We help IT Professionals succeed at work.

Default starting point for the command line

davidsmith77
davidsmith77 asked
on
In Win2k, when I run a command prompt, (by typing cmd at run line) it defaults to

(1)    c:\documents and settings\administrator>_

how can I change this so that it reads just:-

(2)    C:\>_

I've read it has something to do with profiles, and where they are stored, but I have two machines, one of which defaults to 1, and the other to 2, both profiles are the as installed defaults.

I'm presuming there a variable or reg entry somewhere - any ideas?

Dave
Comment
Watch Question

Commented:
No problem to change this in the Command Prompt link, but I don't know, which value to set in HKCU\Console. (Default) doesn't work (maybe it will work, if you restart the computer).

Commented:
You have to change the home directory of the user in his profile.

If you request the properties of a user account in 'local users and computers' or in Active Directory, you can see this option on the 'account' tab.

You will want to make this home directory c:\

Author

Commented:
Thanks guys - it seem that this key is where the settings are - any further ideas on what to change?

home directories are blank.

Commented:
the default home directory for users is c:\documents and settings\%username%, that's why that is the field you have to change.. try it and see..

Author

Commented:
Ok, cool...

What if I have a Home directory configured, eg, documents and settings\bloggs\etc

But I want the cmd to default to c:\>_

In other words, I dont want to change the Home Directory...

Is this possible...

Commented:
I never really noticed this behavior of cmd.exe, since I always change the properties of Command Prompt to start in %systemdrive%\ and assign a shortcut to it (eg. CTRL + ALT + D) - and I put a shortcut to it in the quick launch bar. So it always starts in C:\.

Commented:
Hmm.. ok, I think schmiegu's answer is a better solution.

Author

Commented:
schmiegu - sounds good...but...

'since I always change the properties of Command Prompt
to start in %systemdrive%\'

How is this done?  I can't find any such setting in the .exe properties, or the properties menu item from within command prompt.

Author

Commented:
schmiegu - sounds good...but...

'since I always change the properties of Command Prompt
to start in %systemdrive%\'

How is this done?  I can't find any such setting in the .exe properties, or the properties menu item from within command prompt.

Commented:
Start - Programs - Accessories - right click "Command Prompt" and select Properties. Then in the textbox "Start in" type %systemdrive%\, then click to the textbox "Shortcut key" and type eg. D - this will be changed to CTRL+ALT+D

Since I do this on many servers and workstations I have to install, I've written a little VBScript, which is supposed to work with german and english versions of W2k:

Set oFso = CreateObject("Scripting.FileSystemObject")
strFolder = WshShell.SpecialFolders("Startmenu")
if instr(strfolder,"u") then
     strPath = strFolder & "\Programme\Zubehor\Eingabeaufforderung.lnk"
else
     strPath = strFolder & "\Programs\Accessories\Command Prompt.lnk"
end if
set oShellLink = WshShell.CreateShortcut(strPath)

oShellLink.Hotkey  = "CTRL+ALT+D"
oShellLink.WorkingDirectory ="%SYSTEMDRIVE%\"
oShellLink.Save

Author

Commented:
Cool, works fine...

Author

Commented:
Cool, works fine...

Author

Commented:
...Thanks to all

Author

Commented:
Soz...having a mare with the quadruple posts.....

Explore More ContentExplore courses, solutions, and other research materials related to this topic.