Solved

Create Batch File with Color in it

Posted on 2008-10-10
6
1,603 Views
Last Modified: 2012-05-05
I am in need of a little help creating a batch file that has color in it.  Below is the batch file that works just fine.  The person that is requesting this batch file would like the following in color so it stands out to the end user.

(This password is the one you use to log into your comptuer with.  Please  add xxx before your user name (example: xxx\username) then press enter.  You  will then be prompted for your password)

I have found out that I can change the whole screen differant colors, but I only what the above part in color.  Can this be done?

net use U: /delete
ECHO OFF
 ECHO  (This password is the one you use to log into your comptuer with.  Please  add xxx before your user name (example: xxx\username) then press enter.  You  will then be prompted for your password)
ECHO.
ECHO.  
ECHO.
 
net use U: "\\servername\shares\sharename" /persistent:yes
0
Comment
Question by:eServ
6 Comments
 
LVL 10

Expert Comment

by:MoreHeroic
Comment Utility
How about something like this?  It should flash white for a brief second while that text is printed then everything goes back to whatever the batch file started as.

net use U: /delete
@ECHO OFF
COLOR f0
ECHO  (This password is the one you use to log into your comptuer with.  Please  add xxx before your user name (example: xxx\username) then press enter.  You  will then be prompted for your password)
COLOR
ECHO.
ECHO.  
ECHO.
pause
 
net use U: "\\servername\shares\sharename" /persistent:yes
0
 
LVL 13

Expert Comment

by:Nick Denny
Comment Utility
Here is the list of colors:
0 = Black      
1 = Blue        
2 = Green      
3 = Aqua        
4 = Red        
5 = Purple      
6 = Yellow      
7 = White      
8 = Gray
9 = Light Blue
A = Light Green
B = Light Aqua
C = Light Red
D = Light Purple
E = Light Yellow
F = Bright White

Use:  COLOR  xx

One character specifies text. If used with 2, the first is background, then text.

To reset, use COLOR without parameters.
0
 
LVL 10

Expert Comment

by:MoreHeroic
Comment Utility
0
Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

 
LVL 43

Expert Comment

by:Steve Knight
Comment Utility
I do it as follows in a few scripts.  You can add a couple of Control G's to sounds a sounds too in the echo commands (use edit and enter them with Control P Control G.

Steve

@echo off
REM save as 1.cmd or whatever.  Change path to point to second batch
START /WAIT cmd /c c:\2.cmd
echo Continuing

@echo off
REM Save as 2.bat or change reference in above file
color cf
mode con: cols=80 lines=5
cls
echo This is the message to pop up
pause
exit
0
 
LVL 43

Accepted Solution

by:
Steve Knight earned 500 total points
Comment Utility
While you are at it add a title command and

@echo off
REM Save as 2.bat or change reference in above file
color cf
mode con: cols=80 lines=5
cls
TITLE PLEASE ENTER YOUR PASSWORD
echo This is the message to pop up
net use u: .....
exit
0
 

Author Closing Comment

by:eServ
Comment Utility
Thanks for your help all seems to be working
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

If your system is showing symptoms of browser hijacks or 'google search redirects' check out my other article (http://rdsrc.us/u3GP7A) first and run the tool TDSSKiller (http://rdsrc.us/GDBBs4) to get rid of the infection. Once done, and if the …
cPanel is a Unix based web hosting control panel that provides a graphical interface and automation tools designed to simplify the process of hosting a web site. cPanel utilizes a 3 tier structure that provides functionality for administrators, rese…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now