Start CMD, then release it, then clear the screen

Here are the steps I need, I am using a script package

  • Open cmd with a desktop launcher
  • Then set its echo
  • Then clear the screen
  • Then wait for the input of commands

So, I can directly enter commands without a long line blocking the view

The code I've tried so far

@echo off cd "C:\Documents and Settings\Administrator\Desktop" cls cmd @echo off cls 

But when I run this, I get a typical CMD window where I need to type "echo off" and "cls" again to get a clean window.

The output I get is

 Microsoft Windows XP [Version 5.1.2600] (C) Copyright 1985-2001 Microsoft Corp. C:\Documents and Settings\Administrator\Desktop> 

The conclusion I want is simple

Imagine a flashing underscore

 _ 

Thanks.

+6
source share
5 answers

Try this line:

 start /D "C:\Documents and Settings\Administrator\Desktop" cmd /k "prompt $" 

/ D will install your working directory

The $ hint sets your message to "nothing", only a blinking cursor will display

+7
source

The result I want is simple.
_

You can achieve this with the prompt command, for example. prompt $S or prompt $g

Here is an example batch file that opens a new cmd window with an empty prompt:

 @echo Off start cmd /k "prompt $g" 
+2
source

create a VBS file using notepad

add these lines

 Set cmd = CreateObject("WScript.Shell") cmd.run"cmd" WScript.Sleep 200 cmd.Sendkeys"echo off{Enter}" WScript.Sleep 200 cmd.Sendkeys"cls{Enter}" WScript.Sleep 200 
+1
source

This command can be very problematic (cmd / c "echo off | clip") USE WITHOUT QUOTES:

 cmd /c echo off | clip goto off 

(Save as .bat) More problems !!!

0
source

I just used

 cls echo off cls cmd|echo off cls 

in a batch file. Works for me

0
source

All Articles