Annoyances.org
Home » Windows XP Discussion Forum » Message 1049866950 Search | Help | Home
  
Tip: Run a free scan for common Windows errors ad

re: Question about 'Load DosKey in a DOS box automatically'
Tuesday, April 8, 2003 at 10:42 pm
Windows XP Annoyances Discussion Forum
Posted by KenAlcock (13 messages posted)


As I understand this thread, you want control over how the Command
Prompt initially opens.  (Get used to “Command Prompt” or Command
Line,” because it’s no longer a DOS prompt in Windows NT/2000/XP.)

This is intended for Windows XP.  I believe it will work on NT and
2000; but, I’m not so sure about DOS based Windows versions 3.x - ME).
I extensively use Command Line in my work.  Here’s what I use to make
my life easier.  Everything you see here should be part of the basic
Windows XP installation.

1. Find the Command Prompt icon, usually located in:
   Start Menu -> Programs -> Accessories -> Command Prompt

2. Right-click this icon and select [Properties].

3. On the [Shortcut] tab make the following changes:

[Target:] 
  %SystemRoot%\system32\cmd.exe /k %SystemRoot%\system32\autoexec.bat
  
  The /K switch carries out any command specified by the following
  {path string} and forces cmd.exe to remain open after the command
  completes.

  You don’t actually have a file: “%SystemRoot%\system32\autoexec.bat.”
  We’ll make it in a moment.  I strongly suggest you make this file,
  rather than use the one located at C:\.

[Shortcut Key:] Ctrl+Shift+C
  This saves a lot of time; now we don’t have to hunt our icon each
  Time we open a Command Line.

[Start in:] {Where ever your heart desires}
  ALL your Commands lines will open here; C:\ works fine for me.  You
  can also use environmental variables like %SystemRoot% in this blank.
  If you change this directory, make sure your %PATH% is updated so you
  can find any command line programs you wish to make use of.

[Run:] Normal Window
  This should be the default value.

4. On the [Options] tab make the following changes:

[Command History]

  [Buffer Size] 50
    This affects how many commands each Command Line buffer stores.

  [Number of Buffers] 4
    This affects how many Command Lines, open at the same time, can
    have their own command history buffer.

  [Discard Duplicates] OFF
    You can turn this on, but it may be somewhat confusing to locate
    commands you just ran a second ago, if you first ran the same
    command a half hour ago.  Only the FIRST instance of any command
    (as typed) is stored with this option on.  So this setting slightly
    changes the overall order of all commands in the history buffer.

[Edit Options]

  [Quick Edit Mode] On
    This allows you to mouse click directly in the Command Line, and
    Paste Windows clipboard text to it.

  [Insert Mode] On
    This allows you to click in the middle of a typed command string
    and type new characters, inserting them without overstriking any
    existing ones.  This is a default setting for the Command Line
    when it first opens.  (You can toggle Insert and Overstrike mode
    with the Insert key.)

4. After making your changes, click [Apply], then click [OK].

   Now ALL Command Line Prompts opened from this icon (or by pressing
   Ctrl+Shift+C) will inherit these settings.  However, if you open a
   command line from Start Menu -> Run, or any different icon, these
   settings won’t take effect.

5. Create an Autoexec.bat file to initialize your Command Line Prompt
   run from your modified icon (or by pressing Ctrl+Shift+C).

A. Click on Start Menu -> Run
B. Copy and paste the following line:
   Notepad %SystemRoot%\system32\Autoexec.bat
C. Press Enter.
D. Click [Yes] to create a new file.
E. Copy and paste the example Autoexec.bat shown below

::   Start example Autoexec.bat to initialize a new Command Line.
     @Echo Off
     CLS
:SetVars
     SET Greeting=It Works!
:Start
     Echo.
     Echo                                    %Greeting%
     Echo.
     @Echo On
:End
::   End example Autoexec.bat file. 

F. Save the file and exit Notepad.

6. Press Ctrl+Shift+C to test your work.

Now all you have to do is modify this Autoexec.bat with any settings
You want to include.  (Here’s another tip, create a shortcut to this
file and put it next to your Command Prompt icon in the Start Menu.)

DS




On Thursday, April 3, 2003 at 2:02 am, HANSL wrote: >When I make these modifications, any commands are executed at every moment I give >a command inside a dosbox, and "in it self" without influencing the environment of >the dosbox itself. In short: it does not work. >Using cmd in stead of command does work (without modifications) but has other disadvantages >and only works with doskey and not other commands. >Altering autoexec.nt does not work: bad command or file name (???????????????????) > >



Written in response to:
re: Question about 'Load DosKey in a DOS box automatically' (Tom: Thursday, April 3, 2003 at 2:02 am)

Responses to this message:
*cmd.exe in Win XP (Joh Neo: Friday, September 2, 2005 at 6:59 am)
*re: Question about 'Load DosKey in a DOS box automatically' (Rich Camlin: Tuesday, December 6, 2005 at 9:18 pm)
*re: Question about 'Load DosKey in a DOS box automatically' (Rich Camlin: Sunday, January 29, 2006 at 8:58 pm)
*re: Question about 'Load DosKey in a DOS box automatically' (Rich Camlin: Saturday, April 8, 2006 at 12:50 pm)
*re: Question about 'Load DosKey in a DOS box automatically' (Rich Camlin: Thursday, April 13, 2006 at 9:58 pm)
*re: Question about 'Load DosKey in a DOS box automatically' (sasi: Thursday, February 5, 2009 at 7:06 am)

All messages in this thread [show all]
-Question about 'Load DosKey in a DOS box automatically' (RAJ SINGHAL: Thu, Apr 4, 2002, 3:15 pm)
-re: Question about 'Load DosKey in a DOS box automatically' (Bob Cerelli: Thu, Apr 4, 2002, 4:55 pm)
-re: Question about 'Load DosKey in a DOS box automatically' (Oafah: Tue, May 21, 2002, 10:25 pm)
-re: Question about 'Load DosKey in a DOS box automatically' (CR: Wed, Oct 16, 2002, 2:09 am)
*re: Question about 'Load DosKey in a DOS box automatically' (rob chamberlin: Thu, Nov 14, 2002, 2:22 pm)
-re: Question about 'Load DosKey in a DOS box automatically' (Frank Tennant: Wed, Jul 2, 2003, 4:22 pm)
*re: Question about 'Load DosKey in a DOS box automatically' (rich namen: Mon, Aug 25, 2008, 9:42 am)
-re: Question about 'Load DosKey in a DOS box automatically' (Rob: Tue, Jan 28, 2003, 5:33 pm)
-re: Question about 'Load DosKey in a DOS box automatically' (mario: Fri, Feb 4, 2005, 4:30 pm)
-re: Question about 'Load DosKey in a DOS box automatically' (Matthew D. Healy: Fri, Feb 4, 2005, 7:45 pm)
*re: Question about 'Load DosKey in a DOS box automatically' (mario: Sun, Feb 6, 2005, 9:31 am)
*re: Question about 'Load DosKey in a DOS box automatically' (Matthew D. Healy: Fri, Feb 4, 2005, 7:41 pm)
-re: Question about 'Load DosKey in a DOS box automatically' (Tom: Thu, Apr 3, 2003, 2:02 am)
-re: Question about 'Load DosKey in a DOS box automatically' (KenAlcock: Tue, Apr 8, 2003, 10:42 pm)
*cmd.exe in Win XP (Joh Neo: Fri, Sep 2, 2005, 6:59 am)
*re: Question about 'Load DosKey in a DOS box automatically' (Rich Camlin: Tue, Dec 6, 2005, 9:18 pm)
*re: Question about 'Load DosKey in a DOS box automatically' (Rich Camlin: Sun, Jan 29, 2006, 8:58 pm)
*re: Question about 'Load DosKey in a DOS box automatically' (Rich Camlin: Sat, Apr 8, 2006, 12:50 pm)
*re: Question about 'Load DosKey in a DOS box automatically' (Rich Camlin: Thu, Apr 13, 2006, 9:58 pm)
*re: Question about 'Load DosKey in a DOS box automatically' (sasi: Thu, Feb 5, 2009, 7:06 am)
*re: Question about 'Load DosKey in a DOS box automatically' (raj singhal: Mon, Aug 22, 2005, 7:03 pm)
Return to the Windows XP Discussion Forum


All content at Annoyances.org is Copyright © 1995-2009 Creative Elementtm All rights reserved.
Please do not plagiarize; redistributing these pages without permission is strictly prohibited.